diff options
author | 2019-02-15 12:42:15 -0500 | |
---|---|---|
committer | 2020-06-07 19:06:30 -0400 | |
commit | cd87de919c733033557401e011102edc67c5f169 (patch) | |
tree | c19225558d63945cf7afea5e0dc92c738788d71a /Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug | |
parent | Fix FAM Test. Begin Grammar Fix. (diff) | |
download | VIATRA-Generator-cd87de919c733033557401e011102edc67c5f169.tar.gz VIATRA-Generator-cd87de919c733033557401e011102edc67c5f169.tar.zst VIATRA-Generator-cd87de919c733033557401e011102edc67c5f169.zip |
Set up #19
Diffstat (limited to 'Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug')
4 files changed, 34484 insertions, 0 deletions
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/errors.txt b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/errors.txt new file mode 100644 index 00000000..94b0f4e3 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/errors.txt | |||
@@ -0,0 +1,195 @@ | |||
1 | Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.fam.terminatorAndInformation contains errors. | ||
2 | org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) | ||
3 | org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) | ||
4 | org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) | ||
5 | hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) | ||
6 | hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) | ||
7 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) | ||
8 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) | ||
9 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) | ||
10 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) | ||
11 | org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (NullPointerException): | ||
12 | hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.lambda$8(QueryLoader.java:108) | ||
13 | org.eclipse.xtext.xbase.lib.internal.BooleanFunctionDelegate.apply(BooleanFunctionDelegate.java:41) | ||
14 | com.google.common.collect.Iterators$6.computeNext(Iterators.java:617) | ||
15 | com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145) | ||
16 | com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140) | ||
17 | com.google.common.collect.Iterators.addAll(Iterators.java:366) | ||
18 | com.google.common.collect.Iterables.addAll(Iterables.java:332) | ||
19 | com.google.common.collect.Sets.newLinkedHashSet(Sets.java:383) | ||
20 | org.eclipse.xtext.xbase.lib.IterableExtensions.toSet(IterableExtensions.java:592) | ||
21 | hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader._getPatterns(QueryLoader.java:84) | ||
22 | hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.getPatterns(QueryLoader.java:213) | ||
23 | hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.loadQueries(QueryLoader.java:54) | ||
24 | hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:167) | ||
25 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) | ||
26 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) | ||
27 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) | ||
28 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) | ||
29 | org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.fam.terminatorAndInformation contains errors. | ||
30 | org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) | ||
31 | org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) | ||
32 | org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) | ||
33 | hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) | ||
34 | hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) | ||
35 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) | ||
36 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) | ||
37 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) | ||
38 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) | ||
39 | org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.fam.terminatorAndInformation contains errors. | ||
40 | org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) | ||
41 | org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) | ||
42 | org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) | ||
43 | hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) | ||
44 | hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) | ||
45 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) | ||
46 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) | ||
47 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) | ||
48 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) | ||
49 | org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.fam.terminatorAndInformation contains errors. | ||
50 | org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) | ||
51 | org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) | ||
52 | org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) | ||
53 | hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) | ||
54 | hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) | ||
55 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) | ||
56 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) | ||
57 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) | ||
58 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) | ||
59 | org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.fam.terminatorAndInformation contains errors. | ||
60 | org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) | ||
61 | org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) | ||
62 | org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) | ||
63 | hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) | ||
64 | hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) | ||
65 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) | ||
66 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) | ||
67 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) | ||
68 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) | ||
69 | org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.fam.terminatorAndInformation contains errors. | ||
70 | org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) | ||
71 | org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) | ||
72 | org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) | ||
73 | hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) | ||
74 | hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) | ||
75 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) | ||
76 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) | ||
77 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) | ||
78 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) | ||
79 | org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.fam.terminatorAndInformation contains errors. | ||
80 | org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) | ||
81 | org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) | ||
82 | org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) | ||
83 | hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) | ||
84 | hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) | ||
85 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) | ||
86 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) | ||
87 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) | ||
88 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) | ||
89 | org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.fam.terminatorAndInformation contains errors. | ||
90 | org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) | ||
91 | org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) | ||
92 | org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) | ||
93 | hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) | ||
94 | hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) | ||
95 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) | ||
96 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) | ||
97 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) | ||
98 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) | ||
99 | org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.fam.terminatorAndInformation contains errors. | ||
100 | org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) | ||
101 | org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) | ||
102 | org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) | ||
103 | hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) | ||
104 | hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) | ||
105 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) | ||
106 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) | ||
107 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) | ||
108 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) | ||
109 | org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.fam.terminatorAndInformation contains errors. | ||
110 | org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) | ||
111 | org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) | ||
112 | org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) | ||
113 | hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) | ||
114 | hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) | ||
115 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) | ||
116 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) | ||
117 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) | ||
118 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) | ||
119 | org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.fam.terminatorAndInformation contains errors. | ||
120 | org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) | ||
121 | org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) | ||
122 | org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) | ||
123 | hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) | ||
124 | hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) | ||
125 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) | ||
126 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) | ||
127 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) | ||
128 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) | ||
129 | org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.xyz.terminatorAndInformation contains errors. | ||
130 | org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) | ||
131 | org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) | ||
132 | org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) | ||
133 | hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) | ||
134 | hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) | ||
135 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) | ||
136 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) | ||
137 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) | ||
138 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) | ||
139 | org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.xyz.terminatorAndInformation contains errors. | ||
140 | org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) | ||
141 | org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) | ||
142 | org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) | ||
143 | hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) | ||
144 | hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) | ||
145 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) | ||
146 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) | ||
147 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) | ||
148 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) | ||
149 | org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (NullPointerException): | ||
150 | hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.lambda$8(QueryLoader.java:108) | ||
151 | org.eclipse.xtext.xbase.lib.internal.BooleanFunctionDelegate.apply(BooleanFunctionDelegate.java:41) | ||
152 | com.google.common.collect.Iterators$6.computeNext(Iterators.java:617) | ||
153 | com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145) | ||
154 | com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140) | ||
155 | com.google.common.collect.Iterators.addAll(Iterators.java:366) | ||
156 | com.google.common.collect.Iterables.addAll(Iterables.java:332) | ||
157 | com.google.common.collect.Sets.newLinkedHashSet(Sets.java:383) | ||
158 | org.eclipse.xtext.xbase.lib.IterableExtensions.toSet(IterableExtensions.java:592) | ||
159 | hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader._getPatterns(QueryLoader.java:84) | ||
160 | hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.getPatterns(QueryLoader.java:213) | ||
161 | hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.loadQueries(QueryLoader.java:54) | ||
162 | hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:167) | ||
163 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) | ||
164 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) | ||
165 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) | ||
166 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) | ||
167 | org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (NullPointerException): | ||
168 | hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.lambda$8(QueryLoader.java:108) | ||
169 | org.eclipse.xtext.xbase.lib.internal.BooleanFunctionDelegate.apply(BooleanFunctionDelegate.java:41) | ||
170 | com.google.common.collect.Iterators$6.computeNext(Iterators.java:617) | ||
171 | com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145) | ||
172 | com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140) | ||
173 | com.google.common.collect.Iterators.addAll(Iterators.java:366) | ||
174 | com.google.common.collect.Iterables.addAll(Iterables.java:332) | ||
175 | com.google.common.collect.Sets.newLinkedHashSet(Sets.java:383) | ||
176 | org.eclipse.xtext.xbase.lib.IterableExtensions.toSet(IterableExtensions.java:592) | ||
177 | hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader._getPatterns(QueryLoader.java:84) | ||
178 | hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.getPatterns(QueryLoader.java:213) | ||
179 | hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.loadQueries(QueryLoader.java:54) | ||
180 | hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:167) | ||
181 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) | ||
182 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) | ||
183 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) | ||
184 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) | ||
185 | org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (UnsupportedOperationException): Unsupported attribute type: EJavaClass of org.eclipse.emf.ecore.impl.EcorePackageImpl@eddc9bb (name: ecore) (nsURI: http://www.eclipse.org/emf/2002/Ecore, nsPrefix: ecore)::EClassifier.instanceClass | ||
186 | hu.bme.mit.inf.dslreasoner.ecore2logic.EAttributeMapper_RelationsOverTypes.TypeOfRange(EAttributeMapper_RelationsOverTypes.java:237) | ||
187 | hu.bme.mit.inf.dslreasoner.ecore2logic.EAttributeMapper_RelationsOverTypes.transformEAttributes(EAttributeMapper_RelationsOverTypes.java:70) | ||
188 | hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic.transformEAttributes(Ecore2Logic.java:140) | ||
189 | hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic.transformMetamodel(Ecore2Logic.java:83) | ||
190 | hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:189) | ||
191 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) | ||
192 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) | ||
193 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) | ||
194 | hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) | ||
195 | org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) \ No newline at end of file | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generated3valued.vql_deactivated b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generated3valued.vql_deactivated new file mode 100644 index 00000000..88497c64 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generated3valued.vql_deactivated | |||
@@ -0,0 +1,31733 @@ | |||
1 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
2 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
3 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
4 | |||
5 | ////////// | ||
6 | // 0. Util | ||
7 | ////////// | ||
8 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9 | PartialInterpretation.problem(interpretation,problem); | ||
10 | } | ||
11 | |||
12 | ///////////////////////// | ||
13 | // 0.1 Existence | ||
14 | ///////////////////////// | ||
15 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
16 | find interpretation(problem,interpretation); | ||
17 | LogicProblem.elements(problem,element); | ||
18 | } or { | ||
19 | find interpretation(problem,interpretation); | ||
20 | PartialInterpretation.newElements(interpretation,element); | ||
21 | } | ||
22 | |||
23 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24 | find mustExist(problem,interpretation,element); | ||
25 | } or { | ||
26 | find interpretation(problem,interpretation); | ||
27 | neg find elementCloseWorld(element); | ||
28 | PartialInterpretation.openWorldElements(interpretation,element); | ||
29 | } | ||
30 | |||
31 | private pattern elementCloseWorld(element:DefinedElement) { | ||
32 | PartialInterpretation.openWorldElements(i,element); | ||
33 | PartialInterpretation.maxNewElements(i,0); | ||
34 | } or { | ||
35 | Scope.targetTypeInterpretation(scope,interpretation); | ||
36 | PartialTypeInterpratation.elements(interpretation,element); | ||
37 | Scope.maxNewElements(scope,0); | ||
38 | } | ||
39 | |||
40 | //////////////////////// | ||
41 | // 0.2 Equivalence | ||
42 | //////////////////////// | ||
43 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
44 | find mayExist(problem,interpretation,a); | ||
45 | find mayExist(problem,interpretation,b); | ||
46 | a == b; | ||
47 | } | ||
48 | |||
49 | //////////////////////// | ||
50 | // 0.3 Required Patterns by TypeIndexer | ||
51 | //////////////////////// | ||
52 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
53 | find interpretation(problem,interpretation); | ||
54 | LogicProblem.types(problem,type); | ||
55 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
56 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
57 | } | ||
58 | |||
59 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
60 | find interpretation(problem,interpretation); | ||
61 | LogicProblem.types(problem,type); | ||
62 | TypeDefinition.elements(type,element); | ||
63 | } or { | ||
64 | find interpretation(problem,interpretation); | ||
65 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
66 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
67 | } | ||
68 | |||
69 | private pattern isPrimitive(element: PrimitiveElement) { | ||
70 | PrimitiveElement(element); | ||
71 | } | ||
72 | |||
73 | ////////// | ||
74 | // 1. Problem-Specific Base Indexers | ||
75 | ////////// | ||
76 | // 1.1 Type Indexers | ||
77 | ////////// | ||
78 | // 1.1.1 primitive Type Indexers | ||
79 | ////////// | ||
80 | |||
81 | ////////// | ||
82 | // 1.1.2 domain-specific Type Indexers | ||
83 | ////////// | ||
84 | /** | ||
85 | * An element must be an instance of type "FunctionalElement class". | ||
86 | */ | ||
87 | private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
88 | Type.name(type,"FunctionalElement class"); | ||
89 | find directInstanceOf(problem,interpretation,element,type); | ||
90 | } | ||
91 | private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
92 | find interpretation(problem,interpretation); | ||
93 | PartialInterpretation.scopes(interpretation,scope); | ||
94 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
95 | Scope.maxNewElements(scope,0); | ||
96 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
97 | Type.name(type,"FunctionalElement class"); | ||
98 | } | ||
99 | |||
100 | /** | ||
101 | * An element may be an instance of type "FunctionalElement class". | ||
102 | */ | ||
103 | private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
104 | { | ||
105 | find interpretation(problem,interpretation); | ||
106 | PartialInterpretation.newElements(interpretation,element); | ||
107 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
108 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
109 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
110 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
111 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
112 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
113 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
114 | neg find isPrimitive(element); | ||
115 | } or { | ||
116 | find interpretation(problem,interpretation); | ||
117 | PartialInterpretation.openWorldElements(interpretation,element); | ||
118 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
119 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
120 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
121 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
122 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
123 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
124 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
125 | neg find isPrimitive(element); | ||
126 | } or | ||
127 | { find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } | ||
128 | /** | ||
129 | * An element must be an instance of type "FunctionalArchitectureModel class". | ||
130 | */ | ||
131 | private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
132 | Type.name(type,"FunctionalArchitectureModel class"); | ||
133 | find directInstanceOf(problem,interpretation,element,type); | ||
134 | } | ||
135 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
136 | find interpretation(problem,interpretation); | ||
137 | PartialInterpretation.scopes(interpretation,scope); | ||
138 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
139 | Scope.maxNewElements(scope,0); | ||
140 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
141 | Type.name(type,"FunctionalArchitectureModel class"); | ||
142 | } | ||
143 | |||
144 | /** | ||
145 | * An element may be an instance of type "FunctionalArchitectureModel class". | ||
146 | */ | ||
147 | private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
148 | { | ||
149 | find interpretation(problem,interpretation); | ||
150 | PartialInterpretation.newElements(interpretation,element); | ||
151 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
152 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
153 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
154 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
155 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
156 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
157 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
158 | neg find isPrimitive(element); | ||
159 | } or { | ||
160 | find interpretation(problem,interpretation); | ||
161 | PartialInterpretation.openWorldElements(interpretation,element); | ||
162 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
163 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
164 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
165 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
166 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
167 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
168 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
169 | neg find isPrimitive(element); | ||
170 | } or | ||
171 | { find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } | ||
172 | /** | ||
173 | * An element must be an instance of type "Function class". | ||
174 | */ | ||
175 | private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
176 | Type.name(type,"Function class"); | ||
177 | find directInstanceOf(problem,interpretation,element,type); | ||
178 | } | ||
179 | private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
180 | find interpretation(problem,interpretation); | ||
181 | PartialInterpretation.scopes(interpretation,scope); | ||
182 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
183 | Scope.maxNewElements(scope,0); | ||
184 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
185 | Type.name(type,"Function class"); | ||
186 | } | ||
187 | |||
188 | /** | ||
189 | * An element may be an instance of type "Function class". | ||
190 | */ | ||
191 | private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
192 | { | ||
193 | find interpretation(problem,interpretation); | ||
194 | PartialInterpretation.newElements(interpretation,element); | ||
195 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
196 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
197 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
198 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
199 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
200 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
201 | neg find isPrimitive(element); | ||
202 | } or { | ||
203 | find interpretation(problem,interpretation); | ||
204 | PartialInterpretation.openWorldElements(interpretation,element); | ||
205 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
206 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
207 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
208 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
209 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
210 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
211 | neg find isPrimitive(element); | ||
212 | } or | ||
213 | { find mustInstanceOfFunction_class(problem,interpretation,element); } | ||
214 | /** | ||
215 | * An element must be an instance of type "FAMTerminator class". | ||
216 | */ | ||
217 | private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
218 | Type.name(type,"FAMTerminator class"); | ||
219 | find directInstanceOf(problem,interpretation,element,type); | ||
220 | } | ||
221 | private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
222 | find interpretation(problem,interpretation); | ||
223 | PartialInterpretation.scopes(interpretation,scope); | ||
224 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
225 | Scope.maxNewElements(scope,0); | ||
226 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
227 | Type.name(type,"FAMTerminator class"); | ||
228 | } | ||
229 | |||
230 | /** | ||
231 | * An element may be an instance of type "FAMTerminator class". | ||
232 | */ | ||
233 | private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
234 | { | ||
235 | find interpretation(problem,interpretation); | ||
236 | PartialInterpretation.newElements(interpretation,element); | ||
237 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
238 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
239 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
240 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
241 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
242 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
243 | neg find isPrimitive(element); | ||
244 | } or { | ||
245 | find interpretation(problem,interpretation); | ||
246 | PartialInterpretation.openWorldElements(interpretation,element); | ||
247 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
248 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
249 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
250 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
251 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
252 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
253 | neg find isPrimitive(element); | ||
254 | } or | ||
255 | { find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } | ||
256 | /** | ||
257 | * An element must be an instance of type "InformationLink class". | ||
258 | */ | ||
259 | private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
260 | Type.name(type,"InformationLink class"); | ||
261 | find directInstanceOf(problem,interpretation,element,type); | ||
262 | } | ||
263 | private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
264 | find interpretation(problem,interpretation); | ||
265 | PartialInterpretation.scopes(interpretation,scope); | ||
266 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
267 | Scope.maxNewElements(scope,0); | ||
268 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
269 | Type.name(type,"InformationLink class"); | ||
270 | } | ||
271 | |||
272 | /** | ||
273 | * An element may be an instance of type "InformationLink class". | ||
274 | */ | ||
275 | private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
276 | { | ||
277 | find interpretation(problem,interpretation); | ||
278 | PartialInterpretation.newElements(interpretation,element); | ||
279 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
280 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
281 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
282 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
283 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
284 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
285 | neg find isPrimitive(element); | ||
286 | } or { | ||
287 | find interpretation(problem,interpretation); | ||
288 | PartialInterpretation.openWorldElements(interpretation,element); | ||
289 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
290 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
291 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
292 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
293 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
294 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
295 | neg find isPrimitive(element); | ||
296 | } or | ||
297 | { find mustInstanceOfInformationLink_class(problem,interpretation,element); } | ||
298 | /** | ||
299 | * An element must be an instance of type "FunctionalInterface class". | ||
300 | */ | ||
301 | private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
302 | Type.name(type,"FunctionalInterface class"); | ||
303 | find directInstanceOf(problem,interpretation,element,type); | ||
304 | } | ||
305 | private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
306 | find interpretation(problem,interpretation); | ||
307 | PartialInterpretation.scopes(interpretation,scope); | ||
308 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
309 | Scope.maxNewElements(scope,0); | ||
310 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
311 | Type.name(type,"FunctionalInterface class"); | ||
312 | } | ||
313 | |||
314 | /** | ||
315 | * An element may be an instance of type "FunctionalInterface class". | ||
316 | */ | ||
317 | private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
318 | { | ||
319 | find interpretation(problem,interpretation); | ||
320 | PartialInterpretation.newElements(interpretation,element); | ||
321 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
322 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
323 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
324 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
325 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
326 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
327 | neg find isPrimitive(element); | ||
328 | } or { | ||
329 | find interpretation(problem,interpretation); | ||
330 | PartialInterpretation.openWorldElements(interpretation,element); | ||
331 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
332 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
333 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
334 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
335 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
336 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
337 | neg find isPrimitive(element); | ||
338 | } or | ||
339 | { find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } | ||
340 | /** | ||
341 | * An element must be an instance of type "FunctionalInput class". | ||
342 | */ | ||
343 | private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
344 | Type.name(type,"FunctionalInput class"); | ||
345 | find directInstanceOf(problem,interpretation,element,type); | ||
346 | } | ||
347 | private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
348 | find interpretation(problem,interpretation); | ||
349 | PartialInterpretation.scopes(interpretation,scope); | ||
350 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
351 | Scope.maxNewElements(scope,0); | ||
352 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
353 | Type.name(type,"FunctionalInput class"); | ||
354 | } | ||
355 | |||
356 | /** | ||
357 | * An element may be an instance of type "FunctionalInput class". | ||
358 | */ | ||
359 | private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
360 | { | ||
361 | find interpretation(problem,interpretation); | ||
362 | PartialInterpretation.newElements(interpretation,element); | ||
363 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
364 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
365 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
366 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
367 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
368 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
369 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
370 | neg find isPrimitive(element); | ||
371 | } or { | ||
372 | find interpretation(problem,interpretation); | ||
373 | PartialInterpretation.openWorldElements(interpretation,element); | ||
374 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
375 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
376 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
377 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
378 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
379 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
380 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
381 | neg find isPrimitive(element); | ||
382 | } or | ||
383 | { find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } | ||
384 | /** | ||
385 | * An element must be an instance of type "FunctionalOutput class". | ||
386 | */ | ||
387 | private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
388 | Type.name(type,"FunctionalOutput class"); | ||
389 | find directInstanceOf(problem,interpretation,element,type); | ||
390 | } | ||
391 | private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
392 | find interpretation(problem,interpretation); | ||
393 | PartialInterpretation.scopes(interpretation,scope); | ||
394 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
395 | Scope.maxNewElements(scope,0); | ||
396 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
397 | Type.name(type,"FunctionalOutput class"); | ||
398 | } | ||
399 | |||
400 | /** | ||
401 | * An element may be an instance of type "FunctionalOutput class". | ||
402 | */ | ||
403 | private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
404 | { | ||
405 | find interpretation(problem,interpretation); | ||
406 | PartialInterpretation.newElements(interpretation,element); | ||
407 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
408 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
409 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
410 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
411 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
412 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
413 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
414 | neg find isPrimitive(element); | ||
415 | } or { | ||
416 | find interpretation(problem,interpretation); | ||
417 | PartialInterpretation.openWorldElements(interpretation,element); | ||
418 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
419 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
420 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
421 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
422 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
423 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
424 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
425 | neg find isPrimitive(element); | ||
426 | } or | ||
427 | { find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } | ||
428 | /** | ||
429 | * An element must be an instance of type "FunctionalData class". | ||
430 | */ | ||
431 | private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
432 | Type.name(type,"FunctionalData class"); | ||
433 | find directInstanceOf(problem,interpretation,element,type); | ||
434 | } | ||
435 | private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
436 | find interpretation(problem,interpretation); | ||
437 | PartialInterpretation.scopes(interpretation,scope); | ||
438 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
439 | Scope.maxNewElements(scope,0); | ||
440 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
441 | Type.name(type,"FunctionalData class"); | ||
442 | } | ||
443 | |||
444 | /** | ||
445 | * An element may be an instance of type "FunctionalData class". | ||
446 | */ | ||
447 | private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
448 | { | ||
449 | find interpretation(problem,interpretation); | ||
450 | PartialInterpretation.newElements(interpretation,element); | ||
451 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
452 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
453 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
454 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
455 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
456 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
457 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
458 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
459 | neg find isPrimitive(element); | ||
460 | } or { | ||
461 | find interpretation(problem,interpretation); | ||
462 | PartialInterpretation.openWorldElements(interpretation,element); | ||
463 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
464 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
465 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
466 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
467 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
468 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
469 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
470 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
471 | neg find isPrimitive(element); | ||
472 | } or | ||
473 | { find mustInstanceOfFunctionalData_class(problem,interpretation,element); } | ||
474 | /** | ||
475 | * An element must be an instance of type "FunctionType enum". | ||
476 | */ | ||
477 | private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
478 | Type.name(type,"FunctionType enum"); | ||
479 | find directInstanceOf(problem,interpretation,element,type); | ||
480 | } | ||
481 | private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
482 | find interpretation(problem,interpretation); | ||
483 | PartialInterpretation.scopes(interpretation,scope); | ||
484 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
485 | Scope.maxNewElements(scope,0); | ||
486 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
487 | Type.name(type,"FunctionType enum"); | ||
488 | } | ||
489 | |||
490 | /** | ||
491 | * An element may be an instance of type "FunctionType enum". | ||
492 | */ | ||
493 | private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
494 | { find mustInstanceOfFunctionType_enum(problem,interpretation,element); } | ||
495 | /** | ||
496 | * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
497 | */ | ||
498 | private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
499 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
500 | find directInstanceOf(problem,interpretation,element,type); | ||
501 | } | ||
502 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
503 | find interpretation(problem,interpretation); | ||
504 | PartialInterpretation.scopes(interpretation,scope); | ||
505 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
506 | Scope.maxNewElements(scope,0); | ||
507 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
508 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
509 | } | ||
510 | |||
511 | /** | ||
512 | * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
513 | */ | ||
514 | private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
515 | { find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } | ||
516 | /** | ||
517 | * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
518 | */ | ||
519 | private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
520 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
521 | find directInstanceOf(problem,interpretation,element,type); | ||
522 | } | ||
523 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
524 | find interpretation(problem,interpretation); | ||
525 | PartialInterpretation.scopes(interpretation,scope); | ||
526 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
527 | Scope.maxNewElements(scope,0); | ||
528 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
529 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
530 | } | ||
531 | |||
532 | /** | ||
533 | * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
534 | */ | ||
535 | private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
536 | { | ||
537 | find interpretation(problem,interpretation); | ||
538 | PartialInterpretation.newElements(interpretation,element); | ||
539 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
540 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
541 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
542 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
543 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
544 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
545 | neg find isPrimitive(element); | ||
546 | } or { | ||
547 | find interpretation(problem,interpretation); | ||
548 | PartialInterpretation.openWorldElements(interpretation,element); | ||
549 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
550 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
551 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
552 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
553 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
554 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
555 | neg find isPrimitive(element); | ||
556 | } or | ||
557 | { find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } | ||
558 | |||
559 | ////////// | ||
560 | // 1.2 Relation Declaration Indexers | ||
561 | ////////// | ||
562 | /** | ||
563 | * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) | ||
564 | */ | ||
565 | private pattern mustInRelationinterface_reference_FunctionalElement( | ||
566 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
567 | source: DefinedElement, target:DefinedElement) | ||
568 | { | ||
569 | find interpretation(problem,interpretation); | ||
570 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
571 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); | ||
572 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
573 | BinaryElementRelationLink.param1(link,source); | ||
574 | BinaryElementRelationLink.param2(link,target); | ||
575 | } | ||
576 | /** | ||
577 | * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) | ||
578 | */ | ||
579 | private pattern mayInRelationinterface_reference_FunctionalElement( | ||
580 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
581 | source: DefinedElement, target:DefinedElement) | ||
582 | { | ||
583 | find interpretation(problem,interpretation); | ||
584 | // The two endpoint of the link have to exist | ||
585 | find mayExist(problem, interpretation, source); | ||
586 | find mayExist(problem, interpretation, target); | ||
587 | // Type consistency | ||
588 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
589 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
590 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
591 | // the upper bound of the multiplicity should be considered. | ||
592 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); | ||
593 | check(numberOfExistingReferences < 1); | ||
594 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
595 | // the upper bound of the opposite reference multiplicity should be considered. | ||
596 | numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); | ||
597 | check(numberOfExistingOppositeReferences < 1); | ||
598 | // The reference is containment, then a new reference cannot be create if: | ||
599 | // 1. Multiple parents | ||
600 | neg find mustContains4(problem,interpretation,_,target); | ||
601 | // 2. Circle in the containment hierarchy | ||
602 | neg find mustTransitiveContains(source,target); | ||
603 | } or { | ||
604 | find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); | ||
605 | } | ||
606 | /** | ||
607 | * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) | ||
608 | */ | ||
609 | private pattern mustInRelationmodel_reference_FunctionalElement( | ||
610 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
611 | source: DefinedElement, target:DefinedElement) | ||
612 | { | ||
613 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); | ||
614 | } | ||
615 | /** | ||
616 | * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) | ||
617 | */ | ||
618 | private pattern mayInRelationmodel_reference_FunctionalElement( | ||
619 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
620 | source: DefinedElement, target:DefinedElement) | ||
621 | { | ||
622 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); | ||
623 | } | ||
624 | /** | ||
625 | * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) | ||
626 | */ | ||
627 | private pattern mustInRelationparent_reference_FunctionalElement( | ||
628 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
629 | source: DefinedElement, target:DefinedElement) | ||
630 | { | ||
631 | find interpretation(problem,interpretation); | ||
632 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
633 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); | ||
634 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
635 | BinaryElementRelationLink.param1(link,source); | ||
636 | BinaryElementRelationLink.param2(link,target); | ||
637 | } | ||
638 | /** | ||
639 | * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) | ||
640 | */ | ||
641 | private pattern mayInRelationparent_reference_FunctionalElement( | ||
642 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
643 | source: DefinedElement, target:DefinedElement) | ||
644 | { | ||
645 | find interpretation(problem,interpretation); | ||
646 | // The two endpoint of the link have to exist | ||
647 | find mayExist(problem, interpretation, source); | ||
648 | find mayExist(problem, interpretation, target); | ||
649 | // Type consistency | ||
650 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
651 | find mayInstanceOfFunction_class(problem,interpretation,target); | ||
652 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
653 | // the upper bound of the multiplicity should be considered. | ||
654 | numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); | ||
655 | check(numberOfExistingReferences < 1); | ||
656 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
657 | // 1. Multiple parents | ||
658 | neg find mustContains4(problem,interpretation,source,_); | ||
659 | // 2. Circle in the containment hierarchy | ||
660 | neg find mustTransitiveContains(source,target); | ||
661 | } or { | ||
662 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); | ||
663 | } | ||
664 | /** | ||
665 | * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) | ||
666 | */ | ||
667 | private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( | ||
668 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
669 | source: DefinedElement, target:DefinedElement) | ||
670 | { | ||
671 | find interpretation(problem,interpretation); | ||
672 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
673 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
674 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
675 | BinaryElementRelationLink.param1(link,source); | ||
676 | BinaryElementRelationLink.param2(link,target); | ||
677 | } | ||
678 | /** | ||
679 | * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) | ||
680 | */ | ||
681 | private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( | ||
682 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
683 | source: DefinedElement, target:DefinedElement) | ||
684 | { | ||
685 | find interpretation(problem,interpretation); | ||
686 | // The two endpoint of the link have to exist | ||
687 | find mayExist(problem, interpretation, source); | ||
688 | find mayExist(problem, interpretation, target); | ||
689 | // Type consistency | ||
690 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); | ||
691 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
692 | // The reference is containment, then a new reference cannot be create if: | ||
693 | // 1. Multiple parents | ||
694 | neg find mustContains4(problem,interpretation,_,target); | ||
695 | // 2. Circle in the containment hierarchy | ||
696 | neg find mustTransitiveContains(source,target); | ||
697 | } or { | ||
698 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); | ||
699 | } | ||
700 | /** | ||
701 | * Matcher for detecting tuples t where []subElements reference Function(source,target) | ||
702 | */ | ||
703 | private pattern mustInRelationsubElements_reference_Function( | ||
704 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
705 | source: DefinedElement, target:DefinedElement) | ||
706 | { | ||
707 | find interpretation(problem,interpretation); | ||
708 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
709 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); | ||
710 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
711 | BinaryElementRelationLink.param1(link,source); | ||
712 | BinaryElementRelationLink.param2(link,target); | ||
713 | } | ||
714 | /** | ||
715 | * Matcher for detecting tuples t where <>subElements reference Function(source,target) | ||
716 | */ | ||
717 | private pattern mayInRelationsubElements_reference_Function( | ||
718 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
719 | source: DefinedElement, target:DefinedElement) | ||
720 | { | ||
721 | find interpretation(problem,interpretation); | ||
722 | // The two endpoint of the link have to exist | ||
723 | find mayExist(problem, interpretation, source); | ||
724 | find mayExist(problem, interpretation, target); | ||
725 | // Type consistency | ||
726 | find mayInstanceOfFunction_class(problem,interpretation,source); | ||
727 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
728 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
729 | // the upper bound of the opposite reference multiplicity should be considered. | ||
730 | numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); | ||
731 | check(numberOfExistingOppositeReferences < 1); | ||
732 | // The reference is containment, then a new reference cannot be create if: | ||
733 | // 1. Multiple parents | ||
734 | neg find mustContains4(problem,interpretation,_,target); | ||
735 | // 2. Circle in the containment hierarchy | ||
736 | neg find mustTransitiveContains(source,target); | ||
737 | } or { | ||
738 | find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); | ||
739 | } | ||
740 | /** | ||
741 | * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) | ||
742 | */ | ||
743 | private pattern mustInRelationdata_reference_FAMTerminator( | ||
744 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
745 | source: DefinedElement, target:DefinedElement) | ||
746 | { | ||
747 | find interpretation(problem,interpretation); | ||
748 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
749 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); | ||
750 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
751 | BinaryElementRelationLink.param1(link,source); | ||
752 | BinaryElementRelationLink.param2(link,target); | ||
753 | } | ||
754 | /** | ||
755 | * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) | ||
756 | */ | ||
757 | private pattern mayInRelationdata_reference_FAMTerminator( | ||
758 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
759 | source: DefinedElement, target:DefinedElement) | ||
760 | { | ||
761 | find interpretation(problem,interpretation); | ||
762 | // The two endpoint of the link have to exist | ||
763 | find mayExist(problem, interpretation, source); | ||
764 | find mayExist(problem, interpretation, target); | ||
765 | // Type consistency | ||
766 | find mayInstanceOfFAMTerminator_class(problem,interpretation,source); | ||
767 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
768 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
769 | // the upper bound of the multiplicity should be considered. | ||
770 | numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); | ||
771 | check(numberOfExistingReferences < 1); | ||
772 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
773 | // the upper bound of the opposite reference multiplicity should be considered. | ||
774 | numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); | ||
775 | check(numberOfExistingOppositeReferences < 1); | ||
776 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
777 | // 1. Multiple parents | ||
778 | neg find mustContains4(problem,interpretation,source,_); | ||
779 | // 2. Circle in the containment hierarchy | ||
780 | neg find mustTransitiveContains(source,target); | ||
781 | } or { | ||
782 | find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); | ||
783 | } | ||
784 | /** | ||
785 | * Matcher for detecting tuples t where []from reference InformationLink(source,target) | ||
786 | */ | ||
787 | private pattern mustInRelationfrom_reference_InformationLink( | ||
788 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
789 | source: DefinedElement, target:DefinedElement) | ||
790 | { | ||
791 | find interpretation(problem,interpretation); | ||
792 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
793 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); | ||
794 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
795 | BinaryElementRelationLink.param1(link,source); | ||
796 | BinaryElementRelationLink.param2(link,target); | ||
797 | } | ||
798 | /** | ||
799 | * Matcher for detecting tuples t where <>from reference InformationLink(source,target) | ||
800 | */ | ||
801 | private pattern mayInRelationfrom_reference_InformationLink( | ||
802 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
803 | source: DefinedElement, target:DefinedElement) | ||
804 | { | ||
805 | find interpretation(problem,interpretation); | ||
806 | // The two endpoint of the link have to exist | ||
807 | find mayExist(problem, interpretation, source); | ||
808 | find mayExist(problem, interpretation, target); | ||
809 | // Type consistency | ||
810 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
811 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); | ||
812 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
813 | // the upper bound of the multiplicity should be considered. | ||
814 | numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); | ||
815 | check(numberOfExistingReferences < 1); | ||
816 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
817 | // 1. Multiple parents | ||
818 | neg find mustContains4(problem,interpretation,source,_); | ||
819 | // 2. Circle in the containment hierarchy | ||
820 | neg find mustTransitiveContains(source,target); | ||
821 | } or { | ||
822 | find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); | ||
823 | } | ||
824 | /** | ||
825 | * Matcher for detecting tuples t where []to reference InformationLink(source,target) | ||
826 | */ | ||
827 | private pattern mustInRelationto_reference_InformationLink( | ||
828 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
829 | source: DefinedElement, target:DefinedElement) | ||
830 | { | ||
831 | find interpretation(problem,interpretation); | ||
832 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
833 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
834 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
835 | BinaryElementRelationLink.param1(link,source); | ||
836 | BinaryElementRelationLink.param2(link,target); | ||
837 | } | ||
838 | /** | ||
839 | * Matcher for detecting tuples t where <>to reference InformationLink(source,target) | ||
840 | */ | ||
841 | private pattern mayInRelationto_reference_InformationLink( | ||
842 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
843 | source: DefinedElement, target:DefinedElement) | ||
844 | { | ||
845 | find interpretation(problem,interpretation); | ||
846 | // The two endpoint of the link have to exist | ||
847 | find mayExist(problem, interpretation, source); | ||
848 | find mayExist(problem, interpretation, target); | ||
849 | // Type consistency | ||
850 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
851 | find mayInstanceOfFunctionalInput_class(problem,interpretation,target); | ||
852 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
853 | // the upper bound of the multiplicity should be considered. | ||
854 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); | ||
855 | check(numberOfExistingReferences < 1); | ||
856 | } or { | ||
857 | find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); | ||
858 | } | ||
859 | /** | ||
860 | * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) | ||
861 | */ | ||
862 | private pattern mustInRelationdata_reference_FunctionalInterface( | ||
863 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
864 | source: DefinedElement, target:DefinedElement) | ||
865 | { | ||
866 | find interpretation(problem,interpretation); | ||
867 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
868 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); | ||
869 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
870 | BinaryElementRelationLink.param1(link,source); | ||
871 | BinaryElementRelationLink.param2(link,target); | ||
872 | } | ||
873 | /** | ||
874 | * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) | ||
875 | */ | ||
876 | private pattern mayInRelationdata_reference_FunctionalInterface( | ||
877 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
878 | source: DefinedElement, target:DefinedElement) | ||
879 | { | ||
880 | find interpretation(problem,interpretation); | ||
881 | // The two endpoint of the link have to exist | ||
882 | find mayExist(problem, interpretation, source); | ||
883 | find mayExist(problem, interpretation, target); | ||
884 | // Type consistency | ||
885 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
886 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
887 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
888 | // the upper bound of the opposite reference multiplicity should be considered. | ||
889 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); | ||
890 | check(numberOfExistingOppositeReferences < 1); | ||
891 | // The reference is containment, then a new reference cannot be create if: | ||
892 | // 1. Multiple parents | ||
893 | neg find mustContains4(problem,interpretation,_,target); | ||
894 | // 2. Circle in the containment hierarchy | ||
895 | neg find mustTransitiveContains(source,target); | ||
896 | } or { | ||
897 | find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); | ||
898 | } | ||
899 | /** | ||
900 | * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) | ||
901 | */ | ||
902 | private pattern mustInRelationelement_reference_FunctionalInterface( | ||
903 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
904 | source: DefinedElement, target:DefinedElement) | ||
905 | { | ||
906 | find interpretation(problem,interpretation); | ||
907 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
908 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); | ||
909 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
910 | BinaryElementRelationLink.param1(link,source); | ||
911 | BinaryElementRelationLink.param2(link,target); | ||
912 | } | ||
913 | /** | ||
914 | * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) | ||
915 | */ | ||
916 | private pattern mayInRelationelement_reference_FunctionalInterface( | ||
917 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
918 | source: DefinedElement, target:DefinedElement) | ||
919 | { | ||
920 | find interpretation(problem,interpretation); | ||
921 | // The two endpoint of the link have to exist | ||
922 | find mayExist(problem, interpretation, source); | ||
923 | find mayExist(problem, interpretation, target); | ||
924 | // Type consistency | ||
925 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
926 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
927 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
928 | // the upper bound of the multiplicity should be considered. | ||
929 | numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); | ||
930 | check(numberOfExistingReferences < 1); | ||
931 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
932 | // the upper bound of the opposite reference multiplicity should be considered. | ||
933 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); | ||
934 | check(numberOfExistingOppositeReferences < 1); | ||
935 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
936 | // 1. Multiple parents | ||
937 | neg find mustContains4(problem,interpretation,source,_); | ||
938 | // 2. Circle in the containment hierarchy | ||
939 | neg find mustTransitiveContains(source,target); | ||
940 | } or { | ||
941 | find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); | ||
942 | } | ||
943 | /** | ||
944 | * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) | ||
945 | */ | ||
946 | private pattern mustInRelationIncomingLinks_reference_FunctionalInput( | ||
947 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
948 | source: DefinedElement, target:DefinedElement) | ||
949 | { | ||
950 | find interpretation(problem,interpretation); | ||
951 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
952 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
953 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
954 | BinaryElementRelationLink.param1(link,source); | ||
955 | BinaryElementRelationLink.param2(link,target); | ||
956 | } | ||
957 | /** | ||
958 | * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) | ||
959 | */ | ||
960 | private pattern mayInRelationIncomingLinks_reference_FunctionalInput( | ||
961 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
962 | source: DefinedElement, target:DefinedElement) | ||
963 | { | ||
964 | find interpretation(problem,interpretation); | ||
965 | // The two endpoint of the link have to exist | ||
966 | find mayExist(problem, interpretation, source); | ||
967 | find mayExist(problem, interpretation, target); | ||
968 | // Type consistency | ||
969 | find mayInstanceOfFunctionalInput_class(problem,interpretation,source); | ||
970 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
971 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
972 | // the upper bound of the opposite reference multiplicity should be considered. | ||
973 | numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); | ||
974 | check(numberOfExistingOppositeReferences < 1); | ||
975 | } or { | ||
976 | find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); | ||
977 | } | ||
978 | /** | ||
979 | * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) | ||
980 | */ | ||
981 | private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( | ||
982 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
983 | source: DefinedElement, target:DefinedElement) | ||
984 | { | ||
985 | find interpretation(problem,interpretation); | ||
986 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
987 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); | ||
988 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
989 | BinaryElementRelationLink.param1(link,source); | ||
990 | BinaryElementRelationLink.param2(link,target); | ||
991 | } | ||
992 | /** | ||
993 | * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) | ||
994 | */ | ||
995 | private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( | ||
996 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
997 | source: DefinedElement, target:DefinedElement) | ||
998 | { | ||
999 | find interpretation(problem,interpretation); | ||
1000 | // The two endpoint of the link have to exist | ||
1001 | find mayExist(problem, interpretation, source); | ||
1002 | find mayExist(problem, interpretation, target); | ||
1003 | // Type consistency | ||
1004 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); | ||
1005 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
1006 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
1007 | // the upper bound of the opposite reference multiplicity should be considered. | ||
1008 | numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); | ||
1009 | check(numberOfExistingOppositeReferences < 1); | ||
1010 | // The reference is containment, then a new reference cannot be create if: | ||
1011 | // 1. Multiple parents | ||
1012 | neg find mustContains4(problem,interpretation,_,target); | ||
1013 | // 2. Circle in the containment hierarchy | ||
1014 | neg find mustTransitiveContains(source,target); | ||
1015 | } or { | ||
1016 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); | ||
1017 | } | ||
1018 | /** | ||
1019 | * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) | ||
1020 | */ | ||
1021 | private pattern mustInRelationterminator_reference_FunctionalData( | ||
1022 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1023 | source: DefinedElement, target:DefinedElement) | ||
1024 | { | ||
1025 | find interpretation(problem,interpretation); | ||
1026 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
1027 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); | ||
1028 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
1029 | BinaryElementRelationLink.param1(link,source); | ||
1030 | BinaryElementRelationLink.param2(link,target); | ||
1031 | } | ||
1032 | /** | ||
1033 | * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) | ||
1034 | */ | ||
1035 | private pattern mayInRelationterminator_reference_FunctionalData( | ||
1036 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1037 | source: DefinedElement, target:DefinedElement) | ||
1038 | { | ||
1039 | find interpretation(problem,interpretation); | ||
1040 | // The two endpoint of the link have to exist | ||
1041 | find mayExist(problem, interpretation, source); | ||
1042 | find mayExist(problem, interpretation, target); | ||
1043 | // Type consistency | ||
1044 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
1045 | find mayInstanceOfFAMTerminator_class(problem,interpretation,target); | ||
1046 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
1047 | // the upper bound of the multiplicity should be considered. | ||
1048 | numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); | ||
1049 | check(numberOfExistingReferences < 1); | ||
1050 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
1051 | // the upper bound of the opposite reference multiplicity should be considered. | ||
1052 | numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); | ||
1053 | check(numberOfExistingOppositeReferences < 1); | ||
1054 | // The reference is containment, then a new reference cannot be create if: | ||
1055 | // 1. Multiple parents | ||
1056 | neg find mustContains4(problem,interpretation,_,target); | ||
1057 | // 2. Circle in the containment hierarchy | ||
1058 | neg find mustTransitiveContains(source,target); | ||
1059 | } or { | ||
1060 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); | ||
1061 | } | ||
1062 | /** | ||
1063 | * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) | ||
1064 | */ | ||
1065 | private pattern mustInRelationinterface_reference_FunctionalData( | ||
1066 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1067 | source: DefinedElement, target:DefinedElement) | ||
1068 | { | ||
1069 | find interpretation(problem,interpretation); | ||
1070 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
1071 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); | ||
1072 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
1073 | BinaryElementRelationLink.param1(link,source); | ||
1074 | BinaryElementRelationLink.param2(link,target); | ||
1075 | } | ||
1076 | /** | ||
1077 | * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) | ||
1078 | */ | ||
1079 | private pattern mayInRelationinterface_reference_FunctionalData( | ||
1080 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1081 | source: DefinedElement, target:DefinedElement) | ||
1082 | { | ||
1083 | find interpretation(problem,interpretation); | ||
1084 | // The two endpoint of the link have to exist | ||
1085 | find mayExist(problem, interpretation, source); | ||
1086 | find mayExist(problem, interpretation, target); | ||
1087 | // Type consistency | ||
1088 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
1089 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
1090 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
1091 | // the upper bound of the multiplicity should be considered. | ||
1092 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); | ||
1093 | check(numberOfExistingReferences < 1); | ||
1094 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
1095 | // 1. Multiple parents | ||
1096 | neg find mustContains4(problem,interpretation,source,_); | ||
1097 | // 2. Circle in the containment hierarchy | ||
1098 | neg find mustTransitiveContains(source,target); | ||
1099 | } or { | ||
1100 | find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); | ||
1101 | } | ||
1102 | /** | ||
1103 | * Matcher for detecting tuples t where []type attribute Function(source,target) | ||
1104 | */ | ||
1105 | private pattern mustInRelationtype_attribute_Function( | ||
1106 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1107 | source: DefinedElement, target:DefinedElement) | ||
1108 | { | ||
1109 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); | ||
1110 | } | ||
1111 | /** | ||
1112 | * Matcher for detecting tuples t where []type attribute Function(source,target) | ||
1113 | */ | ||
1114 | private pattern mayInRelationtype_attribute_Function( | ||
1115 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1116 | source: DefinedElement, target:DefinedElement) | ||
1117 | { | ||
1118 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); | ||
1119 | } | ||
1120 | |||
1121 | ////////// | ||
1122 | // 1.3 Relation Definition Indexers | ||
1123 | ////////// | ||
1124 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam terminatorAndInformation | ||
1125 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( | ||
1126 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1127 | var_T, var_I) | ||
1128 | { | ||
1129 | find interpretation(problem,interpretation); | ||
1130 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
1131 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
1132 | // T is exported | ||
1133 | // I is exported | ||
1134 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
1135 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); | ||
1136 | find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); | ||
1137 | var_virtual0 == var_I; | ||
1138 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
1139 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); | ||
1140 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
1141 | var_virtual1 == var_T; | ||
1142 | }or{ | ||
1143 | find interpretation(problem,interpretation); | ||
1144 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
1145 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
1146 | // T is exported | ||
1147 | // I is exported | ||
1148 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
1149 | find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); | ||
1150 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); | ||
1151 | var_virtual0 == var_In; | ||
1152 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); | ||
1153 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); | ||
1154 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
1155 | var_virtual1 == var_T; | ||
1156 | } | ||
1157 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( | ||
1158 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1159 | var_T, var_I) | ||
1160 | { | ||
1161 | find interpretation(problem,interpretation); | ||
1162 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
1163 | find mayInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
1164 | // T is exported | ||
1165 | // I is exported | ||
1166 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
1167 | find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); | ||
1168 | find mayInstanceOfInformationLink_class(problem,interpretation,var_virtual0); | ||
1169 | find mayEquivalent(problem, interpretation, var_virtual0, var_I); | ||
1170 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
1171 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); | ||
1172 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
1173 | find mayEquivalent(problem, interpretation, var_virtual1, var_T); | ||
1174 | }or{ | ||
1175 | find interpretation(problem,interpretation); | ||
1176 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
1177 | find mayInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
1178 | // T is exported | ||
1179 | // I is exported | ||
1180 | find mayInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
1181 | find mayInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); | ||
1182 | find mayInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); | ||
1183 | find mayEquivalent(problem, interpretation, var_virtual0, var_In); | ||
1184 | find mayInstanceOfFunctionalInput_class(problem,interpretation,var_In); | ||
1185 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); | ||
1186 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
1187 | find mayEquivalent(problem, interpretation, var_virtual1, var_T); | ||
1188 | } | ||
1189 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( | ||
1190 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1191 | var_T, var_I) | ||
1192 | { | ||
1193 | find interpretation(problem,interpretation); | ||
1194 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
1195 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
1196 | // T is exported | ||
1197 | // I is exported | ||
1198 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
1199 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); | ||
1200 | find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); | ||
1201 | var_virtual0 == var_I; | ||
1202 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
1203 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); | ||
1204 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
1205 | var_virtual1 == var_T; | ||
1206 | }or{ | ||
1207 | find interpretation(problem,interpretation); | ||
1208 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
1209 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
1210 | // T is exported | ||
1211 | // I is exported | ||
1212 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
1213 | find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); | ||
1214 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); | ||
1215 | var_virtual0 == var_In; | ||
1216 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); | ||
1217 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); | ||
1218 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
1219 | var_virtual1 == var_T; | ||
1220 | } | ||
1221 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam type | ||
1222 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( | ||
1223 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1224 | var_This, var_Target) | ||
1225 | { | ||
1226 | find interpretation(problem,interpretation); | ||
1227 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
1228 | // type constraint is enforced by construction | ||
1229 | // This is exported | ||
1230 | // Target is exported | ||
1231 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
1232 | var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); | ||
1233 | var_Target == var_virtual0; | ||
1234 | }or{ | ||
1235 | find interpretation(problem,interpretation); | ||
1236 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
1237 | // type constraint is enforced by construction | ||
1238 | // This is exported | ||
1239 | // Target is exported | ||
1240 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
1241 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
1242 | var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); | ||
1243 | var_Target == var_virtual0; | ||
1244 | }or{ | ||
1245 | find interpretation(problem,interpretation); | ||
1246 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
1247 | // type constraint is enforced by construction | ||
1248 | // This is exported | ||
1249 | // Target is exported | ||
1250 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); | ||
1251 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
1252 | var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); | ||
1253 | var_Target == var_virtual0; | ||
1254 | } | ||
1255 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( | ||
1256 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1257 | var_This, var_Target) | ||
1258 | { | ||
1259 | find interpretation(problem,interpretation); | ||
1260 | find mayInstanceOfFunction_class(problem,interpretation,var_This); | ||
1261 | // type constraint is enforced by construction | ||
1262 | // This is exported | ||
1263 | // Target is exported | ||
1264 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
1265 | var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); | ||
1266 | find mayEquivalent(problem, interpretation, var_Target, var_virtual0); | ||
1267 | }or{ | ||
1268 | find interpretation(problem,interpretation); | ||
1269 | find mayInstanceOfFunction_class(problem,interpretation,var_This); | ||
1270 | // type constraint is enforced by construction | ||
1271 | // This is exported | ||
1272 | // Target is exported | ||
1273 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
1274 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
1275 | var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); | ||
1276 | find mayEquivalent(problem, interpretation, var_Target, var_virtual0); | ||
1277 | }or{ | ||
1278 | find interpretation(problem,interpretation); | ||
1279 | find mayInstanceOfFunction_class(problem,interpretation,var_This); | ||
1280 | // type constraint is enforced by construction | ||
1281 | // This is exported | ||
1282 | // Target is exported | ||
1283 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); | ||
1284 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
1285 | var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); | ||
1286 | find mayEquivalent(problem, interpretation, var_Target, var_virtual0); | ||
1287 | } | ||
1288 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( | ||
1289 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1290 | var_This, var_Target) | ||
1291 | { | ||
1292 | find interpretation(problem,interpretation); | ||
1293 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
1294 | // type constraint is enforced by construction | ||
1295 | // This is exported | ||
1296 | // Target is exported | ||
1297 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
1298 | var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); | ||
1299 | var_Target == var_virtual0; | ||
1300 | }or{ | ||
1301 | find interpretation(problem,interpretation); | ||
1302 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
1303 | // type constraint is enforced by construction | ||
1304 | // This is exported | ||
1305 | // Target is exported | ||
1306 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
1307 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
1308 | var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); | ||
1309 | var_Target == var_virtual0; | ||
1310 | }or{ | ||
1311 | find interpretation(problem,interpretation); | ||
1312 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
1313 | // type constraint is enforced by construction | ||
1314 | // This is exported | ||
1315 | // Target is exported | ||
1316 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); | ||
1317 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
1318 | var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); | ||
1319 | var_Target == var_virtual0; | ||
1320 | } | ||
1321 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam rootElements | ||
1322 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( | ||
1323 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1324 | var_Model, var_Root) | ||
1325 | { | ||
1326 | find interpretation(problem,interpretation); | ||
1327 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
1328 | find mustInstanceOfFunction_class(problem,interpretation,var_Root); | ||
1329 | // Model is exported | ||
1330 | // Root is exported | ||
1331 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
1332 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); | ||
1333 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); | ||
1334 | var_virtual0 == var_Root; | ||
1335 | } | ||
1336 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( | ||
1337 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1338 | var_Model, var_Root) | ||
1339 | { | ||
1340 | find interpretation(problem,interpretation); | ||
1341 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
1342 | find mayInstanceOfFunction_class(problem,interpretation,var_Root); | ||
1343 | // Model is exported | ||
1344 | // Root is exported | ||
1345 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
1346 | find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); | ||
1347 | find mayInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); | ||
1348 | find mayEquivalent(problem, interpretation, var_virtual0, var_Root); | ||
1349 | } | ||
1350 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( | ||
1351 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1352 | var_Model, var_Root) | ||
1353 | { | ||
1354 | find interpretation(problem,interpretation); | ||
1355 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
1356 | find mustInstanceOfFunction_class(problem,interpretation,var_Root); | ||
1357 | // Model is exported | ||
1358 | // Root is exported | ||
1359 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
1360 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); | ||
1361 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); | ||
1362 | var_virtual0 == var_Root; | ||
1363 | } | ||
1364 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam parent | ||
1365 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( | ||
1366 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1367 | var_Func, var_Par) | ||
1368 | { | ||
1369 | find interpretation(problem,interpretation); | ||
1370 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
1371 | find mustInstanceOfFunction_class(problem,interpretation,var_Par); | ||
1372 | // Func is exported | ||
1373 | // Par is exported | ||
1374 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
1375 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); | ||
1376 | find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); | ||
1377 | var_virtual0 == var_Par; | ||
1378 | } | ||
1379 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( | ||
1380 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1381 | var_Func, var_Par) | ||
1382 | { | ||
1383 | find interpretation(problem,interpretation); | ||
1384 | find mayInstanceOfFunction_class(problem,interpretation,var_Func); | ||
1385 | find mayInstanceOfFunction_class(problem,interpretation,var_Par); | ||
1386 | // Func is exported | ||
1387 | // Par is exported | ||
1388 | find mayInstanceOfFunction_class(problem,interpretation,var_Func); | ||
1389 | find mayInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); | ||
1390 | find mayInstanceOfFunction_class(problem,interpretation,var_virtual0); | ||
1391 | find mayEquivalent(problem, interpretation, var_virtual0, var_Par); | ||
1392 | } | ||
1393 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( | ||
1394 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1395 | var_Func, var_Par) | ||
1396 | { | ||
1397 | find interpretation(problem,interpretation); | ||
1398 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
1399 | find mustInstanceOfFunction_class(problem,interpretation,var_Par); | ||
1400 | // Func is exported | ||
1401 | // Par is exported | ||
1402 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
1403 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); | ||
1404 | find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); | ||
1405 | var_virtual0 == var_Par; | ||
1406 | } | ||
1407 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam model | ||
1408 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( | ||
1409 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1410 | var_This, var_Target) | ||
1411 | { | ||
1412 | find interpretation(problem,interpretation); | ||
1413 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
1414 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
1415 | // This is exported | ||
1416 | // Target is exported | ||
1417 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
1418 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
1419 | } | ||
1420 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( | ||
1421 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1422 | var_This, var_Target) | ||
1423 | { | ||
1424 | find interpretation(problem,interpretation); | ||
1425 | find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
1426 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
1427 | // This is exported | ||
1428 | // Target is exported | ||
1429 | find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
1430 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
1431 | } | ||
1432 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( | ||
1433 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1434 | var_This, var_Target) | ||
1435 | { | ||
1436 | find interpretation(problem,interpretation); | ||
1437 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
1438 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
1439 | // This is exported | ||
1440 | // Target is exported | ||
1441 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
1442 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
1443 | } | ||
1444 | |||
1445 | ////////// | ||
1446 | // 1.4 Containment Indexer | ||
1447 | ////////// | ||
1448 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
1449 | find mustContains4(_,_,source,target); | ||
1450 | } | ||
1451 | |||
1452 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
1453 | source: DefinedElement, target: DefinedElement) | ||
1454 | { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or | ||
1455 | |||
1456 | { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or | ||
1457 | |||
1458 | { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or | ||
1459 | |||
1460 | { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or | ||
1461 | |||
1462 | { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or | ||
1463 | |||
1464 | { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } | ||
1465 | |||
1466 | private pattern mustTransitiveContains(source,target) { | ||
1467 | find mustContains2+(source,target); | ||
1468 | } | ||
1469 | |||
1470 | ////////// | ||
1471 | // 2. Invalidation Indexers | ||
1472 | ////////// | ||
1473 | // 2.1 Invalidated by WF Queries | ||
1474 | ////////// | ||
1475 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem:LogicProblem, interpretation:PartialInterpretation, | ||
1476 | var_T, var_I) | ||
1477 | { | ||
1478 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem,interpretation,var_T,var_I); | ||
1479 | } | ||
1480 | |||
1481 | ////////// | ||
1482 | // 3. Unfinishedness Indexers | ||
1483 | ////////// | ||
1484 | // 3.1 Unfinishedness Measured by Multiplicity | ||
1485 | ////////// | ||
1486 | pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
1487 | find interpretation(problem,interpretation); | ||
1488 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
1489 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
1490 | find mustInstanceOfInformationLink_class(problem,interpretation,object); | ||
1491 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); | ||
1492 | check(numberOfExistingReferences < 1); | ||
1493 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
1494 | } | ||
1495 | |||
1496 | ////////// | ||
1497 | // 3.2 Unfinishedness Measured by WF Queries | ||
1498 | ////////// | ||
1499 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem:LogicProblem, interpretation:PartialInterpretation, | ||
1500 | var_T, var_I) | ||
1501 | { | ||
1502 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem,interpretation,var_T,var_I); | ||
1503 | } | ||
1504 | |||
1505 | ////////// | ||
1506 | // 4. Refinement Indexers | ||
1507 | ////////// | ||
1508 | // 4.1 Object constructors | ||
1509 | ////////// | ||
1510 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
1511 | { | ||
1512 | find interpretation(problem,interpretation); | ||
1513 | find mustInstanceOfFunctionalElement_class(problem,interpretation,root); | ||
1514 | find mustExist(problem, interpretation, root); | ||
1515 | }or{ | ||
1516 | find interpretation(problem,interpretation); | ||
1517 | find mustInstanceOfFunctionalInput_class(problem,interpretation,root); | ||
1518 | find mustExist(problem, interpretation, root); | ||
1519 | }or{ | ||
1520 | find interpretation(problem,interpretation); | ||
1521 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); | ||
1522 | find mustExist(problem, interpretation, root); | ||
1523 | }or{ | ||
1524 | find interpretation(problem,interpretation); | ||
1525 | find mustInstanceOfInformationLink_class(problem,interpretation,root); | ||
1526 | find mustExist(problem, interpretation, root); | ||
1527 | }or{ | ||
1528 | find interpretation(problem,interpretation); | ||
1529 | find mustInstanceOfFAMTerminator_class(problem,interpretation,root); | ||
1530 | find mustExist(problem, interpretation, root); | ||
1531 | }or{ | ||
1532 | find interpretation(problem,interpretation); | ||
1533 | find mustInstanceOfFunctionalData_class(problem,interpretation,root); | ||
1534 | find mustExist(problem, interpretation, root); | ||
1535 | }or{ | ||
1536 | find interpretation(problem,interpretation); | ||
1537 | find mustInstanceOfFunction_class(problem,interpretation,root); | ||
1538 | find mustExist(problem, interpretation, root); | ||
1539 | }or{ | ||
1540 | find interpretation(problem,interpretation); | ||
1541 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); | ||
1542 | find mustExist(problem, interpretation, root); | ||
1543 | }or{ | ||
1544 | find interpretation(problem,interpretation); | ||
1545 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); | ||
1546 | find mustExist(problem, interpretation, root); | ||
1547 | }or{ | ||
1548 | find interpretation(problem,interpretation); | ||
1549 | find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); | ||
1550 | find mustExist(problem, interpretation, root); | ||
1551 | }or{ | ||
1552 | find interpretation(problem,interpretation); | ||
1553 | find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); | ||
1554 | find mustExist(problem, interpretation, root); | ||
1555 | } | ||
1556 | pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( | ||
1557 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1558 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
1559 | container:DefinedElement) | ||
1560 | { | ||
1561 | find interpretation(problem,interpretation); | ||
1562 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
1563 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
1564 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
1565 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); | ||
1566 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
1567 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); | ||
1568 | find mustInstanceOfFunctionalData_class(problem,interpretation,container); | ||
1569 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
1570 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); | ||
1571 | find mustExist(problem, interpretation, container); | ||
1572 | neg find mustExist(problem, interpretation, newObject); | ||
1573 | } | ||
1574 | pattern createObject_FAMTerminator_class( | ||
1575 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1576 | typeInterpretation:PartialComplexTypeInterpretation) | ||
1577 | { | ||
1578 | find interpretation(problem,interpretation); | ||
1579 | neg find hasElementInContainment(problem,interpretation); | ||
1580 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
1581 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
1582 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
1583 | find mayExist(problem, interpretation, newObject); | ||
1584 | neg find mustExist(problem, interpretation, newObject); | ||
1585 | } | ||
1586 | pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
1587 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1588 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
1589 | container:DefinedElement) | ||
1590 | { | ||
1591 | find interpretation(problem,interpretation); | ||
1592 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
1593 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
1594 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
1595 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
1596 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
1597 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
1598 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
1599 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
1600 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
1601 | find mustExist(problem, interpretation, container); | ||
1602 | neg find mustExist(problem, interpretation, newObject); | ||
1603 | } | ||
1604 | pattern createObject_FunctionalInput_class( | ||
1605 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1606 | typeInterpretation:PartialComplexTypeInterpretation) | ||
1607 | { | ||
1608 | find interpretation(problem,interpretation); | ||
1609 | neg find hasElementInContainment(problem,interpretation); | ||
1610 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
1611 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
1612 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
1613 | find mayExist(problem, interpretation, newObject); | ||
1614 | neg find mustExist(problem, interpretation, newObject); | ||
1615 | } | ||
1616 | pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( | ||
1617 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1618 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
1619 | container:DefinedElement) | ||
1620 | { | ||
1621 | find interpretation(problem,interpretation); | ||
1622 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
1623 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
1624 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
1625 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); | ||
1626 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
1627 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); | ||
1628 | find mustInstanceOfFunctionalElement_class(problem,interpretation,container); | ||
1629 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
1630 | find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); | ||
1631 | find mustExist(problem, interpretation, container); | ||
1632 | neg find mustExist(problem, interpretation, newObject); | ||
1633 | } | ||
1634 | pattern createObject_FunctionalInterface_class( | ||
1635 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1636 | typeInterpretation:PartialComplexTypeInterpretation) | ||
1637 | { | ||
1638 | find interpretation(problem,interpretation); | ||
1639 | neg find hasElementInContainment(problem,interpretation); | ||
1640 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
1641 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
1642 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
1643 | find mayExist(problem, interpretation, newObject); | ||
1644 | neg find mustExist(problem, interpretation, newObject); | ||
1645 | } | ||
1646 | pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
1647 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1648 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
1649 | container:DefinedElement) | ||
1650 | { | ||
1651 | find interpretation(problem,interpretation); | ||
1652 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
1653 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
1654 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
1655 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
1656 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
1657 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
1658 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
1659 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
1660 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
1661 | find mustExist(problem, interpretation, container); | ||
1662 | neg find mustExist(problem, interpretation, newObject); | ||
1663 | } | ||
1664 | pattern createObject_FunctionalOutput_class( | ||
1665 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1666 | typeInterpretation:PartialComplexTypeInterpretation) | ||
1667 | { | ||
1668 | find interpretation(problem,interpretation); | ||
1669 | neg find hasElementInContainment(problem,interpretation); | ||
1670 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
1671 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
1672 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
1673 | find mayExist(problem, interpretation, newObject); | ||
1674 | neg find mustExist(problem, interpretation, newObject); | ||
1675 | } | ||
1676 | pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( | ||
1677 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1678 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
1679 | container:DefinedElement) | ||
1680 | { | ||
1681 | find interpretation(problem,interpretation); | ||
1682 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
1683 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
1684 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
1685 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); | ||
1686 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
1687 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); | ||
1688 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); | ||
1689 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
1690 | find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); | ||
1691 | find mustExist(problem, interpretation, container); | ||
1692 | neg find mustExist(problem, interpretation, newObject); | ||
1693 | } | ||
1694 | pattern createObject_InformationLink_class( | ||
1695 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1696 | typeInterpretation:PartialComplexTypeInterpretation) | ||
1697 | { | ||
1698 | find interpretation(problem,interpretation); | ||
1699 | neg find hasElementInContainment(problem,interpretation); | ||
1700 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
1701 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
1702 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
1703 | find mayExist(problem, interpretation, newObject); | ||
1704 | neg find mustExist(problem, interpretation, newObject); | ||
1705 | } | ||
1706 | pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( | ||
1707 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1708 | typeInterpretation:PartialComplexTypeInterpretation) | ||
1709 | { | ||
1710 | find interpretation(problem,interpretation); | ||
1711 | neg find hasElementInContainment(problem,interpretation); | ||
1712 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
1713 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); | ||
1714 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); | ||
1715 | find mayExist(problem, interpretation, newObject); | ||
1716 | neg find mustExist(problem, interpretation, newObject); | ||
1717 | } | ||
1718 | pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( | ||
1719 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1720 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
1721 | container:DefinedElement) | ||
1722 | { | ||
1723 | find interpretation(problem,interpretation); | ||
1724 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
1725 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
1726 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
1727 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
1728 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); | ||
1729 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
1730 | find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); | ||
1731 | find mustExist(problem, interpretation, container); | ||
1732 | neg find mustExist(problem, interpretation, newObject); | ||
1733 | } | ||
1734 | pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( | ||
1735 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1736 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
1737 | container:DefinedElement) | ||
1738 | { | ||
1739 | find interpretation(problem,interpretation); | ||
1740 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
1741 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
1742 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
1743 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); | ||
1744 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
1745 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); | ||
1746 | find mustInstanceOfFunction_class(problem,interpretation,container); | ||
1747 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
1748 | find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); | ||
1749 | find mustExist(problem, interpretation, container); | ||
1750 | neg find mustExist(problem, interpretation, newObject); | ||
1751 | } | ||
1752 | pattern createObject_Function_class( | ||
1753 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1754 | typeInterpretation:PartialComplexTypeInterpretation) | ||
1755 | { | ||
1756 | find interpretation(problem,interpretation); | ||
1757 | neg find hasElementInContainment(problem,interpretation); | ||
1758 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
1759 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
1760 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
1761 | find mayExist(problem, interpretation, newObject); | ||
1762 | neg find mustExist(problem, interpretation, newObject); | ||
1763 | } | ||
1764 | |||
1765 | ////////// | ||
1766 | // 4.2 Type refinement | ||
1767 | ////////// | ||
1768 | pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
1769 | find interpretation(problem,interpretation); | ||
1770 | PartialInterpretation.newElements(interpretation,element); | ||
1771 | find mayInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
1772 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
1773 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
1774 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
1775 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
1776 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
1777 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
1778 | } | ||
1779 | pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
1780 | find interpretation(problem,interpretation); | ||
1781 | PartialInterpretation.newElements(interpretation,element); | ||
1782 | find mayInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
1783 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
1784 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
1785 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
1786 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
1787 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
1788 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
1789 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
1790 | } | ||
1791 | pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
1792 | find interpretation(problem,interpretation); | ||
1793 | PartialInterpretation.newElements(interpretation,element); | ||
1794 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
1795 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
1796 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
1797 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
1798 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
1799 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
1800 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
1801 | } | ||
1802 | pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
1803 | find interpretation(problem,interpretation); | ||
1804 | PartialInterpretation.newElements(interpretation,element); | ||
1805 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
1806 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
1807 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
1808 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
1809 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
1810 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
1811 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
1812 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
1813 | } | ||
1814 | pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
1815 | find interpretation(problem,interpretation); | ||
1816 | PartialInterpretation.newElements(interpretation,element); | ||
1817 | find mayInstanceOfInformationLink_class(problem,interpretation,element); | ||
1818 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
1819 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
1820 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
1821 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
1822 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
1823 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
1824 | } | ||
1825 | pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
1826 | find interpretation(problem,interpretation); | ||
1827 | PartialInterpretation.newElements(interpretation,element); | ||
1828 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
1829 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
1830 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
1831 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
1832 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
1833 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
1834 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
1835 | } | ||
1836 | pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
1837 | find interpretation(problem,interpretation); | ||
1838 | PartialInterpretation.newElements(interpretation,element); | ||
1839 | find mayInstanceOfFunction_class(problem,interpretation,element); | ||
1840 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
1841 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
1842 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
1843 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
1844 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
1845 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
1846 | } | ||
1847 | |||
1848 | ////////// | ||
1849 | // 4.3 Relation refinement | ||
1850 | ////////// | ||
1851 | pattern refineRelation_model_reference_FunctionalElement( | ||
1852 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1853 | relationIterpretation:PartialRelationInterpretation, | ||
1854 | from: DefinedElement, to: DefinedElement) | ||
1855 | { | ||
1856 | find interpretation(problem,interpretation); | ||
1857 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
1858 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
1859 | find mustExist(problem, interpretation, from); | ||
1860 | find mustExist(problem, interpretation, to); | ||
1861 | find mustInstanceOfFunctionalElement_class(problem,interpretation,from); | ||
1862 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); | ||
1863 | find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
1864 | neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
1865 | } | ||
1866 | pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( | ||
1867 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1868 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
1869 | from: DefinedElement, to: DefinedElement) | ||
1870 | { | ||
1871 | find interpretation(problem,interpretation); | ||
1872 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
1873 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
1874 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
1875 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); | ||
1876 | find mustExist(problem, interpretation, from); | ||
1877 | find mustExist(problem, interpretation, to); | ||
1878 | find mustInstanceOfFunctionalInput_class(problem,interpretation,from); | ||
1879 | find mustInstanceOfInformationLink_class(problem,interpretation,to); | ||
1880 | find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
1881 | neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
1882 | } | ||
1883 | pattern refineRelation_type_attribute_Function( | ||
1884 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1885 | relationIterpretation:PartialRelationInterpretation, | ||
1886 | from: DefinedElement, to: DefinedElement) | ||
1887 | { | ||
1888 | find interpretation(problem,interpretation); | ||
1889 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
1890 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
1891 | find mustExist(problem, interpretation, from); | ||
1892 | find mustExist(problem, interpretation, to); | ||
1893 | find mustInstanceOfFunction_class(problem,interpretation,from); | ||
1894 | find mustInstanceOfFunctionType_enum(problem,interpretation,to); | ||
1895 | find mayInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
1896 | neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
1897 | }import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
1898 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
1899 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
1900 | |||
1901 | ////////// | ||
1902 | // 0. Util | ||
1903 | ////////// | ||
1904 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
1905 | PartialInterpretation.problem(interpretation,problem); | ||
1906 | } | ||
1907 | |||
1908 | ///////////////////////// | ||
1909 | // 0.1 Existence | ||
1910 | ///////////////////////// | ||
1911 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
1912 | find interpretation(problem,interpretation); | ||
1913 | LogicProblem.elements(problem,element); | ||
1914 | } or { | ||
1915 | find interpretation(problem,interpretation); | ||
1916 | PartialInterpretation.newElements(interpretation,element); | ||
1917 | } | ||
1918 | |||
1919 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
1920 | find mustExist(problem,interpretation,element); | ||
1921 | } or { | ||
1922 | find interpretation(problem,interpretation); | ||
1923 | neg find elementCloseWorld(element); | ||
1924 | PartialInterpretation.openWorldElements(interpretation,element); | ||
1925 | } | ||
1926 | |||
1927 | private pattern elementCloseWorld(element:DefinedElement) { | ||
1928 | PartialInterpretation.openWorldElements(i,element); | ||
1929 | PartialInterpretation.maxNewElements(i,0); | ||
1930 | } or { | ||
1931 | Scope.targetTypeInterpretation(scope,interpretation); | ||
1932 | PartialTypeInterpratation.elements(interpretation,element); | ||
1933 | Scope.maxNewElements(scope,0); | ||
1934 | } | ||
1935 | |||
1936 | //////////////////////// | ||
1937 | // 0.2 Equivalence | ||
1938 | //////////////////////// | ||
1939 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
1940 | find mayExist(problem,interpretation,a); | ||
1941 | find mayExist(problem,interpretation,b); | ||
1942 | a == b; | ||
1943 | } | ||
1944 | |||
1945 | //////////////////////// | ||
1946 | // 0.3 Required Patterns by TypeIndexer | ||
1947 | //////////////////////// | ||
1948 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
1949 | find interpretation(problem,interpretation); | ||
1950 | LogicProblem.types(problem,type); | ||
1951 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
1952 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
1953 | } | ||
1954 | |||
1955 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
1956 | find interpretation(problem,interpretation); | ||
1957 | LogicProblem.types(problem,type); | ||
1958 | TypeDefinition.elements(type,element); | ||
1959 | } or { | ||
1960 | find interpretation(problem,interpretation); | ||
1961 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
1962 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
1963 | } | ||
1964 | |||
1965 | private pattern isPrimitive(element: PrimitiveElement) { | ||
1966 | PrimitiveElement(element); | ||
1967 | } | ||
1968 | |||
1969 | ////////// | ||
1970 | // 1. Problem-Specific Base Indexers | ||
1971 | ////////// | ||
1972 | // 1.1 Type Indexers | ||
1973 | ////////// | ||
1974 | // 1.1.1 primitive Type Indexers | ||
1975 | ////////// | ||
1976 | |||
1977 | ////////// | ||
1978 | // 1.1.2 domain-specific Type Indexers | ||
1979 | ////////// | ||
1980 | /** | ||
1981 | * An element must be an instance of type "FunctionalElement class". | ||
1982 | */ | ||
1983 | private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
1984 | Type.name(type,"FunctionalElement class"); | ||
1985 | find directInstanceOf(problem,interpretation,element,type); | ||
1986 | } | ||
1987 | private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
1988 | find interpretation(problem,interpretation); | ||
1989 | PartialInterpretation.scopes(interpretation,scope); | ||
1990 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
1991 | Scope.maxNewElements(scope,0); | ||
1992 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
1993 | Type.name(type,"FunctionalElement class"); | ||
1994 | } | ||
1995 | |||
1996 | /** | ||
1997 | * An element may be an instance of type "FunctionalElement class". | ||
1998 | */ | ||
1999 | private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
2000 | { | ||
2001 | find interpretation(problem,interpretation); | ||
2002 | PartialInterpretation.newElements(interpretation,element); | ||
2003 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
2004 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
2005 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
2006 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
2007 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
2008 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
2009 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
2010 | neg find isPrimitive(element); | ||
2011 | } or { | ||
2012 | find interpretation(problem,interpretation); | ||
2013 | PartialInterpretation.openWorldElements(interpretation,element); | ||
2014 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
2015 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
2016 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
2017 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
2018 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
2019 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
2020 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
2021 | neg find isPrimitive(element); | ||
2022 | } or | ||
2023 | { find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } | ||
2024 | /** | ||
2025 | * An element must be an instance of type "FunctionalArchitectureModel class". | ||
2026 | */ | ||
2027 | private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
2028 | Type.name(type,"FunctionalArchitectureModel class"); | ||
2029 | find directInstanceOf(problem,interpretation,element,type); | ||
2030 | } | ||
2031 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
2032 | find interpretation(problem,interpretation); | ||
2033 | PartialInterpretation.scopes(interpretation,scope); | ||
2034 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
2035 | Scope.maxNewElements(scope,0); | ||
2036 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
2037 | Type.name(type,"FunctionalArchitectureModel class"); | ||
2038 | } | ||
2039 | |||
2040 | /** | ||
2041 | * An element may be an instance of type "FunctionalArchitectureModel class". | ||
2042 | */ | ||
2043 | private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
2044 | { | ||
2045 | find interpretation(problem,interpretation); | ||
2046 | PartialInterpretation.newElements(interpretation,element); | ||
2047 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
2048 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
2049 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
2050 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
2051 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
2052 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
2053 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
2054 | neg find isPrimitive(element); | ||
2055 | } or { | ||
2056 | find interpretation(problem,interpretation); | ||
2057 | PartialInterpretation.openWorldElements(interpretation,element); | ||
2058 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
2059 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
2060 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
2061 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
2062 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
2063 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
2064 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
2065 | neg find isPrimitive(element); | ||
2066 | } or | ||
2067 | { find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } | ||
2068 | /** | ||
2069 | * An element must be an instance of type "Function class". | ||
2070 | */ | ||
2071 | private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
2072 | Type.name(type,"Function class"); | ||
2073 | find directInstanceOf(problem,interpretation,element,type); | ||
2074 | } | ||
2075 | private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
2076 | find interpretation(problem,interpretation); | ||
2077 | PartialInterpretation.scopes(interpretation,scope); | ||
2078 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
2079 | Scope.maxNewElements(scope,0); | ||
2080 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
2081 | Type.name(type,"Function class"); | ||
2082 | } | ||
2083 | |||
2084 | /** | ||
2085 | * An element may be an instance of type "Function class". | ||
2086 | */ | ||
2087 | private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
2088 | { | ||
2089 | find interpretation(problem,interpretation); | ||
2090 | PartialInterpretation.newElements(interpretation,element); | ||
2091 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
2092 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
2093 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
2094 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
2095 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
2096 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
2097 | neg find isPrimitive(element); | ||
2098 | } or { | ||
2099 | find interpretation(problem,interpretation); | ||
2100 | PartialInterpretation.openWorldElements(interpretation,element); | ||
2101 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
2102 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
2103 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
2104 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
2105 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
2106 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
2107 | neg find isPrimitive(element); | ||
2108 | } or | ||
2109 | { find mustInstanceOfFunction_class(problem,interpretation,element); } | ||
2110 | /** | ||
2111 | * An element must be an instance of type "FAMTerminator class". | ||
2112 | */ | ||
2113 | private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
2114 | Type.name(type,"FAMTerminator class"); | ||
2115 | find directInstanceOf(problem,interpretation,element,type); | ||
2116 | } | ||
2117 | private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
2118 | find interpretation(problem,interpretation); | ||
2119 | PartialInterpretation.scopes(interpretation,scope); | ||
2120 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
2121 | Scope.maxNewElements(scope,0); | ||
2122 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
2123 | Type.name(type,"FAMTerminator class"); | ||
2124 | } | ||
2125 | |||
2126 | /** | ||
2127 | * An element may be an instance of type "FAMTerminator class". | ||
2128 | */ | ||
2129 | private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
2130 | { | ||
2131 | find interpretation(problem,interpretation); | ||
2132 | PartialInterpretation.newElements(interpretation,element); | ||
2133 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
2134 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
2135 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
2136 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
2137 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
2138 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
2139 | neg find isPrimitive(element); | ||
2140 | } or { | ||
2141 | find interpretation(problem,interpretation); | ||
2142 | PartialInterpretation.openWorldElements(interpretation,element); | ||
2143 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
2144 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
2145 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
2146 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
2147 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
2148 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
2149 | neg find isPrimitive(element); | ||
2150 | } or | ||
2151 | { find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } | ||
2152 | /** | ||
2153 | * An element must be an instance of type "InformationLink class". | ||
2154 | */ | ||
2155 | private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
2156 | Type.name(type,"InformationLink class"); | ||
2157 | find directInstanceOf(problem,interpretation,element,type); | ||
2158 | } | ||
2159 | private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
2160 | find interpretation(problem,interpretation); | ||
2161 | PartialInterpretation.scopes(interpretation,scope); | ||
2162 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
2163 | Scope.maxNewElements(scope,0); | ||
2164 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
2165 | Type.name(type,"InformationLink class"); | ||
2166 | } | ||
2167 | |||
2168 | /** | ||
2169 | * An element may be an instance of type "InformationLink class". | ||
2170 | */ | ||
2171 | private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
2172 | { | ||
2173 | find interpretation(problem,interpretation); | ||
2174 | PartialInterpretation.newElements(interpretation,element); | ||
2175 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
2176 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
2177 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
2178 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
2179 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
2180 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
2181 | neg find isPrimitive(element); | ||
2182 | } or { | ||
2183 | find interpretation(problem,interpretation); | ||
2184 | PartialInterpretation.openWorldElements(interpretation,element); | ||
2185 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
2186 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
2187 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
2188 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
2189 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
2190 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
2191 | neg find isPrimitive(element); | ||
2192 | } or | ||
2193 | { find mustInstanceOfInformationLink_class(problem,interpretation,element); } | ||
2194 | /** | ||
2195 | * An element must be an instance of type "FunctionalInterface class". | ||
2196 | */ | ||
2197 | private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
2198 | Type.name(type,"FunctionalInterface class"); | ||
2199 | find directInstanceOf(problem,interpretation,element,type); | ||
2200 | } | ||
2201 | private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
2202 | find interpretation(problem,interpretation); | ||
2203 | PartialInterpretation.scopes(interpretation,scope); | ||
2204 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
2205 | Scope.maxNewElements(scope,0); | ||
2206 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
2207 | Type.name(type,"FunctionalInterface class"); | ||
2208 | } | ||
2209 | |||
2210 | /** | ||
2211 | * An element may be an instance of type "FunctionalInterface class". | ||
2212 | */ | ||
2213 | private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
2214 | { | ||
2215 | find interpretation(problem,interpretation); | ||
2216 | PartialInterpretation.newElements(interpretation,element); | ||
2217 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
2218 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
2219 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
2220 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
2221 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
2222 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
2223 | neg find isPrimitive(element); | ||
2224 | } or { | ||
2225 | find interpretation(problem,interpretation); | ||
2226 | PartialInterpretation.openWorldElements(interpretation,element); | ||
2227 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
2228 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
2229 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
2230 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
2231 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
2232 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
2233 | neg find isPrimitive(element); | ||
2234 | } or | ||
2235 | { find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } | ||
2236 | /** | ||
2237 | * An element must be an instance of type "FunctionalInput class". | ||
2238 | */ | ||
2239 | private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
2240 | Type.name(type,"FunctionalInput class"); | ||
2241 | find directInstanceOf(problem,interpretation,element,type); | ||
2242 | } | ||
2243 | private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
2244 | find interpretation(problem,interpretation); | ||
2245 | PartialInterpretation.scopes(interpretation,scope); | ||
2246 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
2247 | Scope.maxNewElements(scope,0); | ||
2248 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
2249 | Type.name(type,"FunctionalInput class"); | ||
2250 | } | ||
2251 | |||
2252 | /** | ||
2253 | * An element may be an instance of type "FunctionalInput class". | ||
2254 | */ | ||
2255 | private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
2256 | { | ||
2257 | find interpretation(problem,interpretation); | ||
2258 | PartialInterpretation.newElements(interpretation,element); | ||
2259 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
2260 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
2261 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
2262 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
2263 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
2264 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
2265 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
2266 | neg find isPrimitive(element); | ||
2267 | } or { | ||
2268 | find interpretation(problem,interpretation); | ||
2269 | PartialInterpretation.openWorldElements(interpretation,element); | ||
2270 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
2271 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
2272 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
2273 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
2274 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
2275 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
2276 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
2277 | neg find isPrimitive(element); | ||
2278 | } or | ||
2279 | { find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } | ||
2280 | /** | ||
2281 | * An element must be an instance of type "FunctionalOutput class". | ||
2282 | */ | ||
2283 | private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
2284 | Type.name(type,"FunctionalOutput class"); | ||
2285 | find directInstanceOf(problem,interpretation,element,type); | ||
2286 | } | ||
2287 | private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
2288 | find interpretation(problem,interpretation); | ||
2289 | PartialInterpretation.scopes(interpretation,scope); | ||
2290 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
2291 | Scope.maxNewElements(scope,0); | ||
2292 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
2293 | Type.name(type,"FunctionalOutput class"); | ||
2294 | } | ||
2295 | |||
2296 | /** | ||
2297 | * An element may be an instance of type "FunctionalOutput class". | ||
2298 | */ | ||
2299 | private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
2300 | { | ||
2301 | find interpretation(problem,interpretation); | ||
2302 | PartialInterpretation.newElements(interpretation,element); | ||
2303 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
2304 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
2305 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
2306 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
2307 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
2308 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
2309 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
2310 | neg find isPrimitive(element); | ||
2311 | } or { | ||
2312 | find interpretation(problem,interpretation); | ||
2313 | PartialInterpretation.openWorldElements(interpretation,element); | ||
2314 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
2315 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
2316 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
2317 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
2318 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
2319 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
2320 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
2321 | neg find isPrimitive(element); | ||
2322 | } or | ||
2323 | { find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } | ||
2324 | /** | ||
2325 | * An element must be an instance of type "FunctionalData class". | ||
2326 | */ | ||
2327 | private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
2328 | Type.name(type,"FunctionalData class"); | ||
2329 | find directInstanceOf(problem,interpretation,element,type); | ||
2330 | } | ||
2331 | private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
2332 | find interpretation(problem,interpretation); | ||
2333 | PartialInterpretation.scopes(interpretation,scope); | ||
2334 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
2335 | Scope.maxNewElements(scope,0); | ||
2336 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
2337 | Type.name(type,"FunctionalData class"); | ||
2338 | } | ||
2339 | |||
2340 | /** | ||
2341 | * An element may be an instance of type "FunctionalData class". | ||
2342 | */ | ||
2343 | private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
2344 | { | ||
2345 | find interpretation(problem,interpretation); | ||
2346 | PartialInterpretation.newElements(interpretation,element); | ||
2347 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
2348 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
2349 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
2350 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
2351 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
2352 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
2353 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
2354 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
2355 | neg find isPrimitive(element); | ||
2356 | } or { | ||
2357 | find interpretation(problem,interpretation); | ||
2358 | PartialInterpretation.openWorldElements(interpretation,element); | ||
2359 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
2360 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
2361 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
2362 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
2363 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
2364 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
2365 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
2366 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
2367 | neg find isPrimitive(element); | ||
2368 | } or | ||
2369 | { find mustInstanceOfFunctionalData_class(problem,interpretation,element); } | ||
2370 | /** | ||
2371 | * An element must be an instance of type "FunctionType enum". | ||
2372 | */ | ||
2373 | private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
2374 | Type.name(type,"FunctionType enum"); | ||
2375 | find directInstanceOf(problem,interpretation,element,type); | ||
2376 | } | ||
2377 | private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
2378 | find interpretation(problem,interpretation); | ||
2379 | PartialInterpretation.scopes(interpretation,scope); | ||
2380 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
2381 | Scope.maxNewElements(scope,0); | ||
2382 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
2383 | Type.name(type,"FunctionType enum"); | ||
2384 | } | ||
2385 | |||
2386 | /** | ||
2387 | * An element may be an instance of type "FunctionType enum". | ||
2388 | */ | ||
2389 | private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
2390 | { find mustInstanceOfFunctionType_enum(problem,interpretation,element); } | ||
2391 | /** | ||
2392 | * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
2393 | */ | ||
2394 | private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
2395 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
2396 | find directInstanceOf(problem,interpretation,element,type); | ||
2397 | } | ||
2398 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
2399 | find interpretation(problem,interpretation); | ||
2400 | PartialInterpretation.scopes(interpretation,scope); | ||
2401 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
2402 | Scope.maxNewElements(scope,0); | ||
2403 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
2404 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
2405 | } | ||
2406 | |||
2407 | /** | ||
2408 | * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
2409 | */ | ||
2410 | private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
2411 | { find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } | ||
2412 | /** | ||
2413 | * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
2414 | */ | ||
2415 | private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
2416 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
2417 | find directInstanceOf(problem,interpretation,element,type); | ||
2418 | } | ||
2419 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
2420 | find interpretation(problem,interpretation); | ||
2421 | PartialInterpretation.scopes(interpretation,scope); | ||
2422 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
2423 | Scope.maxNewElements(scope,0); | ||
2424 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
2425 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
2426 | } | ||
2427 | |||
2428 | /** | ||
2429 | * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
2430 | */ | ||
2431 | private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
2432 | { | ||
2433 | find interpretation(problem,interpretation); | ||
2434 | PartialInterpretation.newElements(interpretation,element); | ||
2435 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
2436 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
2437 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
2438 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
2439 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
2440 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
2441 | neg find isPrimitive(element); | ||
2442 | } or { | ||
2443 | find interpretation(problem,interpretation); | ||
2444 | PartialInterpretation.openWorldElements(interpretation,element); | ||
2445 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
2446 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
2447 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
2448 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
2449 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
2450 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
2451 | neg find isPrimitive(element); | ||
2452 | } or | ||
2453 | { find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } | ||
2454 | |||
2455 | ////////// | ||
2456 | // 1.2 Relation Declaration Indexers | ||
2457 | ////////// | ||
2458 | /** | ||
2459 | * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) | ||
2460 | */ | ||
2461 | private pattern mustInRelationinterface_reference_FunctionalElement( | ||
2462 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2463 | source: DefinedElement, target:DefinedElement) | ||
2464 | { | ||
2465 | find interpretation(problem,interpretation); | ||
2466 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2467 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); | ||
2468 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
2469 | BinaryElementRelationLink.param1(link,source); | ||
2470 | BinaryElementRelationLink.param2(link,target); | ||
2471 | } | ||
2472 | /** | ||
2473 | * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) | ||
2474 | */ | ||
2475 | private pattern mayInRelationinterface_reference_FunctionalElement( | ||
2476 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2477 | source: DefinedElement, target:DefinedElement) | ||
2478 | { | ||
2479 | find interpretation(problem,interpretation); | ||
2480 | // The two endpoint of the link have to exist | ||
2481 | find mayExist(problem, interpretation, source); | ||
2482 | find mayExist(problem, interpretation, target); | ||
2483 | // Type consistency | ||
2484 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
2485 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
2486 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
2487 | // the upper bound of the multiplicity should be considered. | ||
2488 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); | ||
2489 | check(numberOfExistingReferences < 1); | ||
2490 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
2491 | // the upper bound of the opposite reference multiplicity should be considered. | ||
2492 | numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); | ||
2493 | check(numberOfExistingOppositeReferences < 1); | ||
2494 | // The reference is containment, then a new reference cannot be create if: | ||
2495 | // 1. Multiple parents | ||
2496 | neg find mustContains4(problem,interpretation,_,target); | ||
2497 | // 2. Circle in the containment hierarchy | ||
2498 | neg find mustTransitiveContains(source,target); | ||
2499 | } or { | ||
2500 | find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); | ||
2501 | } | ||
2502 | /** | ||
2503 | * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) | ||
2504 | */ | ||
2505 | private pattern mustInRelationmodel_reference_FunctionalElement( | ||
2506 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2507 | source: DefinedElement, target:DefinedElement) | ||
2508 | { | ||
2509 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); | ||
2510 | } | ||
2511 | /** | ||
2512 | * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) | ||
2513 | */ | ||
2514 | private pattern mayInRelationmodel_reference_FunctionalElement( | ||
2515 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2516 | source: DefinedElement, target:DefinedElement) | ||
2517 | { | ||
2518 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); | ||
2519 | } | ||
2520 | /** | ||
2521 | * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) | ||
2522 | */ | ||
2523 | private pattern mustInRelationparent_reference_FunctionalElement( | ||
2524 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2525 | source: DefinedElement, target:DefinedElement) | ||
2526 | { | ||
2527 | find interpretation(problem,interpretation); | ||
2528 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2529 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); | ||
2530 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
2531 | BinaryElementRelationLink.param1(link,source); | ||
2532 | BinaryElementRelationLink.param2(link,target); | ||
2533 | } | ||
2534 | /** | ||
2535 | * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) | ||
2536 | */ | ||
2537 | private pattern mayInRelationparent_reference_FunctionalElement( | ||
2538 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2539 | source: DefinedElement, target:DefinedElement) | ||
2540 | { | ||
2541 | find interpretation(problem,interpretation); | ||
2542 | // The two endpoint of the link have to exist | ||
2543 | find mayExist(problem, interpretation, source); | ||
2544 | find mayExist(problem, interpretation, target); | ||
2545 | // Type consistency | ||
2546 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
2547 | find mayInstanceOfFunction_class(problem,interpretation,target); | ||
2548 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
2549 | // the upper bound of the multiplicity should be considered. | ||
2550 | numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); | ||
2551 | check(numberOfExistingReferences < 1); | ||
2552 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
2553 | // 1. Multiple parents | ||
2554 | neg find mustContains4(problem,interpretation,source,_); | ||
2555 | // 2. Circle in the containment hierarchy | ||
2556 | neg find mustTransitiveContains(source,target); | ||
2557 | } or { | ||
2558 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); | ||
2559 | } | ||
2560 | /** | ||
2561 | * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) | ||
2562 | */ | ||
2563 | private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( | ||
2564 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2565 | source: DefinedElement, target:DefinedElement) | ||
2566 | { | ||
2567 | find interpretation(problem,interpretation); | ||
2568 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2569 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
2570 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
2571 | BinaryElementRelationLink.param1(link,source); | ||
2572 | BinaryElementRelationLink.param2(link,target); | ||
2573 | } | ||
2574 | /** | ||
2575 | * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) | ||
2576 | */ | ||
2577 | private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( | ||
2578 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2579 | source: DefinedElement, target:DefinedElement) | ||
2580 | { | ||
2581 | find interpretation(problem,interpretation); | ||
2582 | // The two endpoint of the link have to exist | ||
2583 | find mayExist(problem, interpretation, source); | ||
2584 | find mayExist(problem, interpretation, target); | ||
2585 | // Type consistency | ||
2586 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); | ||
2587 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
2588 | // The reference is containment, then a new reference cannot be create if: | ||
2589 | // 1. Multiple parents | ||
2590 | neg find mustContains4(problem,interpretation,_,target); | ||
2591 | // 2. Circle in the containment hierarchy | ||
2592 | neg find mustTransitiveContains(source,target); | ||
2593 | } or { | ||
2594 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); | ||
2595 | } | ||
2596 | /** | ||
2597 | * Matcher for detecting tuples t where []subElements reference Function(source,target) | ||
2598 | */ | ||
2599 | private pattern mustInRelationsubElements_reference_Function( | ||
2600 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2601 | source: DefinedElement, target:DefinedElement) | ||
2602 | { | ||
2603 | find interpretation(problem,interpretation); | ||
2604 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2605 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); | ||
2606 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
2607 | BinaryElementRelationLink.param1(link,source); | ||
2608 | BinaryElementRelationLink.param2(link,target); | ||
2609 | } | ||
2610 | /** | ||
2611 | * Matcher for detecting tuples t where <>subElements reference Function(source,target) | ||
2612 | */ | ||
2613 | private pattern mayInRelationsubElements_reference_Function( | ||
2614 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2615 | source: DefinedElement, target:DefinedElement) | ||
2616 | { | ||
2617 | find interpretation(problem,interpretation); | ||
2618 | // The two endpoint of the link have to exist | ||
2619 | find mayExist(problem, interpretation, source); | ||
2620 | find mayExist(problem, interpretation, target); | ||
2621 | // Type consistency | ||
2622 | find mayInstanceOfFunction_class(problem,interpretation,source); | ||
2623 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
2624 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
2625 | // the upper bound of the opposite reference multiplicity should be considered. | ||
2626 | numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); | ||
2627 | check(numberOfExistingOppositeReferences < 1); | ||
2628 | // The reference is containment, then a new reference cannot be create if: | ||
2629 | // 1. Multiple parents | ||
2630 | neg find mustContains4(problem,interpretation,_,target); | ||
2631 | // 2. Circle in the containment hierarchy | ||
2632 | neg find mustTransitiveContains(source,target); | ||
2633 | } or { | ||
2634 | find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); | ||
2635 | } | ||
2636 | /** | ||
2637 | * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) | ||
2638 | */ | ||
2639 | private pattern mustInRelationdata_reference_FAMTerminator( | ||
2640 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2641 | source: DefinedElement, target:DefinedElement) | ||
2642 | { | ||
2643 | find interpretation(problem,interpretation); | ||
2644 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2645 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); | ||
2646 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
2647 | BinaryElementRelationLink.param1(link,source); | ||
2648 | BinaryElementRelationLink.param2(link,target); | ||
2649 | } | ||
2650 | /** | ||
2651 | * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) | ||
2652 | */ | ||
2653 | private pattern mayInRelationdata_reference_FAMTerminator( | ||
2654 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2655 | source: DefinedElement, target:DefinedElement) | ||
2656 | { | ||
2657 | find interpretation(problem,interpretation); | ||
2658 | // The two endpoint of the link have to exist | ||
2659 | find mayExist(problem, interpretation, source); | ||
2660 | find mayExist(problem, interpretation, target); | ||
2661 | // Type consistency | ||
2662 | find mayInstanceOfFAMTerminator_class(problem,interpretation,source); | ||
2663 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
2664 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
2665 | // the upper bound of the multiplicity should be considered. | ||
2666 | numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); | ||
2667 | check(numberOfExistingReferences < 1); | ||
2668 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
2669 | // the upper bound of the opposite reference multiplicity should be considered. | ||
2670 | numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); | ||
2671 | check(numberOfExistingOppositeReferences < 1); | ||
2672 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
2673 | // 1. Multiple parents | ||
2674 | neg find mustContains4(problem,interpretation,source,_); | ||
2675 | // 2. Circle in the containment hierarchy | ||
2676 | neg find mustTransitiveContains(source,target); | ||
2677 | } or { | ||
2678 | find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); | ||
2679 | } | ||
2680 | /** | ||
2681 | * Matcher for detecting tuples t where []from reference InformationLink(source,target) | ||
2682 | */ | ||
2683 | private pattern mustInRelationfrom_reference_InformationLink( | ||
2684 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2685 | source: DefinedElement, target:DefinedElement) | ||
2686 | { | ||
2687 | find interpretation(problem,interpretation); | ||
2688 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2689 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); | ||
2690 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
2691 | BinaryElementRelationLink.param1(link,source); | ||
2692 | BinaryElementRelationLink.param2(link,target); | ||
2693 | } | ||
2694 | /** | ||
2695 | * Matcher for detecting tuples t where <>from reference InformationLink(source,target) | ||
2696 | */ | ||
2697 | private pattern mayInRelationfrom_reference_InformationLink( | ||
2698 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2699 | source: DefinedElement, target:DefinedElement) | ||
2700 | { | ||
2701 | find interpretation(problem,interpretation); | ||
2702 | // The two endpoint of the link have to exist | ||
2703 | find mayExist(problem, interpretation, source); | ||
2704 | find mayExist(problem, interpretation, target); | ||
2705 | // Type consistency | ||
2706 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
2707 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); | ||
2708 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
2709 | // the upper bound of the multiplicity should be considered. | ||
2710 | numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); | ||
2711 | check(numberOfExistingReferences < 1); | ||
2712 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
2713 | // 1. Multiple parents | ||
2714 | neg find mustContains4(problem,interpretation,source,_); | ||
2715 | // 2. Circle in the containment hierarchy | ||
2716 | neg find mustTransitiveContains(source,target); | ||
2717 | } or { | ||
2718 | find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); | ||
2719 | } | ||
2720 | /** | ||
2721 | * Matcher for detecting tuples t where []to reference InformationLink(source,target) | ||
2722 | */ | ||
2723 | private pattern mustInRelationto_reference_InformationLink( | ||
2724 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2725 | source: DefinedElement, target:DefinedElement) | ||
2726 | { | ||
2727 | find interpretation(problem,interpretation); | ||
2728 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2729 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
2730 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
2731 | BinaryElementRelationLink.param1(link,source); | ||
2732 | BinaryElementRelationLink.param2(link,target); | ||
2733 | } | ||
2734 | /** | ||
2735 | * Matcher for detecting tuples t where <>to reference InformationLink(source,target) | ||
2736 | */ | ||
2737 | private pattern mayInRelationto_reference_InformationLink( | ||
2738 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2739 | source: DefinedElement, target:DefinedElement) | ||
2740 | { | ||
2741 | find interpretation(problem,interpretation); | ||
2742 | // The two endpoint of the link have to exist | ||
2743 | find mayExist(problem, interpretation, source); | ||
2744 | find mayExist(problem, interpretation, target); | ||
2745 | // Type consistency | ||
2746 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
2747 | find mayInstanceOfFunctionalInput_class(problem,interpretation,target); | ||
2748 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
2749 | // the upper bound of the multiplicity should be considered. | ||
2750 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); | ||
2751 | check(numberOfExistingReferences < 1); | ||
2752 | } or { | ||
2753 | find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); | ||
2754 | } | ||
2755 | /** | ||
2756 | * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) | ||
2757 | */ | ||
2758 | private pattern mustInRelationdata_reference_FunctionalInterface( | ||
2759 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2760 | source: DefinedElement, target:DefinedElement) | ||
2761 | { | ||
2762 | find interpretation(problem,interpretation); | ||
2763 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2764 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); | ||
2765 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
2766 | BinaryElementRelationLink.param1(link,source); | ||
2767 | BinaryElementRelationLink.param2(link,target); | ||
2768 | } | ||
2769 | /** | ||
2770 | * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) | ||
2771 | */ | ||
2772 | private pattern mayInRelationdata_reference_FunctionalInterface( | ||
2773 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2774 | source: DefinedElement, target:DefinedElement) | ||
2775 | { | ||
2776 | find interpretation(problem,interpretation); | ||
2777 | // The two endpoint of the link have to exist | ||
2778 | find mayExist(problem, interpretation, source); | ||
2779 | find mayExist(problem, interpretation, target); | ||
2780 | // Type consistency | ||
2781 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
2782 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
2783 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
2784 | // the upper bound of the opposite reference multiplicity should be considered. | ||
2785 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); | ||
2786 | check(numberOfExistingOppositeReferences < 1); | ||
2787 | // The reference is containment, then a new reference cannot be create if: | ||
2788 | // 1. Multiple parents | ||
2789 | neg find mustContains4(problem,interpretation,_,target); | ||
2790 | // 2. Circle in the containment hierarchy | ||
2791 | neg find mustTransitiveContains(source,target); | ||
2792 | } or { | ||
2793 | find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); | ||
2794 | } | ||
2795 | /** | ||
2796 | * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) | ||
2797 | */ | ||
2798 | private pattern mustInRelationelement_reference_FunctionalInterface( | ||
2799 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2800 | source: DefinedElement, target:DefinedElement) | ||
2801 | { | ||
2802 | find interpretation(problem,interpretation); | ||
2803 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2804 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); | ||
2805 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
2806 | BinaryElementRelationLink.param1(link,source); | ||
2807 | BinaryElementRelationLink.param2(link,target); | ||
2808 | } | ||
2809 | /** | ||
2810 | * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) | ||
2811 | */ | ||
2812 | private pattern mayInRelationelement_reference_FunctionalInterface( | ||
2813 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2814 | source: DefinedElement, target:DefinedElement) | ||
2815 | { | ||
2816 | find interpretation(problem,interpretation); | ||
2817 | // The two endpoint of the link have to exist | ||
2818 | find mayExist(problem, interpretation, source); | ||
2819 | find mayExist(problem, interpretation, target); | ||
2820 | // Type consistency | ||
2821 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
2822 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
2823 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
2824 | // the upper bound of the multiplicity should be considered. | ||
2825 | numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); | ||
2826 | check(numberOfExistingReferences < 1); | ||
2827 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
2828 | // the upper bound of the opposite reference multiplicity should be considered. | ||
2829 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); | ||
2830 | check(numberOfExistingOppositeReferences < 1); | ||
2831 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
2832 | // 1. Multiple parents | ||
2833 | neg find mustContains4(problem,interpretation,source,_); | ||
2834 | // 2. Circle in the containment hierarchy | ||
2835 | neg find mustTransitiveContains(source,target); | ||
2836 | } or { | ||
2837 | find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); | ||
2838 | } | ||
2839 | /** | ||
2840 | * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) | ||
2841 | */ | ||
2842 | private pattern mustInRelationIncomingLinks_reference_FunctionalInput( | ||
2843 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2844 | source: DefinedElement, target:DefinedElement) | ||
2845 | { | ||
2846 | find interpretation(problem,interpretation); | ||
2847 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2848 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
2849 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
2850 | BinaryElementRelationLink.param1(link,source); | ||
2851 | BinaryElementRelationLink.param2(link,target); | ||
2852 | } | ||
2853 | /** | ||
2854 | * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) | ||
2855 | */ | ||
2856 | private pattern mayInRelationIncomingLinks_reference_FunctionalInput( | ||
2857 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2858 | source: DefinedElement, target:DefinedElement) | ||
2859 | { | ||
2860 | find interpretation(problem,interpretation); | ||
2861 | // The two endpoint of the link have to exist | ||
2862 | find mayExist(problem, interpretation, source); | ||
2863 | find mayExist(problem, interpretation, target); | ||
2864 | // Type consistency | ||
2865 | find mayInstanceOfFunctionalInput_class(problem,interpretation,source); | ||
2866 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
2867 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
2868 | // the upper bound of the opposite reference multiplicity should be considered. | ||
2869 | numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); | ||
2870 | check(numberOfExistingOppositeReferences < 1); | ||
2871 | } or { | ||
2872 | find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); | ||
2873 | } | ||
2874 | /** | ||
2875 | * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) | ||
2876 | */ | ||
2877 | private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( | ||
2878 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2879 | source: DefinedElement, target:DefinedElement) | ||
2880 | { | ||
2881 | find interpretation(problem,interpretation); | ||
2882 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2883 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); | ||
2884 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
2885 | BinaryElementRelationLink.param1(link,source); | ||
2886 | BinaryElementRelationLink.param2(link,target); | ||
2887 | } | ||
2888 | /** | ||
2889 | * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) | ||
2890 | */ | ||
2891 | private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( | ||
2892 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2893 | source: DefinedElement, target:DefinedElement) | ||
2894 | { | ||
2895 | find interpretation(problem,interpretation); | ||
2896 | // The two endpoint of the link have to exist | ||
2897 | find mayExist(problem, interpretation, source); | ||
2898 | find mayExist(problem, interpretation, target); | ||
2899 | // Type consistency | ||
2900 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); | ||
2901 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
2902 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
2903 | // the upper bound of the opposite reference multiplicity should be considered. | ||
2904 | numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); | ||
2905 | check(numberOfExistingOppositeReferences < 1); | ||
2906 | // The reference is containment, then a new reference cannot be create if: | ||
2907 | // 1. Multiple parents | ||
2908 | neg find mustContains4(problem,interpretation,_,target); | ||
2909 | // 2. Circle in the containment hierarchy | ||
2910 | neg find mustTransitiveContains(source,target); | ||
2911 | } or { | ||
2912 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); | ||
2913 | } | ||
2914 | /** | ||
2915 | * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) | ||
2916 | */ | ||
2917 | private pattern mustInRelationterminator_reference_FunctionalData( | ||
2918 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2919 | source: DefinedElement, target:DefinedElement) | ||
2920 | { | ||
2921 | find interpretation(problem,interpretation); | ||
2922 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2923 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); | ||
2924 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
2925 | BinaryElementRelationLink.param1(link,source); | ||
2926 | BinaryElementRelationLink.param2(link,target); | ||
2927 | } | ||
2928 | /** | ||
2929 | * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) | ||
2930 | */ | ||
2931 | private pattern mayInRelationterminator_reference_FunctionalData( | ||
2932 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2933 | source: DefinedElement, target:DefinedElement) | ||
2934 | { | ||
2935 | find interpretation(problem,interpretation); | ||
2936 | // The two endpoint of the link have to exist | ||
2937 | find mayExist(problem, interpretation, source); | ||
2938 | find mayExist(problem, interpretation, target); | ||
2939 | // Type consistency | ||
2940 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
2941 | find mayInstanceOfFAMTerminator_class(problem,interpretation,target); | ||
2942 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
2943 | // the upper bound of the multiplicity should be considered. | ||
2944 | numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); | ||
2945 | check(numberOfExistingReferences < 1); | ||
2946 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
2947 | // the upper bound of the opposite reference multiplicity should be considered. | ||
2948 | numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); | ||
2949 | check(numberOfExistingOppositeReferences < 1); | ||
2950 | // The reference is containment, then a new reference cannot be create if: | ||
2951 | // 1. Multiple parents | ||
2952 | neg find mustContains4(problem,interpretation,_,target); | ||
2953 | // 2. Circle in the containment hierarchy | ||
2954 | neg find mustTransitiveContains(source,target); | ||
2955 | } or { | ||
2956 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); | ||
2957 | } | ||
2958 | /** | ||
2959 | * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) | ||
2960 | */ | ||
2961 | private pattern mustInRelationinterface_reference_FunctionalData( | ||
2962 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2963 | source: DefinedElement, target:DefinedElement) | ||
2964 | { | ||
2965 | find interpretation(problem,interpretation); | ||
2966 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2967 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); | ||
2968 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
2969 | BinaryElementRelationLink.param1(link,source); | ||
2970 | BinaryElementRelationLink.param2(link,target); | ||
2971 | } | ||
2972 | /** | ||
2973 | * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) | ||
2974 | */ | ||
2975 | private pattern mayInRelationinterface_reference_FunctionalData( | ||
2976 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2977 | source: DefinedElement, target:DefinedElement) | ||
2978 | { | ||
2979 | find interpretation(problem,interpretation); | ||
2980 | // The two endpoint of the link have to exist | ||
2981 | find mayExist(problem, interpretation, source); | ||
2982 | find mayExist(problem, interpretation, target); | ||
2983 | // Type consistency | ||
2984 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
2985 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
2986 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
2987 | // the upper bound of the multiplicity should be considered. | ||
2988 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); | ||
2989 | check(numberOfExistingReferences < 1); | ||
2990 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
2991 | // 1. Multiple parents | ||
2992 | neg find mustContains4(problem,interpretation,source,_); | ||
2993 | // 2. Circle in the containment hierarchy | ||
2994 | neg find mustTransitiveContains(source,target); | ||
2995 | } or { | ||
2996 | find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); | ||
2997 | } | ||
2998 | /** | ||
2999 | * Matcher for detecting tuples t where []type attribute Function(source,target) | ||
3000 | */ | ||
3001 | private pattern mustInRelationtype_attribute_Function( | ||
3002 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3003 | source: DefinedElement, target:DefinedElement) | ||
3004 | { | ||
3005 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); | ||
3006 | } | ||
3007 | /** | ||
3008 | * Matcher for detecting tuples t where []type attribute Function(source,target) | ||
3009 | */ | ||
3010 | private pattern mayInRelationtype_attribute_Function( | ||
3011 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3012 | source: DefinedElement, target:DefinedElement) | ||
3013 | { | ||
3014 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); | ||
3015 | } | ||
3016 | |||
3017 | ////////// | ||
3018 | // 1.3 Relation Definition Indexers | ||
3019 | ////////// | ||
3020 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam terminatorAndInformation | ||
3021 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( | ||
3022 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3023 | var_T, var_I) | ||
3024 | { | ||
3025 | find interpretation(problem,interpretation); | ||
3026 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
3027 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
3028 | // T is exported | ||
3029 | // I is exported | ||
3030 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
3031 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); | ||
3032 | find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); | ||
3033 | var_virtual0 == var_I; | ||
3034 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
3035 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); | ||
3036 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
3037 | var_virtual1 == var_T; | ||
3038 | }or{ | ||
3039 | find interpretation(problem,interpretation); | ||
3040 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
3041 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
3042 | // T is exported | ||
3043 | // I is exported | ||
3044 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
3045 | find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); | ||
3046 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); | ||
3047 | var_virtual0 == var_In; | ||
3048 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); | ||
3049 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); | ||
3050 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
3051 | var_virtual1 == var_T; | ||
3052 | } | ||
3053 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( | ||
3054 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3055 | var_T, var_I) | ||
3056 | { | ||
3057 | find interpretation(problem,interpretation); | ||
3058 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
3059 | find mayInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
3060 | // T is exported | ||
3061 | // I is exported | ||
3062 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
3063 | find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); | ||
3064 | find mayInstanceOfInformationLink_class(problem,interpretation,var_virtual0); | ||
3065 | find mayEquivalent(problem, interpretation, var_virtual0, var_I); | ||
3066 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
3067 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); | ||
3068 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
3069 | find mayEquivalent(problem, interpretation, var_virtual1, var_T); | ||
3070 | }or{ | ||
3071 | find interpretation(problem,interpretation); | ||
3072 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
3073 | find mayInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
3074 | // T is exported | ||
3075 | // I is exported | ||
3076 | find mayInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
3077 | find mayInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); | ||
3078 | find mayInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); | ||
3079 | find mayEquivalent(problem, interpretation, var_virtual0, var_In); | ||
3080 | find mayInstanceOfFunctionalInput_class(problem,interpretation,var_In); | ||
3081 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); | ||
3082 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
3083 | find mayEquivalent(problem, interpretation, var_virtual1, var_T); | ||
3084 | } | ||
3085 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( | ||
3086 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3087 | var_T, var_I) | ||
3088 | { | ||
3089 | find interpretation(problem,interpretation); | ||
3090 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
3091 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
3092 | // T is exported | ||
3093 | // I is exported | ||
3094 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
3095 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); | ||
3096 | find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); | ||
3097 | var_virtual0 == var_I; | ||
3098 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
3099 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); | ||
3100 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
3101 | var_virtual1 == var_T; | ||
3102 | }or{ | ||
3103 | find interpretation(problem,interpretation); | ||
3104 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
3105 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
3106 | // T is exported | ||
3107 | // I is exported | ||
3108 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
3109 | find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); | ||
3110 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); | ||
3111 | var_virtual0 == var_In; | ||
3112 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); | ||
3113 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); | ||
3114 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
3115 | var_virtual1 == var_T; | ||
3116 | } | ||
3117 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam type | ||
3118 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( | ||
3119 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3120 | var_This, var_Target) | ||
3121 | { | ||
3122 | find interpretation(problem,interpretation); | ||
3123 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
3124 | // type constraint is enforced by construction | ||
3125 | // This is exported | ||
3126 | // Target is exported | ||
3127 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
3128 | var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); | ||
3129 | var_Target == var_virtual0; | ||
3130 | }or{ | ||
3131 | find interpretation(problem,interpretation); | ||
3132 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
3133 | // type constraint is enforced by construction | ||
3134 | // This is exported | ||
3135 | // Target is exported | ||
3136 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
3137 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
3138 | var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); | ||
3139 | var_Target == var_virtual0; | ||
3140 | }or{ | ||
3141 | find interpretation(problem,interpretation); | ||
3142 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
3143 | // type constraint is enforced by construction | ||
3144 | // This is exported | ||
3145 | // Target is exported | ||
3146 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); | ||
3147 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
3148 | var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); | ||
3149 | var_Target == var_virtual0; | ||
3150 | } | ||
3151 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( | ||
3152 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3153 | var_This, var_Target) | ||
3154 | { | ||
3155 | find interpretation(problem,interpretation); | ||
3156 | find mayInstanceOfFunction_class(problem,interpretation,var_This); | ||
3157 | // type constraint is enforced by construction | ||
3158 | // This is exported | ||
3159 | // Target is exported | ||
3160 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
3161 | var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); | ||
3162 | find mayEquivalent(problem, interpretation, var_Target, var_virtual0); | ||
3163 | }or{ | ||
3164 | find interpretation(problem,interpretation); | ||
3165 | find mayInstanceOfFunction_class(problem,interpretation,var_This); | ||
3166 | // type constraint is enforced by construction | ||
3167 | // This is exported | ||
3168 | // Target is exported | ||
3169 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
3170 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
3171 | var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); | ||
3172 | find mayEquivalent(problem, interpretation, var_Target, var_virtual0); | ||
3173 | }or{ | ||
3174 | find interpretation(problem,interpretation); | ||
3175 | find mayInstanceOfFunction_class(problem,interpretation,var_This); | ||
3176 | // type constraint is enforced by construction | ||
3177 | // This is exported | ||
3178 | // Target is exported | ||
3179 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); | ||
3180 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
3181 | var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); | ||
3182 | find mayEquivalent(problem, interpretation, var_Target, var_virtual0); | ||
3183 | } | ||
3184 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( | ||
3185 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3186 | var_This, var_Target) | ||
3187 | { | ||
3188 | find interpretation(problem,interpretation); | ||
3189 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
3190 | // type constraint is enforced by construction | ||
3191 | // This is exported | ||
3192 | // Target is exported | ||
3193 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
3194 | var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); | ||
3195 | var_Target == var_virtual0; | ||
3196 | }or{ | ||
3197 | find interpretation(problem,interpretation); | ||
3198 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
3199 | // type constraint is enforced by construction | ||
3200 | // This is exported | ||
3201 | // Target is exported | ||
3202 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
3203 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
3204 | var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); | ||
3205 | var_Target == var_virtual0; | ||
3206 | }or{ | ||
3207 | find interpretation(problem,interpretation); | ||
3208 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
3209 | // type constraint is enforced by construction | ||
3210 | // This is exported | ||
3211 | // Target is exported | ||
3212 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); | ||
3213 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
3214 | var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); | ||
3215 | var_Target == var_virtual0; | ||
3216 | } | ||
3217 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam rootElements | ||
3218 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( | ||
3219 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3220 | var_Model, var_Root) | ||
3221 | { | ||
3222 | find interpretation(problem,interpretation); | ||
3223 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
3224 | find mustInstanceOfFunction_class(problem,interpretation,var_Root); | ||
3225 | // Model is exported | ||
3226 | // Root is exported | ||
3227 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
3228 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); | ||
3229 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); | ||
3230 | var_virtual0 == var_Root; | ||
3231 | } | ||
3232 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( | ||
3233 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3234 | var_Model, var_Root) | ||
3235 | { | ||
3236 | find interpretation(problem,interpretation); | ||
3237 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
3238 | find mayInstanceOfFunction_class(problem,interpretation,var_Root); | ||
3239 | // Model is exported | ||
3240 | // Root is exported | ||
3241 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
3242 | find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); | ||
3243 | find mayInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); | ||
3244 | find mayEquivalent(problem, interpretation, var_virtual0, var_Root); | ||
3245 | } | ||
3246 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( | ||
3247 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3248 | var_Model, var_Root) | ||
3249 | { | ||
3250 | find interpretation(problem,interpretation); | ||
3251 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
3252 | find mustInstanceOfFunction_class(problem,interpretation,var_Root); | ||
3253 | // Model is exported | ||
3254 | // Root is exported | ||
3255 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
3256 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); | ||
3257 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); | ||
3258 | var_virtual0 == var_Root; | ||
3259 | } | ||
3260 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam parent | ||
3261 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( | ||
3262 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3263 | var_Func, var_Par) | ||
3264 | { | ||
3265 | find interpretation(problem,interpretation); | ||
3266 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
3267 | find mustInstanceOfFunction_class(problem,interpretation,var_Par); | ||
3268 | // Func is exported | ||
3269 | // Par is exported | ||
3270 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
3271 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); | ||
3272 | find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); | ||
3273 | var_virtual0 == var_Par; | ||
3274 | } | ||
3275 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( | ||
3276 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3277 | var_Func, var_Par) | ||
3278 | { | ||
3279 | find interpretation(problem,interpretation); | ||
3280 | find mayInstanceOfFunction_class(problem,interpretation,var_Func); | ||
3281 | find mayInstanceOfFunction_class(problem,interpretation,var_Par); | ||
3282 | // Func is exported | ||
3283 | // Par is exported | ||
3284 | find mayInstanceOfFunction_class(problem,interpretation,var_Func); | ||
3285 | find mayInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); | ||
3286 | find mayInstanceOfFunction_class(problem,interpretation,var_virtual0); | ||
3287 | find mayEquivalent(problem, interpretation, var_virtual0, var_Par); | ||
3288 | } | ||
3289 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( | ||
3290 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3291 | var_Func, var_Par) | ||
3292 | { | ||
3293 | find interpretation(problem,interpretation); | ||
3294 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
3295 | find mustInstanceOfFunction_class(problem,interpretation,var_Par); | ||
3296 | // Func is exported | ||
3297 | // Par is exported | ||
3298 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
3299 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); | ||
3300 | find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); | ||
3301 | var_virtual0 == var_Par; | ||
3302 | } | ||
3303 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam model | ||
3304 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( | ||
3305 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3306 | var_This, var_Target) | ||
3307 | { | ||
3308 | find interpretation(problem,interpretation); | ||
3309 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
3310 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
3311 | // This is exported | ||
3312 | // Target is exported | ||
3313 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
3314 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
3315 | } | ||
3316 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( | ||
3317 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3318 | var_This, var_Target) | ||
3319 | { | ||
3320 | find interpretation(problem,interpretation); | ||
3321 | find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
3322 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
3323 | // This is exported | ||
3324 | // Target is exported | ||
3325 | find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
3326 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
3327 | } | ||
3328 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( | ||
3329 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3330 | var_This, var_Target) | ||
3331 | { | ||
3332 | find interpretation(problem,interpretation); | ||
3333 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
3334 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
3335 | // This is exported | ||
3336 | // Target is exported | ||
3337 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
3338 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
3339 | } | ||
3340 | |||
3341 | ////////// | ||
3342 | // 1.4 Containment Indexer | ||
3343 | ////////// | ||
3344 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
3345 | find mustContains4(_,_,source,target); | ||
3346 | } | ||
3347 | |||
3348 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
3349 | source: DefinedElement, target: DefinedElement) | ||
3350 | { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or | ||
3351 | |||
3352 | { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or | ||
3353 | |||
3354 | { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or | ||
3355 | |||
3356 | { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or | ||
3357 | |||
3358 | { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or | ||
3359 | |||
3360 | { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } | ||
3361 | |||
3362 | private pattern mustTransitiveContains(source,target) { | ||
3363 | find mustContains2+(source,target); | ||
3364 | } | ||
3365 | |||
3366 | ////////// | ||
3367 | // 2. Invalidation Indexers | ||
3368 | ////////// | ||
3369 | // 2.1 Invalidated by WF Queries | ||
3370 | ////////// | ||
3371 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem:LogicProblem, interpretation:PartialInterpretation, | ||
3372 | var_T, var_I) | ||
3373 | { | ||
3374 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem,interpretation,var_T,var_I); | ||
3375 | } | ||
3376 | |||
3377 | ////////// | ||
3378 | // 3. Unfinishedness Indexers | ||
3379 | ////////// | ||
3380 | // 3.1 Unfinishedness Measured by Multiplicity | ||
3381 | ////////// | ||
3382 | pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
3383 | find interpretation(problem,interpretation); | ||
3384 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
3385 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
3386 | find mustInstanceOfInformationLink_class(problem,interpretation,object); | ||
3387 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); | ||
3388 | check(numberOfExistingReferences < 1); | ||
3389 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
3390 | } | ||
3391 | |||
3392 | ////////// | ||
3393 | // 3.2 Unfinishedness Measured by WF Queries | ||
3394 | ////////// | ||
3395 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem:LogicProblem, interpretation:PartialInterpretation, | ||
3396 | var_T, var_I) | ||
3397 | { | ||
3398 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem,interpretation,var_T,var_I); | ||
3399 | } | ||
3400 | |||
3401 | ////////// | ||
3402 | // 4. Refinement Indexers | ||
3403 | ////////// | ||
3404 | // 4.1 Object constructors | ||
3405 | ////////// | ||
3406 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
3407 | { | ||
3408 | find interpretation(problem,interpretation); | ||
3409 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); | ||
3410 | find mustExist(problem, interpretation, root); | ||
3411 | }or{ | ||
3412 | find interpretation(problem,interpretation); | ||
3413 | find mustInstanceOfFunctionalElement_class(problem,interpretation,root); | ||
3414 | find mustExist(problem, interpretation, root); | ||
3415 | }or{ | ||
3416 | find interpretation(problem,interpretation); | ||
3417 | find mustInstanceOfFunctionalInput_class(problem,interpretation,root); | ||
3418 | find mustExist(problem, interpretation, root); | ||
3419 | }or{ | ||
3420 | find interpretation(problem,interpretation); | ||
3421 | find mustInstanceOfFunction_class(problem,interpretation,root); | ||
3422 | find mustExist(problem, interpretation, root); | ||
3423 | }or{ | ||
3424 | find interpretation(problem,interpretation); | ||
3425 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); | ||
3426 | find mustExist(problem, interpretation, root); | ||
3427 | }or{ | ||
3428 | find interpretation(problem,interpretation); | ||
3429 | find mustInstanceOfFAMTerminator_class(problem,interpretation,root); | ||
3430 | find mustExist(problem, interpretation, root); | ||
3431 | }or{ | ||
3432 | find interpretation(problem,interpretation); | ||
3433 | find mustInstanceOfInformationLink_class(problem,interpretation,root); | ||
3434 | find mustExist(problem, interpretation, root); | ||
3435 | }or{ | ||
3436 | find interpretation(problem,interpretation); | ||
3437 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); | ||
3438 | find mustExist(problem, interpretation, root); | ||
3439 | }or{ | ||
3440 | find interpretation(problem,interpretation); | ||
3441 | find mustInstanceOfFunctionalData_class(problem,interpretation,root); | ||
3442 | find mustExist(problem, interpretation, root); | ||
3443 | }or{ | ||
3444 | find interpretation(problem,interpretation); | ||
3445 | find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); | ||
3446 | find mustExist(problem, interpretation, root); | ||
3447 | }or{ | ||
3448 | find interpretation(problem,interpretation); | ||
3449 | find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); | ||
3450 | find mustExist(problem, interpretation, root); | ||
3451 | } | ||
3452 | pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
3453 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3454 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
3455 | container:DefinedElement) | ||
3456 | { | ||
3457 | find interpretation(problem,interpretation); | ||
3458 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3459 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
3460 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
3461 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
3462 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
3463 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
3464 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
3465 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
3466 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
3467 | find mustExist(problem, interpretation, container); | ||
3468 | neg find mustExist(problem, interpretation, newObject); | ||
3469 | } | ||
3470 | pattern createObject_FunctionalInput_class( | ||
3471 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3472 | typeInterpretation:PartialComplexTypeInterpretation) | ||
3473 | { | ||
3474 | find interpretation(problem,interpretation); | ||
3475 | neg find hasElementInContainment(problem,interpretation); | ||
3476 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3477 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
3478 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
3479 | find mayExist(problem, interpretation, newObject); | ||
3480 | neg find mustExist(problem, interpretation, newObject); | ||
3481 | } | ||
3482 | pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( | ||
3483 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3484 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
3485 | container:DefinedElement) | ||
3486 | { | ||
3487 | find interpretation(problem,interpretation); | ||
3488 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3489 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
3490 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
3491 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); | ||
3492 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
3493 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); | ||
3494 | find mustInstanceOfFunctionalElement_class(problem,interpretation,container); | ||
3495 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
3496 | find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); | ||
3497 | find mustExist(problem, interpretation, container); | ||
3498 | neg find mustExist(problem, interpretation, newObject); | ||
3499 | } | ||
3500 | pattern createObject_FunctionalInterface_class( | ||
3501 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3502 | typeInterpretation:PartialComplexTypeInterpretation) | ||
3503 | { | ||
3504 | find interpretation(problem,interpretation); | ||
3505 | neg find hasElementInContainment(problem,interpretation); | ||
3506 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3507 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
3508 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
3509 | find mayExist(problem, interpretation, newObject); | ||
3510 | neg find mustExist(problem, interpretation, newObject); | ||
3511 | } | ||
3512 | pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( | ||
3513 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3514 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
3515 | container:DefinedElement) | ||
3516 | { | ||
3517 | find interpretation(problem,interpretation); | ||
3518 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3519 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
3520 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
3521 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
3522 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); | ||
3523 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
3524 | find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); | ||
3525 | find mustExist(problem, interpretation, container); | ||
3526 | neg find mustExist(problem, interpretation, newObject); | ||
3527 | } | ||
3528 | pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( | ||
3529 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3530 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
3531 | container:DefinedElement) | ||
3532 | { | ||
3533 | find interpretation(problem,interpretation); | ||
3534 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3535 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
3536 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
3537 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); | ||
3538 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
3539 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); | ||
3540 | find mustInstanceOfFunction_class(problem,interpretation,container); | ||
3541 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
3542 | find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); | ||
3543 | find mustExist(problem, interpretation, container); | ||
3544 | neg find mustExist(problem, interpretation, newObject); | ||
3545 | } | ||
3546 | pattern createObject_Function_class( | ||
3547 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3548 | typeInterpretation:PartialComplexTypeInterpretation) | ||
3549 | { | ||
3550 | find interpretation(problem,interpretation); | ||
3551 | neg find hasElementInContainment(problem,interpretation); | ||
3552 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3553 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
3554 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
3555 | find mayExist(problem, interpretation, newObject); | ||
3556 | neg find mustExist(problem, interpretation, newObject); | ||
3557 | } | ||
3558 | pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( | ||
3559 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3560 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
3561 | container:DefinedElement) | ||
3562 | { | ||
3563 | find interpretation(problem,interpretation); | ||
3564 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3565 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
3566 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
3567 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); | ||
3568 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
3569 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); | ||
3570 | find mustInstanceOfFunctionalData_class(problem,interpretation,container); | ||
3571 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
3572 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); | ||
3573 | find mustExist(problem, interpretation, container); | ||
3574 | neg find mustExist(problem, interpretation, newObject); | ||
3575 | } | ||
3576 | pattern createObject_FAMTerminator_class( | ||
3577 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3578 | typeInterpretation:PartialComplexTypeInterpretation) | ||
3579 | { | ||
3580 | find interpretation(problem,interpretation); | ||
3581 | neg find hasElementInContainment(problem,interpretation); | ||
3582 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3583 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
3584 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
3585 | find mayExist(problem, interpretation, newObject); | ||
3586 | neg find mustExist(problem, interpretation, newObject); | ||
3587 | } | ||
3588 | pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( | ||
3589 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3590 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
3591 | container:DefinedElement) | ||
3592 | { | ||
3593 | find interpretation(problem,interpretation); | ||
3594 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3595 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
3596 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
3597 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); | ||
3598 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
3599 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); | ||
3600 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); | ||
3601 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
3602 | find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); | ||
3603 | find mustExist(problem, interpretation, container); | ||
3604 | neg find mustExist(problem, interpretation, newObject); | ||
3605 | } | ||
3606 | pattern createObject_InformationLink_class( | ||
3607 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3608 | typeInterpretation:PartialComplexTypeInterpretation) | ||
3609 | { | ||
3610 | find interpretation(problem,interpretation); | ||
3611 | neg find hasElementInContainment(problem,interpretation); | ||
3612 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3613 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
3614 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
3615 | find mayExist(problem, interpretation, newObject); | ||
3616 | neg find mustExist(problem, interpretation, newObject); | ||
3617 | } | ||
3618 | pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( | ||
3619 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3620 | typeInterpretation:PartialComplexTypeInterpretation) | ||
3621 | { | ||
3622 | find interpretation(problem,interpretation); | ||
3623 | neg find hasElementInContainment(problem,interpretation); | ||
3624 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3625 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); | ||
3626 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); | ||
3627 | find mayExist(problem, interpretation, newObject); | ||
3628 | neg find mustExist(problem, interpretation, newObject); | ||
3629 | } | ||
3630 | pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
3631 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3632 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
3633 | container:DefinedElement) | ||
3634 | { | ||
3635 | find interpretation(problem,interpretation); | ||
3636 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3637 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
3638 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
3639 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
3640 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
3641 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
3642 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
3643 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
3644 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
3645 | find mustExist(problem, interpretation, container); | ||
3646 | neg find mustExist(problem, interpretation, newObject); | ||
3647 | } | ||
3648 | pattern createObject_FunctionalOutput_class( | ||
3649 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3650 | typeInterpretation:PartialComplexTypeInterpretation) | ||
3651 | { | ||
3652 | find interpretation(problem,interpretation); | ||
3653 | neg find hasElementInContainment(problem,interpretation); | ||
3654 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3655 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
3656 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
3657 | find mayExist(problem, interpretation, newObject); | ||
3658 | neg find mustExist(problem, interpretation, newObject); | ||
3659 | } | ||
3660 | |||
3661 | ////////// | ||
3662 | // 4.2 Type refinement | ||
3663 | ////////// | ||
3664 | pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
3665 | find interpretation(problem,interpretation); | ||
3666 | PartialInterpretation.newElements(interpretation,element); | ||
3667 | find mayInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
3668 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
3669 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
3670 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
3671 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
3672 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
3673 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
3674 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
3675 | } | ||
3676 | pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
3677 | find interpretation(problem,interpretation); | ||
3678 | PartialInterpretation.newElements(interpretation,element); | ||
3679 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
3680 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
3681 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
3682 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
3683 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
3684 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
3685 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
3686 | } | ||
3687 | pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
3688 | find interpretation(problem,interpretation); | ||
3689 | PartialInterpretation.newElements(interpretation,element); | ||
3690 | find mayInstanceOfFunction_class(problem,interpretation,element); | ||
3691 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
3692 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
3693 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
3694 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
3695 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
3696 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
3697 | } | ||
3698 | pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
3699 | find interpretation(problem,interpretation); | ||
3700 | PartialInterpretation.newElements(interpretation,element); | ||
3701 | find mayInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
3702 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
3703 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
3704 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
3705 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
3706 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
3707 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
3708 | } | ||
3709 | pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
3710 | find interpretation(problem,interpretation); | ||
3711 | PartialInterpretation.newElements(interpretation,element); | ||
3712 | find mayInstanceOfInformationLink_class(problem,interpretation,element); | ||
3713 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
3714 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
3715 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
3716 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
3717 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
3718 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
3719 | } | ||
3720 | pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
3721 | find interpretation(problem,interpretation); | ||
3722 | PartialInterpretation.newElements(interpretation,element); | ||
3723 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
3724 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
3725 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
3726 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
3727 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
3728 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
3729 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
3730 | } | ||
3731 | pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
3732 | find interpretation(problem,interpretation); | ||
3733 | PartialInterpretation.newElements(interpretation,element); | ||
3734 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
3735 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
3736 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
3737 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
3738 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
3739 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
3740 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
3741 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
3742 | } | ||
3743 | |||
3744 | ////////// | ||
3745 | // 4.3 Relation refinement | ||
3746 | ////////// | ||
3747 | pattern refineRelation_model_reference_FunctionalElement( | ||
3748 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3749 | relationIterpretation:PartialRelationInterpretation, | ||
3750 | from: DefinedElement, to: DefinedElement) | ||
3751 | { | ||
3752 | find interpretation(problem,interpretation); | ||
3753 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
3754 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
3755 | find mustExist(problem, interpretation, from); | ||
3756 | find mustExist(problem, interpretation, to); | ||
3757 | find mustInstanceOfFunctionalElement_class(problem,interpretation,from); | ||
3758 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); | ||
3759 | find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
3760 | neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
3761 | } | ||
3762 | pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( | ||
3763 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3764 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
3765 | from: DefinedElement, to: DefinedElement) | ||
3766 | { | ||
3767 | find interpretation(problem,interpretation); | ||
3768 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
3769 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
3770 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
3771 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); | ||
3772 | find mustExist(problem, interpretation, from); | ||
3773 | find mustExist(problem, interpretation, to); | ||
3774 | find mustInstanceOfFunctionalInput_class(problem,interpretation,from); | ||
3775 | find mustInstanceOfInformationLink_class(problem,interpretation,to); | ||
3776 | find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
3777 | neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
3778 | } | ||
3779 | pattern refineRelation_type_attribute_Function( | ||
3780 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3781 | relationIterpretation:PartialRelationInterpretation, | ||
3782 | from: DefinedElement, to: DefinedElement) | ||
3783 | { | ||
3784 | find interpretation(problem,interpretation); | ||
3785 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
3786 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
3787 | find mustExist(problem, interpretation, from); | ||
3788 | find mustExist(problem, interpretation, to); | ||
3789 | find mustInstanceOfFunction_class(problem,interpretation,from); | ||
3790 | find mustInstanceOfFunctionType_enum(problem,interpretation,to); | ||
3791 | find mayInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
3792 | neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
3793 | } | ||
3794 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
3795 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
3796 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
3797 | |||
3798 | ////////// | ||
3799 | // 0. Util | ||
3800 | ////////// | ||
3801 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3802 | PartialInterpretation.problem(interpretation,problem); | ||
3803 | } | ||
3804 | |||
3805 | ///////////////////////// | ||
3806 | // 0.1 Existence | ||
3807 | ///////////////////////// | ||
3808 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3809 | find interpretation(problem,interpretation); | ||
3810 | LogicProblem.elements(problem,element); | ||
3811 | } or { | ||
3812 | find interpretation(problem,interpretation); | ||
3813 | PartialInterpretation.newElements(interpretation,element); | ||
3814 | } | ||
3815 | |||
3816 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3817 | find mustExist(problem,interpretation,element); | ||
3818 | } or { | ||
3819 | find interpretation(problem,interpretation); | ||
3820 | neg find elementCloseWorld(element); | ||
3821 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3822 | } | ||
3823 | |||
3824 | private pattern elementCloseWorld(element:DefinedElement) { | ||
3825 | PartialInterpretation.openWorldElements(i,element); | ||
3826 | PartialInterpretation.maxNewElements(i,0); | ||
3827 | } or { | ||
3828 | Scope.targetTypeInterpretation(scope,interpretation); | ||
3829 | PartialTypeInterpratation.elements(interpretation,element); | ||
3830 | Scope.maxNewElements(scope,0); | ||
3831 | } | ||
3832 | |||
3833 | //////////////////////// | ||
3834 | // 0.2 Equivalence | ||
3835 | //////////////////////// | ||
3836 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
3837 | find mayExist(problem,interpretation,a); | ||
3838 | find mayExist(problem,interpretation,b); | ||
3839 | a == b; | ||
3840 | } | ||
3841 | |||
3842 | //////////////////////// | ||
3843 | // 0.3 Required Patterns by TypeIndexer | ||
3844 | //////////////////////// | ||
3845 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
3846 | find interpretation(problem,interpretation); | ||
3847 | LogicProblem.types(problem,type); | ||
3848 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3849 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3850 | } | ||
3851 | |||
3852 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
3853 | find interpretation(problem,interpretation); | ||
3854 | LogicProblem.types(problem,type); | ||
3855 | TypeDefinition.elements(type,element); | ||
3856 | } or { | ||
3857 | find interpretation(problem,interpretation); | ||
3858 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
3859 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
3860 | } | ||
3861 | |||
3862 | private pattern isPrimitive(element: PrimitiveElement) { | ||
3863 | PrimitiveElement(element); | ||
3864 | } | ||
3865 | |||
3866 | ////////// | ||
3867 | // 1. Problem-Specific Base Indexers | ||
3868 | ////////// | ||
3869 | // 1.1 Type Indexers | ||
3870 | ////////// | ||
3871 | // 1.1.1 primitive Type Indexers | ||
3872 | ////////// | ||
3873 | |||
3874 | ////////// | ||
3875 | // 1.1.2 domain-specific Type Indexers | ||
3876 | ////////// | ||
3877 | /** | ||
3878 | * An element must be an instance of type "FunctionalElement class". | ||
3879 | */ | ||
3880 | private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3881 | Type.name(type,"FunctionalElement class"); | ||
3882 | find directInstanceOf(problem,interpretation,element,type); | ||
3883 | } | ||
3884 | private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3885 | find interpretation(problem,interpretation); | ||
3886 | PartialInterpretation.scopes(interpretation,scope); | ||
3887 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3888 | Scope.maxNewElements(scope,0); | ||
3889 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3890 | Type.name(type,"FunctionalElement class"); | ||
3891 | } | ||
3892 | |||
3893 | /** | ||
3894 | * An element may be an instance of type "FunctionalElement class". | ||
3895 | */ | ||
3896 | private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3897 | { | ||
3898 | find interpretation(problem,interpretation); | ||
3899 | PartialInterpretation.newElements(interpretation,element); | ||
3900 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
3901 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
3902 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
3903 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
3904 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
3905 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
3906 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
3907 | neg find isPrimitive(element); | ||
3908 | } or { | ||
3909 | find interpretation(problem,interpretation); | ||
3910 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3911 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
3912 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
3913 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
3914 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
3915 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
3916 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
3917 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
3918 | neg find isPrimitive(element); | ||
3919 | } or | ||
3920 | { find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } | ||
3921 | /** | ||
3922 | * An element must be an instance of type "FunctionalArchitectureModel class". | ||
3923 | */ | ||
3924 | private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3925 | Type.name(type,"FunctionalArchitectureModel class"); | ||
3926 | find directInstanceOf(problem,interpretation,element,type); | ||
3927 | } | ||
3928 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3929 | find interpretation(problem,interpretation); | ||
3930 | PartialInterpretation.scopes(interpretation,scope); | ||
3931 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3932 | Scope.maxNewElements(scope,0); | ||
3933 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3934 | Type.name(type,"FunctionalArchitectureModel class"); | ||
3935 | } | ||
3936 | |||
3937 | /** | ||
3938 | * An element may be an instance of type "FunctionalArchitectureModel class". | ||
3939 | */ | ||
3940 | private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3941 | { | ||
3942 | find interpretation(problem,interpretation); | ||
3943 | PartialInterpretation.newElements(interpretation,element); | ||
3944 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
3945 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
3946 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
3947 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
3948 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
3949 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
3950 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
3951 | neg find isPrimitive(element); | ||
3952 | } or { | ||
3953 | find interpretation(problem,interpretation); | ||
3954 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3955 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
3956 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
3957 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
3958 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
3959 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
3960 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
3961 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
3962 | neg find isPrimitive(element); | ||
3963 | } or | ||
3964 | { find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } | ||
3965 | /** | ||
3966 | * An element must be an instance of type "Function class". | ||
3967 | */ | ||
3968 | private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3969 | Type.name(type,"Function class"); | ||
3970 | find directInstanceOf(problem,interpretation,element,type); | ||
3971 | } | ||
3972 | private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3973 | find interpretation(problem,interpretation); | ||
3974 | PartialInterpretation.scopes(interpretation,scope); | ||
3975 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3976 | Scope.maxNewElements(scope,0); | ||
3977 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3978 | Type.name(type,"Function class"); | ||
3979 | } | ||
3980 | |||
3981 | /** | ||
3982 | * An element may be an instance of type "Function class". | ||
3983 | */ | ||
3984 | private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3985 | { | ||
3986 | find interpretation(problem,interpretation); | ||
3987 | PartialInterpretation.newElements(interpretation,element); | ||
3988 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
3989 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
3990 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
3991 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
3992 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
3993 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
3994 | neg find isPrimitive(element); | ||
3995 | } or { | ||
3996 | find interpretation(problem,interpretation); | ||
3997 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3998 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
3999 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
4000 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
4001 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
4002 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
4003 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
4004 | neg find isPrimitive(element); | ||
4005 | } or | ||
4006 | { find mustInstanceOfFunction_class(problem,interpretation,element); } | ||
4007 | /** | ||
4008 | * An element must be an instance of type "FAMTerminator class". | ||
4009 | */ | ||
4010 | private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
4011 | Type.name(type,"FAMTerminator class"); | ||
4012 | find directInstanceOf(problem,interpretation,element,type); | ||
4013 | } | ||
4014 | private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
4015 | find interpretation(problem,interpretation); | ||
4016 | PartialInterpretation.scopes(interpretation,scope); | ||
4017 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
4018 | Scope.maxNewElements(scope,0); | ||
4019 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
4020 | Type.name(type,"FAMTerminator class"); | ||
4021 | } | ||
4022 | |||
4023 | /** | ||
4024 | * An element may be an instance of type "FAMTerminator class". | ||
4025 | */ | ||
4026 | private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
4027 | { | ||
4028 | find interpretation(problem,interpretation); | ||
4029 | PartialInterpretation.newElements(interpretation,element); | ||
4030 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
4031 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
4032 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
4033 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
4034 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
4035 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
4036 | neg find isPrimitive(element); | ||
4037 | } or { | ||
4038 | find interpretation(problem,interpretation); | ||
4039 | PartialInterpretation.openWorldElements(interpretation,element); | ||
4040 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
4041 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
4042 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
4043 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
4044 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
4045 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
4046 | neg find isPrimitive(element); | ||
4047 | } or | ||
4048 | { find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } | ||
4049 | /** | ||
4050 | * An element must be an instance of type "InformationLink class". | ||
4051 | */ | ||
4052 | private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
4053 | Type.name(type,"InformationLink class"); | ||
4054 | find directInstanceOf(problem,interpretation,element,type); | ||
4055 | } | ||
4056 | private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
4057 | find interpretation(problem,interpretation); | ||
4058 | PartialInterpretation.scopes(interpretation,scope); | ||
4059 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
4060 | Scope.maxNewElements(scope,0); | ||
4061 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
4062 | Type.name(type,"InformationLink class"); | ||
4063 | } | ||
4064 | |||
4065 | /** | ||
4066 | * An element may be an instance of type "InformationLink class". | ||
4067 | */ | ||
4068 | private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
4069 | { | ||
4070 | find interpretation(problem,interpretation); | ||
4071 | PartialInterpretation.newElements(interpretation,element); | ||
4072 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
4073 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
4074 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
4075 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
4076 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
4077 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
4078 | neg find isPrimitive(element); | ||
4079 | } or { | ||
4080 | find interpretation(problem,interpretation); | ||
4081 | PartialInterpretation.openWorldElements(interpretation,element); | ||
4082 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
4083 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
4084 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
4085 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
4086 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
4087 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
4088 | neg find isPrimitive(element); | ||
4089 | } or | ||
4090 | { find mustInstanceOfInformationLink_class(problem,interpretation,element); } | ||
4091 | /** | ||
4092 | * An element must be an instance of type "FunctionalInterface class". | ||
4093 | */ | ||
4094 | private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
4095 | Type.name(type,"FunctionalInterface class"); | ||
4096 | find directInstanceOf(problem,interpretation,element,type); | ||
4097 | } | ||
4098 | private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
4099 | find interpretation(problem,interpretation); | ||
4100 | PartialInterpretation.scopes(interpretation,scope); | ||
4101 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
4102 | Scope.maxNewElements(scope,0); | ||
4103 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
4104 | Type.name(type,"FunctionalInterface class"); | ||
4105 | } | ||
4106 | |||
4107 | /** | ||
4108 | * An element may be an instance of type "FunctionalInterface class". | ||
4109 | */ | ||
4110 | private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
4111 | { | ||
4112 | find interpretation(problem,interpretation); | ||
4113 | PartialInterpretation.newElements(interpretation,element); | ||
4114 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
4115 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
4116 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
4117 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
4118 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
4119 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
4120 | neg find isPrimitive(element); | ||
4121 | } or { | ||
4122 | find interpretation(problem,interpretation); | ||
4123 | PartialInterpretation.openWorldElements(interpretation,element); | ||
4124 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
4125 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
4126 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
4127 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
4128 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
4129 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
4130 | neg find isPrimitive(element); | ||
4131 | } or | ||
4132 | { find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } | ||
4133 | /** | ||
4134 | * An element must be an instance of type "FunctionalInput class". | ||
4135 | */ | ||
4136 | private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
4137 | Type.name(type,"FunctionalInput class"); | ||
4138 | find directInstanceOf(problem,interpretation,element,type); | ||
4139 | } | ||
4140 | private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
4141 | find interpretation(problem,interpretation); | ||
4142 | PartialInterpretation.scopes(interpretation,scope); | ||
4143 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
4144 | Scope.maxNewElements(scope,0); | ||
4145 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
4146 | Type.name(type,"FunctionalInput class"); | ||
4147 | } | ||
4148 | |||
4149 | /** | ||
4150 | * An element may be an instance of type "FunctionalInput class". | ||
4151 | */ | ||
4152 | private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
4153 | { | ||
4154 | find interpretation(problem,interpretation); | ||
4155 | PartialInterpretation.newElements(interpretation,element); | ||
4156 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
4157 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
4158 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
4159 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
4160 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
4161 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
4162 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
4163 | neg find isPrimitive(element); | ||
4164 | } or { | ||
4165 | find interpretation(problem,interpretation); | ||
4166 | PartialInterpretation.openWorldElements(interpretation,element); | ||
4167 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
4168 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
4169 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
4170 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
4171 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
4172 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
4173 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
4174 | neg find isPrimitive(element); | ||
4175 | } or | ||
4176 | { find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } | ||
4177 | /** | ||
4178 | * An element must be an instance of type "FunctionalOutput class". | ||
4179 | */ | ||
4180 | private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
4181 | Type.name(type,"FunctionalOutput class"); | ||
4182 | find directInstanceOf(problem,interpretation,element,type); | ||
4183 | } | ||
4184 | private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
4185 | find interpretation(problem,interpretation); | ||
4186 | PartialInterpretation.scopes(interpretation,scope); | ||
4187 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
4188 | Scope.maxNewElements(scope,0); | ||
4189 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
4190 | Type.name(type,"FunctionalOutput class"); | ||
4191 | } | ||
4192 | |||
4193 | /** | ||
4194 | * An element may be an instance of type "FunctionalOutput class". | ||
4195 | */ | ||
4196 | private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
4197 | { | ||
4198 | find interpretation(problem,interpretation); | ||
4199 | PartialInterpretation.newElements(interpretation,element); | ||
4200 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
4201 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
4202 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
4203 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
4204 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
4205 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
4206 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
4207 | neg find isPrimitive(element); | ||
4208 | } or { | ||
4209 | find interpretation(problem,interpretation); | ||
4210 | PartialInterpretation.openWorldElements(interpretation,element); | ||
4211 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
4212 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
4213 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
4214 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
4215 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
4216 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
4217 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
4218 | neg find isPrimitive(element); | ||
4219 | } or | ||
4220 | { find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } | ||
4221 | /** | ||
4222 | * An element must be an instance of type "FunctionalData class". | ||
4223 | */ | ||
4224 | private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
4225 | Type.name(type,"FunctionalData class"); | ||
4226 | find directInstanceOf(problem,interpretation,element,type); | ||
4227 | } | ||
4228 | private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
4229 | find interpretation(problem,interpretation); | ||
4230 | PartialInterpretation.scopes(interpretation,scope); | ||
4231 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
4232 | Scope.maxNewElements(scope,0); | ||
4233 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
4234 | Type.name(type,"FunctionalData class"); | ||
4235 | } | ||
4236 | |||
4237 | /** | ||
4238 | * An element may be an instance of type "FunctionalData class". | ||
4239 | */ | ||
4240 | private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
4241 | { | ||
4242 | find interpretation(problem,interpretation); | ||
4243 | PartialInterpretation.newElements(interpretation,element); | ||
4244 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
4245 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
4246 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
4247 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
4248 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
4249 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
4250 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
4251 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
4252 | neg find isPrimitive(element); | ||
4253 | } or { | ||
4254 | find interpretation(problem,interpretation); | ||
4255 | PartialInterpretation.openWorldElements(interpretation,element); | ||
4256 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
4257 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
4258 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
4259 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
4260 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
4261 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
4262 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
4263 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
4264 | neg find isPrimitive(element); | ||
4265 | } or | ||
4266 | { find mustInstanceOfFunctionalData_class(problem,interpretation,element); } | ||
4267 | /** | ||
4268 | * An element must be an instance of type "FunctionType enum". | ||
4269 | */ | ||
4270 | private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
4271 | Type.name(type,"FunctionType enum"); | ||
4272 | find directInstanceOf(problem,interpretation,element,type); | ||
4273 | } | ||
4274 | private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
4275 | find interpretation(problem,interpretation); | ||
4276 | PartialInterpretation.scopes(interpretation,scope); | ||
4277 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
4278 | Scope.maxNewElements(scope,0); | ||
4279 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
4280 | Type.name(type,"FunctionType enum"); | ||
4281 | } | ||
4282 | |||
4283 | /** | ||
4284 | * An element may be an instance of type "FunctionType enum". | ||
4285 | */ | ||
4286 | private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
4287 | { find mustInstanceOfFunctionType_enum(problem,interpretation,element); } | ||
4288 | /** | ||
4289 | * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
4290 | */ | ||
4291 | private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
4292 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
4293 | find directInstanceOf(problem,interpretation,element,type); | ||
4294 | } | ||
4295 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
4296 | find interpretation(problem,interpretation); | ||
4297 | PartialInterpretation.scopes(interpretation,scope); | ||
4298 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
4299 | Scope.maxNewElements(scope,0); | ||
4300 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
4301 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
4302 | } | ||
4303 | |||
4304 | /** | ||
4305 | * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
4306 | */ | ||
4307 | private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
4308 | { find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } | ||
4309 | /** | ||
4310 | * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
4311 | */ | ||
4312 | private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
4313 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
4314 | find directInstanceOf(problem,interpretation,element,type); | ||
4315 | } | ||
4316 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
4317 | find interpretation(problem,interpretation); | ||
4318 | PartialInterpretation.scopes(interpretation,scope); | ||
4319 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
4320 | Scope.maxNewElements(scope,0); | ||
4321 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
4322 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
4323 | } | ||
4324 | |||
4325 | /** | ||
4326 | * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
4327 | */ | ||
4328 | private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
4329 | { | ||
4330 | find interpretation(problem,interpretation); | ||
4331 | PartialInterpretation.newElements(interpretation,element); | ||
4332 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
4333 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
4334 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
4335 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
4336 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
4337 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
4338 | neg find isPrimitive(element); | ||
4339 | } or { | ||
4340 | find interpretation(problem,interpretation); | ||
4341 | PartialInterpretation.openWorldElements(interpretation,element); | ||
4342 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
4343 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
4344 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
4345 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
4346 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
4347 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
4348 | neg find isPrimitive(element); | ||
4349 | } or | ||
4350 | { find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } | ||
4351 | |||
4352 | ////////// | ||
4353 | // 1.2 Relation Declaration Indexers | ||
4354 | ////////// | ||
4355 | /** | ||
4356 | * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) | ||
4357 | */ | ||
4358 | private pattern mustInRelationinterface_reference_FunctionalElement( | ||
4359 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4360 | source: DefinedElement, target:DefinedElement) | ||
4361 | { | ||
4362 | find interpretation(problem,interpretation); | ||
4363 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
4364 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); | ||
4365 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
4366 | BinaryElementRelationLink.param1(link,source); | ||
4367 | BinaryElementRelationLink.param2(link,target); | ||
4368 | } | ||
4369 | /** | ||
4370 | * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) | ||
4371 | */ | ||
4372 | private pattern mayInRelationinterface_reference_FunctionalElement( | ||
4373 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4374 | source: DefinedElement, target:DefinedElement) | ||
4375 | { | ||
4376 | find interpretation(problem,interpretation); | ||
4377 | // The two endpoint of the link have to exist | ||
4378 | find mayExist(problem, interpretation, source); | ||
4379 | find mayExist(problem, interpretation, target); | ||
4380 | // Type consistency | ||
4381 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
4382 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
4383 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
4384 | // the upper bound of the multiplicity should be considered. | ||
4385 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); | ||
4386 | check(numberOfExistingReferences < 1); | ||
4387 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
4388 | // the upper bound of the opposite reference multiplicity should be considered. | ||
4389 | numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); | ||
4390 | check(numberOfExistingOppositeReferences < 1); | ||
4391 | // The reference is containment, then a new reference cannot be create if: | ||
4392 | // 1. Multiple parents | ||
4393 | neg find mustContains4(problem,interpretation,_,target); | ||
4394 | // 2. Circle in the containment hierarchy | ||
4395 | neg find mustTransitiveContains(source,target); | ||
4396 | } or { | ||
4397 | find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); | ||
4398 | } | ||
4399 | /** | ||
4400 | * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) | ||
4401 | */ | ||
4402 | private pattern mustInRelationmodel_reference_FunctionalElement( | ||
4403 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4404 | source: DefinedElement, target:DefinedElement) | ||
4405 | { | ||
4406 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); | ||
4407 | } | ||
4408 | /** | ||
4409 | * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) | ||
4410 | */ | ||
4411 | private pattern mayInRelationmodel_reference_FunctionalElement( | ||
4412 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4413 | source: DefinedElement, target:DefinedElement) | ||
4414 | { | ||
4415 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); | ||
4416 | } | ||
4417 | /** | ||
4418 | * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) | ||
4419 | */ | ||
4420 | private pattern mustInRelationparent_reference_FunctionalElement( | ||
4421 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4422 | source: DefinedElement, target:DefinedElement) | ||
4423 | { | ||
4424 | find interpretation(problem,interpretation); | ||
4425 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
4426 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); | ||
4427 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
4428 | BinaryElementRelationLink.param1(link,source); | ||
4429 | BinaryElementRelationLink.param2(link,target); | ||
4430 | } | ||
4431 | /** | ||
4432 | * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) | ||
4433 | */ | ||
4434 | private pattern mayInRelationparent_reference_FunctionalElement( | ||
4435 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4436 | source: DefinedElement, target:DefinedElement) | ||
4437 | { | ||
4438 | find interpretation(problem,interpretation); | ||
4439 | // The two endpoint of the link have to exist | ||
4440 | find mayExist(problem, interpretation, source); | ||
4441 | find mayExist(problem, interpretation, target); | ||
4442 | // Type consistency | ||
4443 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
4444 | find mayInstanceOfFunction_class(problem,interpretation,target); | ||
4445 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
4446 | // the upper bound of the multiplicity should be considered. | ||
4447 | numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); | ||
4448 | check(numberOfExistingReferences < 1); | ||
4449 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
4450 | // 1. Multiple parents | ||
4451 | neg find mustContains4(problem,interpretation,source,_); | ||
4452 | // 2. Circle in the containment hierarchy | ||
4453 | neg find mustTransitiveContains(source,target); | ||
4454 | } or { | ||
4455 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); | ||
4456 | } | ||
4457 | /** | ||
4458 | * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) | ||
4459 | */ | ||
4460 | private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( | ||
4461 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4462 | source: DefinedElement, target:DefinedElement) | ||
4463 | { | ||
4464 | find interpretation(problem,interpretation); | ||
4465 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
4466 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
4467 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
4468 | BinaryElementRelationLink.param1(link,source); | ||
4469 | BinaryElementRelationLink.param2(link,target); | ||
4470 | } | ||
4471 | /** | ||
4472 | * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) | ||
4473 | */ | ||
4474 | private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( | ||
4475 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4476 | source: DefinedElement, target:DefinedElement) | ||
4477 | { | ||
4478 | find interpretation(problem,interpretation); | ||
4479 | // The two endpoint of the link have to exist | ||
4480 | find mayExist(problem, interpretation, source); | ||
4481 | find mayExist(problem, interpretation, target); | ||
4482 | // Type consistency | ||
4483 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); | ||
4484 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
4485 | // The reference is containment, then a new reference cannot be create if: | ||
4486 | // 1. Multiple parents | ||
4487 | neg find mustContains4(problem,interpretation,_,target); | ||
4488 | // 2. Circle in the containment hierarchy | ||
4489 | neg find mustTransitiveContains(source,target); | ||
4490 | } or { | ||
4491 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); | ||
4492 | } | ||
4493 | /** | ||
4494 | * Matcher for detecting tuples t where []subElements reference Function(source,target) | ||
4495 | */ | ||
4496 | private pattern mustInRelationsubElements_reference_Function( | ||
4497 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4498 | source: DefinedElement, target:DefinedElement) | ||
4499 | { | ||
4500 | find interpretation(problem,interpretation); | ||
4501 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
4502 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); | ||
4503 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
4504 | BinaryElementRelationLink.param1(link,source); | ||
4505 | BinaryElementRelationLink.param2(link,target); | ||
4506 | } | ||
4507 | /** | ||
4508 | * Matcher for detecting tuples t where <>subElements reference Function(source,target) | ||
4509 | */ | ||
4510 | private pattern mayInRelationsubElements_reference_Function( | ||
4511 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4512 | source: DefinedElement, target:DefinedElement) | ||
4513 | { | ||
4514 | find interpretation(problem,interpretation); | ||
4515 | // The two endpoint of the link have to exist | ||
4516 | find mayExist(problem, interpretation, source); | ||
4517 | find mayExist(problem, interpretation, target); | ||
4518 | // Type consistency | ||
4519 | find mayInstanceOfFunction_class(problem,interpretation,source); | ||
4520 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
4521 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
4522 | // the upper bound of the opposite reference multiplicity should be considered. | ||
4523 | numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); | ||
4524 | check(numberOfExistingOppositeReferences < 1); | ||
4525 | // The reference is containment, then a new reference cannot be create if: | ||
4526 | // 1. Multiple parents | ||
4527 | neg find mustContains4(problem,interpretation,_,target); | ||
4528 | // 2. Circle in the containment hierarchy | ||
4529 | neg find mustTransitiveContains(source,target); | ||
4530 | } or { | ||
4531 | find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); | ||
4532 | } | ||
4533 | /** | ||
4534 | * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) | ||
4535 | */ | ||
4536 | private pattern mustInRelationdata_reference_FAMTerminator( | ||
4537 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4538 | source: DefinedElement, target:DefinedElement) | ||
4539 | { | ||
4540 | find interpretation(problem,interpretation); | ||
4541 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
4542 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); | ||
4543 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
4544 | BinaryElementRelationLink.param1(link,source); | ||
4545 | BinaryElementRelationLink.param2(link,target); | ||
4546 | } | ||
4547 | /** | ||
4548 | * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) | ||
4549 | */ | ||
4550 | private pattern mayInRelationdata_reference_FAMTerminator( | ||
4551 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4552 | source: DefinedElement, target:DefinedElement) | ||
4553 | { | ||
4554 | find interpretation(problem,interpretation); | ||
4555 | // The two endpoint of the link have to exist | ||
4556 | find mayExist(problem, interpretation, source); | ||
4557 | find mayExist(problem, interpretation, target); | ||
4558 | // Type consistency | ||
4559 | find mayInstanceOfFAMTerminator_class(problem,interpretation,source); | ||
4560 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
4561 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
4562 | // the upper bound of the multiplicity should be considered. | ||
4563 | numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); | ||
4564 | check(numberOfExistingReferences < 1); | ||
4565 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
4566 | // the upper bound of the opposite reference multiplicity should be considered. | ||
4567 | numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); | ||
4568 | check(numberOfExistingOppositeReferences < 1); | ||
4569 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
4570 | // 1. Multiple parents | ||
4571 | neg find mustContains4(problem,interpretation,source,_); | ||
4572 | // 2. Circle in the containment hierarchy | ||
4573 | neg find mustTransitiveContains(source,target); | ||
4574 | } or { | ||
4575 | find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); | ||
4576 | } | ||
4577 | /** | ||
4578 | * Matcher for detecting tuples t where []from reference InformationLink(source,target) | ||
4579 | */ | ||
4580 | private pattern mustInRelationfrom_reference_InformationLink( | ||
4581 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4582 | source: DefinedElement, target:DefinedElement) | ||
4583 | { | ||
4584 | find interpretation(problem,interpretation); | ||
4585 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
4586 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); | ||
4587 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
4588 | BinaryElementRelationLink.param1(link,source); | ||
4589 | BinaryElementRelationLink.param2(link,target); | ||
4590 | } | ||
4591 | /** | ||
4592 | * Matcher for detecting tuples t where <>from reference InformationLink(source,target) | ||
4593 | */ | ||
4594 | private pattern mayInRelationfrom_reference_InformationLink( | ||
4595 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4596 | source: DefinedElement, target:DefinedElement) | ||
4597 | { | ||
4598 | find interpretation(problem,interpretation); | ||
4599 | // The two endpoint of the link have to exist | ||
4600 | find mayExist(problem, interpretation, source); | ||
4601 | find mayExist(problem, interpretation, target); | ||
4602 | // Type consistency | ||
4603 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
4604 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); | ||
4605 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
4606 | // the upper bound of the multiplicity should be considered. | ||
4607 | numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); | ||
4608 | check(numberOfExistingReferences < 1); | ||
4609 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
4610 | // 1. Multiple parents | ||
4611 | neg find mustContains4(problem,interpretation,source,_); | ||
4612 | // 2. Circle in the containment hierarchy | ||
4613 | neg find mustTransitiveContains(source,target); | ||
4614 | } or { | ||
4615 | find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); | ||
4616 | } | ||
4617 | /** | ||
4618 | * Matcher for detecting tuples t where []to reference InformationLink(source,target) | ||
4619 | */ | ||
4620 | private pattern mustInRelationto_reference_InformationLink( | ||
4621 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4622 | source: DefinedElement, target:DefinedElement) | ||
4623 | { | ||
4624 | find interpretation(problem,interpretation); | ||
4625 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
4626 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
4627 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
4628 | BinaryElementRelationLink.param1(link,source); | ||
4629 | BinaryElementRelationLink.param2(link,target); | ||
4630 | } | ||
4631 | /** | ||
4632 | * Matcher for detecting tuples t where <>to reference InformationLink(source,target) | ||
4633 | */ | ||
4634 | private pattern mayInRelationto_reference_InformationLink( | ||
4635 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4636 | source: DefinedElement, target:DefinedElement) | ||
4637 | { | ||
4638 | find interpretation(problem,interpretation); | ||
4639 | // The two endpoint of the link have to exist | ||
4640 | find mayExist(problem, interpretation, source); | ||
4641 | find mayExist(problem, interpretation, target); | ||
4642 | // Type consistency | ||
4643 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
4644 | find mayInstanceOfFunctionalInput_class(problem,interpretation,target); | ||
4645 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
4646 | // the upper bound of the multiplicity should be considered. | ||
4647 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); | ||
4648 | check(numberOfExistingReferences < 1); | ||
4649 | } or { | ||
4650 | find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); | ||
4651 | } | ||
4652 | /** | ||
4653 | * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) | ||
4654 | */ | ||
4655 | private pattern mustInRelationdata_reference_FunctionalInterface( | ||
4656 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4657 | source: DefinedElement, target:DefinedElement) | ||
4658 | { | ||
4659 | find interpretation(problem,interpretation); | ||
4660 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
4661 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); | ||
4662 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
4663 | BinaryElementRelationLink.param1(link,source); | ||
4664 | BinaryElementRelationLink.param2(link,target); | ||
4665 | } | ||
4666 | /** | ||
4667 | * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) | ||
4668 | */ | ||
4669 | private pattern mayInRelationdata_reference_FunctionalInterface( | ||
4670 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4671 | source: DefinedElement, target:DefinedElement) | ||
4672 | { | ||
4673 | find interpretation(problem,interpretation); | ||
4674 | // The two endpoint of the link have to exist | ||
4675 | find mayExist(problem, interpretation, source); | ||
4676 | find mayExist(problem, interpretation, target); | ||
4677 | // Type consistency | ||
4678 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
4679 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
4680 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
4681 | // the upper bound of the opposite reference multiplicity should be considered. | ||
4682 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); | ||
4683 | check(numberOfExistingOppositeReferences < 1); | ||
4684 | // The reference is containment, then a new reference cannot be create if: | ||
4685 | // 1. Multiple parents | ||
4686 | neg find mustContains4(problem,interpretation,_,target); | ||
4687 | // 2. Circle in the containment hierarchy | ||
4688 | neg find mustTransitiveContains(source,target); | ||
4689 | } or { | ||
4690 | find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); | ||
4691 | } | ||
4692 | /** | ||
4693 | * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) | ||
4694 | */ | ||
4695 | private pattern mustInRelationelement_reference_FunctionalInterface( | ||
4696 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4697 | source: DefinedElement, target:DefinedElement) | ||
4698 | { | ||
4699 | find interpretation(problem,interpretation); | ||
4700 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
4701 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); | ||
4702 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
4703 | BinaryElementRelationLink.param1(link,source); | ||
4704 | BinaryElementRelationLink.param2(link,target); | ||
4705 | } | ||
4706 | /** | ||
4707 | * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) | ||
4708 | */ | ||
4709 | private pattern mayInRelationelement_reference_FunctionalInterface( | ||
4710 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4711 | source: DefinedElement, target:DefinedElement) | ||
4712 | { | ||
4713 | find interpretation(problem,interpretation); | ||
4714 | // The two endpoint of the link have to exist | ||
4715 | find mayExist(problem, interpretation, source); | ||
4716 | find mayExist(problem, interpretation, target); | ||
4717 | // Type consistency | ||
4718 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
4719 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
4720 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
4721 | // the upper bound of the multiplicity should be considered. | ||
4722 | numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); | ||
4723 | check(numberOfExistingReferences < 1); | ||
4724 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
4725 | // the upper bound of the opposite reference multiplicity should be considered. | ||
4726 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); | ||
4727 | check(numberOfExistingOppositeReferences < 1); | ||
4728 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
4729 | // 1. Multiple parents | ||
4730 | neg find mustContains4(problem,interpretation,source,_); | ||
4731 | // 2. Circle in the containment hierarchy | ||
4732 | neg find mustTransitiveContains(source,target); | ||
4733 | } or { | ||
4734 | find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); | ||
4735 | } | ||
4736 | /** | ||
4737 | * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) | ||
4738 | */ | ||
4739 | private pattern mustInRelationIncomingLinks_reference_FunctionalInput( | ||
4740 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4741 | source: DefinedElement, target:DefinedElement) | ||
4742 | { | ||
4743 | find interpretation(problem,interpretation); | ||
4744 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
4745 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
4746 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
4747 | BinaryElementRelationLink.param1(link,source); | ||
4748 | BinaryElementRelationLink.param2(link,target); | ||
4749 | } | ||
4750 | /** | ||
4751 | * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) | ||
4752 | */ | ||
4753 | private pattern mayInRelationIncomingLinks_reference_FunctionalInput( | ||
4754 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4755 | source: DefinedElement, target:DefinedElement) | ||
4756 | { | ||
4757 | find interpretation(problem,interpretation); | ||
4758 | // The two endpoint of the link have to exist | ||
4759 | find mayExist(problem, interpretation, source); | ||
4760 | find mayExist(problem, interpretation, target); | ||
4761 | // Type consistency | ||
4762 | find mayInstanceOfFunctionalInput_class(problem,interpretation,source); | ||
4763 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
4764 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
4765 | // the upper bound of the opposite reference multiplicity should be considered. | ||
4766 | numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); | ||
4767 | check(numberOfExistingOppositeReferences < 1); | ||
4768 | } or { | ||
4769 | find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); | ||
4770 | } | ||
4771 | /** | ||
4772 | * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) | ||
4773 | */ | ||
4774 | private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( | ||
4775 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4776 | source: DefinedElement, target:DefinedElement) | ||
4777 | { | ||
4778 | find interpretation(problem,interpretation); | ||
4779 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
4780 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); | ||
4781 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
4782 | BinaryElementRelationLink.param1(link,source); | ||
4783 | BinaryElementRelationLink.param2(link,target); | ||
4784 | } | ||
4785 | /** | ||
4786 | * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) | ||
4787 | */ | ||
4788 | private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( | ||
4789 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4790 | source: DefinedElement, target:DefinedElement) | ||
4791 | { | ||
4792 | find interpretation(problem,interpretation); | ||
4793 | // The two endpoint of the link have to exist | ||
4794 | find mayExist(problem, interpretation, source); | ||
4795 | find mayExist(problem, interpretation, target); | ||
4796 | // Type consistency | ||
4797 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); | ||
4798 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
4799 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
4800 | // the upper bound of the opposite reference multiplicity should be considered. | ||
4801 | numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); | ||
4802 | check(numberOfExistingOppositeReferences < 1); | ||
4803 | // The reference is containment, then a new reference cannot be create if: | ||
4804 | // 1. Multiple parents | ||
4805 | neg find mustContains4(problem,interpretation,_,target); | ||
4806 | // 2. Circle in the containment hierarchy | ||
4807 | neg find mustTransitiveContains(source,target); | ||
4808 | } or { | ||
4809 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); | ||
4810 | } | ||
4811 | /** | ||
4812 | * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) | ||
4813 | */ | ||
4814 | private pattern mustInRelationterminator_reference_FunctionalData( | ||
4815 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4816 | source: DefinedElement, target:DefinedElement) | ||
4817 | { | ||
4818 | find interpretation(problem,interpretation); | ||
4819 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
4820 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); | ||
4821 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
4822 | BinaryElementRelationLink.param1(link,source); | ||
4823 | BinaryElementRelationLink.param2(link,target); | ||
4824 | } | ||
4825 | /** | ||
4826 | * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) | ||
4827 | */ | ||
4828 | private pattern mayInRelationterminator_reference_FunctionalData( | ||
4829 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4830 | source: DefinedElement, target:DefinedElement) | ||
4831 | { | ||
4832 | find interpretation(problem,interpretation); | ||
4833 | // The two endpoint of the link have to exist | ||
4834 | find mayExist(problem, interpretation, source); | ||
4835 | find mayExist(problem, interpretation, target); | ||
4836 | // Type consistency | ||
4837 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
4838 | find mayInstanceOfFAMTerminator_class(problem,interpretation,target); | ||
4839 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
4840 | // the upper bound of the multiplicity should be considered. | ||
4841 | numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); | ||
4842 | check(numberOfExistingReferences < 1); | ||
4843 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
4844 | // the upper bound of the opposite reference multiplicity should be considered. | ||
4845 | numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); | ||
4846 | check(numberOfExistingOppositeReferences < 1); | ||
4847 | // The reference is containment, then a new reference cannot be create if: | ||
4848 | // 1. Multiple parents | ||
4849 | neg find mustContains4(problem,interpretation,_,target); | ||
4850 | // 2. Circle in the containment hierarchy | ||
4851 | neg find mustTransitiveContains(source,target); | ||
4852 | } or { | ||
4853 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); | ||
4854 | } | ||
4855 | /** | ||
4856 | * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) | ||
4857 | */ | ||
4858 | private pattern mustInRelationinterface_reference_FunctionalData( | ||
4859 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4860 | source: DefinedElement, target:DefinedElement) | ||
4861 | { | ||
4862 | find interpretation(problem,interpretation); | ||
4863 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
4864 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); | ||
4865 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
4866 | BinaryElementRelationLink.param1(link,source); | ||
4867 | BinaryElementRelationLink.param2(link,target); | ||
4868 | } | ||
4869 | /** | ||
4870 | * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) | ||
4871 | */ | ||
4872 | private pattern mayInRelationinterface_reference_FunctionalData( | ||
4873 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4874 | source: DefinedElement, target:DefinedElement) | ||
4875 | { | ||
4876 | find interpretation(problem,interpretation); | ||
4877 | // The two endpoint of the link have to exist | ||
4878 | find mayExist(problem, interpretation, source); | ||
4879 | find mayExist(problem, interpretation, target); | ||
4880 | // Type consistency | ||
4881 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
4882 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
4883 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
4884 | // the upper bound of the multiplicity should be considered. | ||
4885 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); | ||
4886 | check(numberOfExistingReferences < 1); | ||
4887 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
4888 | // 1. Multiple parents | ||
4889 | neg find mustContains4(problem,interpretation,source,_); | ||
4890 | // 2. Circle in the containment hierarchy | ||
4891 | neg find mustTransitiveContains(source,target); | ||
4892 | } or { | ||
4893 | find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); | ||
4894 | } | ||
4895 | /** | ||
4896 | * Matcher for detecting tuples t where []type attribute Function(source,target) | ||
4897 | */ | ||
4898 | private pattern mustInRelationtype_attribute_Function( | ||
4899 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4900 | source: DefinedElement, target:DefinedElement) | ||
4901 | { | ||
4902 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); | ||
4903 | } | ||
4904 | /** | ||
4905 | * Matcher for detecting tuples t where []type attribute Function(source,target) | ||
4906 | */ | ||
4907 | private pattern mayInRelationtype_attribute_Function( | ||
4908 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4909 | source: DefinedElement, target:DefinedElement) | ||
4910 | { | ||
4911 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); | ||
4912 | } | ||
4913 | |||
4914 | ////////// | ||
4915 | // 1.3 Relation Definition Indexers | ||
4916 | ////////// | ||
4917 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam terminatorAndInformation | ||
4918 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( | ||
4919 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4920 | var_T, var_I) | ||
4921 | { | ||
4922 | find interpretation(problem,interpretation); | ||
4923 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
4924 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
4925 | // T is exported | ||
4926 | // I is exported | ||
4927 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
4928 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); | ||
4929 | find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); | ||
4930 | var_virtual0 == var_I; | ||
4931 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
4932 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); | ||
4933 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
4934 | var_virtual1 == var_T; | ||
4935 | }or{ | ||
4936 | find interpretation(problem,interpretation); | ||
4937 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
4938 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
4939 | // T is exported | ||
4940 | // I is exported | ||
4941 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
4942 | find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); | ||
4943 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); | ||
4944 | var_virtual0 == var_In; | ||
4945 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); | ||
4946 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); | ||
4947 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
4948 | var_virtual1 == var_T; | ||
4949 | } | ||
4950 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( | ||
4951 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4952 | var_T, var_I) | ||
4953 | { | ||
4954 | find interpretation(problem,interpretation); | ||
4955 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
4956 | find mayInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
4957 | // T is exported | ||
4958 | // I is exported | ||
4959 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
4960 | find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); | ||
4961 | find mayInstanceOfInformationLink_class(problem,interpretation,var_virtual0); | ||
4962 | find mayEquivalent(problem, interpretation, var_virtual0, var_I); | ||
4963 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
4964 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); | ||
4965 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
4966 | find mayEquivalent(problem, interpretation, var_virtual1, var_T); | ||
4967 | }or{ | ||
4968 | find interpretation(problem,interpretation); | ||
4969 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
4970 | find mayInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
4971 | // T is exported | ||
4972 | // I is exported | ||
4973 | find mayInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
4974 | find mayInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); | ||
4975 | find mayInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); | ||
4976 | find mayEquivalent(problem, interpretation, var_virtual0, var_In); | ||
4977 | find mayInstanceOfFunctionalInput_class(problem,interpretation,var_In); | ||
4978 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); | ||
4979 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
4980 | find mayEquivalent(problem, interpretation, var_virtual1, var_T); | ||
4981 | } | ||
4982 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( | ||
4983 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4984 | var_T, var_I) | ||
4985 | { | ||
4986 | find interpretation(problem,interpretation); | ||
4987 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
4988 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
4989 | // T is exported | ||
4990 | // I is exported | ||
4991 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
4992 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); | ||
4993 | find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); | ||
4994 | var_virtual0 == var_I; | ||
4995 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
4996 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); | ||
4997 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
4998 | var_virtual1 == var_T; | ||
4999 | }or{ | ||
5000 | find interpretation(problem,interpretation); | ||
5001 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
5002 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
5003 | // T is exported | ||
5004 | // I is exported | ||
5005 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
5006 | find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); | ||
5007 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); | ||
5008 | var_virtual0 == var_In; | ||
5009 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); | ||
5010 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); | ||
5011 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
5012 | var_virtual1 == var_T; | ||
5013 | } | ||
5014 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam type | ||
5015 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( | ||
5016 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5017 | var_This, var_Target) | ||
5018 | { | ||
5019 | find interpretation(problem,interpretation); | ||
5020 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
5021 | // type constraint is enforced by construction | ||
5022 | // This is exported | ||
5023 | // Target is exported | ||
5024 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
5025 | var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); | ||
5026 | var_Target == var_virtual0; | ||
5027 | }or{ | ||
5028 | find interpretation(problem,interpretation); | ||
5029 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
5030 | // type constraint is enforced by construction | ||
5031 | // This is exported | ||
5032 | // Target is exported | ||
5033 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
5034 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
5035 | var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); | ||
5036 | var_Target == var_virtual0; | ||
5037 | }or{ | ||
5038 | find interpretation(problem,interpretation); | ||
5039 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
5040 | // type constraint is enforced by construction | ||
5041 | // This is exported | ||
5042 | // Target is exported | ||
5043 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); | ||
5044 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
5045 | var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); | ||
5046 | var_Target == var_virtual0; | ||
5047 | } | ||
5048 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( | ||
5049 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5050 | var_This, var_Target) | ||
5051 | { | ||
5052 | find interpretation(problem,interpretation); | ||
5053 | find mayInstanceOfFunction_class(problem,interpretation,var_This); | ||
5054 | // type constraint is enforced by construction | ||
5055 | // This is exported | ||
5056 | // Target is exported | ||
5057 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
5058 | var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); | ||
5059 | find mayEquivalent(problem, interpretation, var_Target, var_virtual0); | ||
5060 | }or{ | ||
5061 | find interpretation(problem,interpretation); | ||
5062 | find mayInstanceOfFunction_class(problem,interpretation,var_This); | ||
5063 | // type constraint is enforced by construction | ||
5064 | // This is exported | ||
5065 | // Target is exported | ||
5066 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
5067 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
5068 | var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); | ||
5069 | find mayEquivalent(problem, interpretation, var_Target, var_virtual0); | ||
5070 | }or{ | ||
5071 | find interpretation(problem,interpretation); | ||
5072 | find mayInstanceOfFunction_class(problem,interpretation,var_This); | ||
5073 | // type constraint is enforced by construction | ||
5074 | // This is exported | ||
5075 | // Target is exported | ||
5076 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); | ||
5077 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
5078 | var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); | ||
5079 | find mayEquivalent(problem, interpretation, var_Target, var_virtual0); | ||
5080 | } | ||
5081 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( | ||
5082 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5083 | var_This, var_Target) | ||
5084 | { | ||
5085 | find interpretation(problem,interpretation); | ||
5086 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
5087 | // type constraint is enforced by construction | ||
5088 | // This is exported | ||
5089 | // Target is exported | ||
5090 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
5091 | var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); | ||
5092 | var_Target == var_virtual0; | ||
5093 | }or{ | ||
5094 | find interpretation(problem,interpretation); | ||
5095 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
5096 | // type constraint is enforced by construction | ||
5097 | // This is exported | ||
5098 | // Target is exported | ||
5099 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
5100 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
5101 | var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); | ||
5102 | var_Target == var_virtual0; | ||
5103 | }or{ | ||
5104 | find interpretation(problem,interpretation); | ||
5105 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
5106 | // type constraint is enforced by construction | ||
5107 | // This is exported | ||
5108 | // Target is exported | ||
5109 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); | ||
5110 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
5111 | var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); | ||
5112 | var_Target == var_virtual0; | ||
5113 | } | ||
5114 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam rootElements | ||
5115 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( | ||
5116 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5117 | var_Model, var_Root) | ||
5118 | { | ||
5119 | find interpretation(problem,interpretation); | ||
5120 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
5121 | find mustInstanceOfFunction_class(problem,interpretation,var_Root); | ||
5122 | // Model is exported | ||
5123 | // Root is exported | ||
5124 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
5125 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); | ||
5126 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); | ||
5127 | var_virtual0 == var_Root; | ||
5128 | } | ||
5129 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( | ||
5130 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5131 | var_Model, var_Root) | ||
5132 | { | ||
5133 | find interpretation(problem,interpretation); | ||
5134 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
5135 | find mayInstanceOfFunction_class(problem,interpretation,var_Root); | ||
5136 | // Model is exported | ||
5137 | // Root is exported | ||
5138 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
5139 | find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); | ||
5140 | find mayInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); | ||
5141 | find mayEquivalent(problem, interpretation, var_virtual0, var_Root); | ||
5142 | } | ||
5143 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( | ||
5144 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5145 | var_Model, var_Root) | ||
5146 | { | ||
5147 | find interpretation(problem,interpretation); | ||
5148 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
5149 | find mustInstanceOfFunction_class(problem,interpretation,var_Root); | ||
5150 | // Model is exported | ||
5151 | // Root is exported | ||
5152 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
5153 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); | ||
5154 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); | ||
5155 | var_virtual0 == var_Root; | ||
5156 | } | ||
5157 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam parent | ||
5158 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( | ||
5159 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5160 | var_Func, var_Par) | ||
5161 | { | ||
5162 | find interpretation(problem,interpretation); | ||
5163 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
5164 | find mustInstanceOfFunction_class(problem,interpretation,var_Par); | ||
5165 | // Func is exported | ||
5166 | // Par is exported | ||
5167 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
5168 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); | ||
5169 | find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); | ||
5170 | var_virtual0 == var_Par; | ||
5171 | } | ||
5172 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( | ||
5173 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5174 | var_Func, var_Par) | ||
5175 | { | ||
5176 | find interpretation(problem,interpretation); | ||
5177 | find mayInstanceOfFunction_class(problem,interpretation,var_Func); | ||
5178 | find mayInstanceOfFunction_class(problem,interpretation,var_Par); | ||
5179 | // Func is exported | ||
5180 | // Par is exported | ||
5181 | find mayInstanceOfFunction_class(problem,interpretation,var_Func); | ||
5182 | find mayInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); | ||
5183 | find mayInstanceOfFunction_class(problem,interpretation,var_virtual0); | ||
5184 | find mayEquivalent(problem, interpretation, var_virtual0, var_Par); | ||
5185 | } | ||
5186 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( | ||
5187 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5188 | var_Func, var_Par) | ||
5189 | { | ||
5190 | find interpretation(problem,interpretation); | ||
5191 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
5192 | find mustInstanceOfFunction_class(problem,interpretation,var_Par); | ||
5193 | // Func is exported | ||
5194 | // Par is exported | ||
5195 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
5196 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); | ||
5197 | find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); | ||
5198 | var_virtual0 == var_Par; | ||
5199 | } | ||
5200 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam model | ||
5201 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( | ||
5202 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5203 | var_This, var_Target) | ||
5204 | { | ||
5205 | find interpretation(problem,interpretation); | ||
5206 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
5207 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
5208 | // This is exported | ||
5209 | // Target is exported | ||
5210 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
5211 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
5212 | } | ||
5213 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( | ||
5214 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5215 | var_This, var_Target) | ||
5216 | { | ||
5217 | find interpretation(problem,interpretation); | ||
5218 | find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
5219 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
5220 | // This is exported | ||
5221 | // Target is exported | ||
5222 | find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
5223 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
5224 | } | ||
5225 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( | ||
5226 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5227 | var_This, var_Target) | ||
5228 | { | ||
5229 | find interpretation(problem,interpretation); | ||
5230 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
5231 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
5232 | // This is exported | ||
5233 | // Target is exported | ||
5234 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
5235 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
5236 | } | ||
5237 | |||
5238 | ////////// | ||
5239 | // 1.4 Containment Indexer | ||
5240 | ////////// | ||
5241 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
5242 | find mustContains4(_,_,source,target); | ||
5243 | } | ||
5244 | |||
5245 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5246 | source: DefinedElement, target: DefinedElement) | ||
5247 | { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or | ||
5248 | |||
5249 | { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or | ||
5250 | |||
5251 | { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or | ||
5252 | |||
5253 | { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or | ||
5254 | |||
5255 | { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or | ||
5256 | |||
5257 | { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } | ||
5258 | |||
5259 | private pattern mustTransitiveContains(source,target) { | ||
5260 | find mustContains2+(source,target); | ||
5261 | } | ||
5262 | |||
5263 | ////////// | ||
5264 | // 2. Invalidation Indexers | ||
5265 | ////////// | ||
5266 | // 2.1 Invalidated by WF Queries | ||
5267 | ////////// | ||
5268 | |||
5269 | ////////// | ||
5270 | // 3. Unfinishedness Indexers | ||
5271 | ////////// | ||
5272 | // 3.1 Unfinishedness Measured by Multiplicity | ||
5273 | ////////// | ||
5274 | pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
5275 | find interpretation(problem,interpretation); | ||
5276 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
5277 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
5278 | find mustInstanceOfInformationLink_class(problem,interpretation,object); | ||
5279 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); | ||
5280 | check(numberOfExistingReferences < 1); | ||
5281 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
5282 | } | ||
5283 | |||
5284 | ////////// | ||
5285 | // 3.2 Unfinishedness Measured by WF Queries | ||
5286 | ////////// | ||
5287 | |||
5288 | ////////// | ||
5289 | // 4. Refinement Indexers | ||
5290 | ////////// | ||
5291 | // 4.1 Object constructors | ||
5292 | ////////// | ||
5293 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
5294 | { | ||
5295 | find interpretation(problem,interpretation); | ||
5296 | find mustInstanceOfFunctionalData_class(problem,interpretation,root); | ||
5297 | find mustExist(problem, interpretation, root); | ||
5298 | }or{ | ||
5299 | find interpretation(problem,interpretation); | ||
5300 | find mustInstanceOfInformationLink_class(problem,interpretation,root); | ||
5301 | find mustExist(problem, interpretation, root); | ||
5302 | }or{ | ||
5303 | find interpretation(problem,interpretation); | ||
5304 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); | ||
5305 | find mustExist(problem, interpretation, root); | ||
5306 | }or{ | ||
5307 | find interpretation(problem,interpretation); | ||
5308 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); | ||
5309 | find mustExist(problem, interpretation, root); | ||
5310 | }or{ | ||
5311 | find interpretation(problem,interpretation); | ||
5312 | find mustInstanceOfFAMTerminator_class(problem,interpretation,root); | ||
5313 | find mustExist(problem, interpretation, root); | ||
5314 | }or{ | ||
5315 | find interpretation(problem,interpretation); | ||
5316 | find mustInstanceOfFunctionalElement_class(problem,interpretation,root); | ||
5317 | find mustExist(problem, interpretation, root); | ||
5318 | }or{ | ||
5319 | find interpretation(problem,interpretation); | ||
5320 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); | ||
5321 | find mustExist(problem, interpretation, root); | ||
5322 | }or{ | ||
5323 | find interpretation(problem,interpretation); | ||
5324 | find mustInstanceOfFunction_class(problem,interpretation,root); | ||
5325 | find mustExist(problem, interpretation, root); | ||
5326 | }or{ | ||
5327 | find interpretation(problem,interpretation); | ||
5328 | find mustInstanceOfFunctionalInput_class(problem,interpretation,root); | ||
5329 | find mustExist(problem, interpretation, root); | ||
5330 | }or{ | ||
5331 | find interpretation(problem,interpretation); | ||
5332 | find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); | ||
5333 | find mustExist(problem, interpretation, root); | ||
5334 | }or{ | ||
5335 | find interpretation(problem,interpretation); | ||
5336 | find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); | ||
5337 | find mustExist(problem, interpretation, root); | ||
5338 | } | ||
5339 | pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
5340 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5341 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
5342 | container:DefinedElement) | ||
5343 | { | ||
5344 | find interpretation(problem,interpretation); | ||
5345 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5346 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
5347 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
5348 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
5349 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
5350 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
5351 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
5352 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
5353 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
5354 | find mustExist(problem, interpretation, container); | ||
5355 | neg find mustExist(problem, interpretation, newObject); | ||
5356 | } | ||
5357 | pattern createObject_FunctionalOutput_class( | ||
5358 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5359 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5360 | { | ||
5361 | find interpretation(problem,interpretation); | ||
5362 | neg find hasElementInContainment(problem,interpretation); | ||
5363 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5364 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
5365 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
5366 | find mayExist(problem, interpretation, newObject); | ||
5367 | neg find mustExist(problem, interpretation, newObject); | ||
5368 | } | ||
5369 | pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( | ||
5370 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5371 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
5372 | container:DefinedElement) | ||
5373 | { | ||
5374 | find interpretation(problem,interpretation); | ||
5375 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5376 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
5377 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
5378 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); | ||
5379 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
5380 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); | ||
5381 | find mustInstanceOfFunctionalData_class(problem,interpretation,container); | ||
5382 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
5383 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); | ||
5384 | find mustExist(problem, interpretation, container); | ||
5385 | neg find mustExist(problem, interpretation, newObject); | ||
5386 | } | ||
5387 | pattern createObject_FAMTerminator_class( | ||
5388 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5389 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5390 | { | ||
5391 | find interpretation(problem,interpretation); | ||
5392 | neg find hasElementInContainment(problem,interpretation); | ||
5393 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5394 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
5395 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
5396 | find mayExist(problem, interpretation, newObject); | ||
5397 | neg find mustExist(problem, interpretation, newObject); | ||
5398 | } | ||
5399 | pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( | ||
5400 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5401 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
5402 | container:DefinedElement) | ||
5403 | { | ||
5404 | find interpretation(problem,interpretation); | ||
5405 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5406 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
5407 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
5408 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
5409 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); | ||
5410 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
5411 | find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); | ||
5412 | find mustExist(problem, interpretation, container); | ||
5413 | neg find mustExist(problem, interpretation, newObject); | ||
5414 | } | ||
5415 | pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( | ||
5416 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5417 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
5418 | container:DefinedElement) | ||
5419 | { | ||
5420 | find interpretation(problem,interpretation); | ||
5421 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5422 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
5423 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
5424 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); | ||
5425 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
5426 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); | ||
5427 | find mustInstanceOfFunction_class(problem,interpretation,container); | ||
5428 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
5429 | find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); | ||
5430 | find mustExist(problem, interpretation, container); | ||
5431 | neg find mustExist(problem, interpretation, newObject); | ||
5432 | } | ||
5433 | pattern createObject_Function_class( | ||
5434 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5435 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5436 | { | ||
5437 | find interpretation(problem,interpretation); | ||
5438 | neg find hasElementInContainment(problem,interpretation); | ||
5439 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5440 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
5441 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
5442 | find mayExist(problem, interpretation, newObject); | ||
5443 | neg find mustExist(problem, interpretation, newObject); | ||
5444 | } | ||
5445 | pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
5446 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5447 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
5448 | container:DefinedElement) | ||
5449 | { | ||
5450 | find interpretation(problem,interpretation); | ||
5451 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5452 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
5453 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
5454 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
5455 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
5456 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
5457 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
5458 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
5459 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
5460 | find mustExist(problem, interpretation, container); | ||
5461 | neg find mustExist(problem, interpretation, newObject); | ||
5462 | } | ||
5463 | pattern createObject_FunctionalInput_class( | ||
5464 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5465 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5466 | { | ||
5467 | find interpretation(problem,interpretation); | ||
5468 | neg find hasElementInContainment(problem,interpretation); | ||
5469 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5470 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
5471 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
5472 | find mayExist(problem, interpretation, newObject); | ||
5473 | neg find mustExist(problem, interpretation, newObject); | ||
5474 | } | ||
5475 | pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( | ||
5476 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5477 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5478 | { | ||
5479 | find interpretation(problem,interpretation); | ||
5480 | neg find hasElementInContainment(problem,interpretation); | ||
5481 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5482 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); | ||
5483 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); | ||
5484 | find mayExist(problem, interpretation, newObject); | ||
5485 | neg find mustExist(problem, interpretation, newObject); | ||
5486 | } | ||
5487 | pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( | ||
5488 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5489 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
5490 | container:DefinedElement) | ||
5491 | { | ||
5492 | find interpretation(problem,interpretation); | ||
5493 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5494 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
5495 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
5496 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); | ||
5497 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
5498 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); | ||
5499 | find mustInstanceOfFunctionalElement_class(problem,interpretation,container); | ||
5500 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
5501 | find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); | ||
5502 | find mustExist(problem, interpretation, container); | ||
5503 | neg find mustExist(problem, interpretation, newObject); | ||
5504 | } | ||
5505 | pattern createObject_FunctionalInterface_class( | ||
5506 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5507 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5508 | { | ||
5509 | find interpretation(problem,interpretation); | ||
5510 | neg find hasElementInContainment(problem,interpretation); | ||
5511 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5512 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
5513 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
5514 | find mayExist(problem, interpretation, newObject); | ||
5515 | neg find mustExist(problem, interpretation, newObject); | ||
5516 | } | ||
5517 | pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( | ||
5518 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5519 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
5520 | container:DefinedElement) | ||
5521 | { | ||
5522 | find interpretation(problem,interpretation); | ||
5523 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5524 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
5525 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
5526 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); | ||
5527 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
5528 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); | ||
5529 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); | ||
5530 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
5531 | find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); | ||
5532 | find mustExist(problem, interpretation, container); | ||
5533 | neg find mustExist(problem, interpretation, newObject); | ||
5534 | } | ||
5535 | pattern createObject_InformationLink_class( | ||
5536 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5537 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5538 | { | ||
5539 | find interpretation(problem,interpretation); | ||
5540 | neg find hasElementInContainment(problem,interpretation); | ||
5541 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5542 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
5543 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
5544 | find mayExist(problem, interpretation, newObject); | ||
5545 | neg find mustExist(problem, interpretation, newObject); | ||
5546 | } | ||
5547 | |||
5548 | ////////// | ||
5549 | // 4.2 Type refinement | ||
5550 | ////////// | ||
5551 | pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
5552 | find interpretation(problem,interpretation); | ||
5553 | PartialInterpretation.newElements(interpretation,element); | ||
5554 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
5555 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
5556 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
5557 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
5558 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
5559 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
5560 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
5561 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
5562 | } | ||
5563 | pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
5564 | find interpretation(problem,interpretation); | ||
5565 | PartialInterpretation.newElements(interpretation,element); | ||
5566 | find mayInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
5567 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
5568 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
5569 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
5570 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
5571 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
5572 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
5573 | } | ||
5574 | pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
5575 | find interpretation(problem,interpretation); | ||
5576 | PartialInterpretation.newElements(interpretation,element); | ||
5577 | find mayInstanceOfFunction_class(problem,interpretation,element); | ||
5578 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
5579 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
5580 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
5581 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
5582 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
5583 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
5584 | } | ||
5585 | pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
5586 | find interpretation(problem,interpretation); | ||
5587 | PartialInterpretation.newElements(interpretation,element); | ||
5588 | find mayInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
5589 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
5590 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
5591 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
5592 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
5593 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
5594 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
5595 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
5596 | } | ||
5597 | pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
5598 | find interpretation(problem,interpretation); | ||
5599 | PartialInterpretation.newElements(interpretation,element); | ||
5600 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
5601 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
5602 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
5603 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
5604 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
5605 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
5606 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
5607 | } | ||
5608 | pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
5609 | find interpretation(problem,interpretation); | ||
5610 | PartialInterpretation.newElements(interpretation,element); | ||
5611 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
5612 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
5613 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
5614 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
5615 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
5616 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
5617 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
5618 | } | ||
5619 | pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
5620 | find interpretation(problem,interpretation); | ||
5621 | PartialInterpretation.newElements(interpretation,element); | ||
5622 | find mayInstanceOfInformationLink_class(problem,interpretation,element); | ||
5623 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
5624 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
5625 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
5626 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
5627 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
5628 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
5629 | } | ||
5630 | |||
5631 | ////////// | ||
5632 | // 4.3 Relation refinement | ||
5633 | ////////// | ||
5634 | pattern refineRelation_model_reference_FunctionalElement( | ||
5635 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5636 | relationIterpretation:PartialRelationInterpretation, | ||
5637 | from: DefinedElement, to: DefinedElement) | ||
5638 | { | ||
5639 | find interpretation(problem,interpretation); | ||
5640 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
5641 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
5642 | find mustExist(problem, interpretation, from); | ||
5643 | find mustExist(problem, interpretation, to); | ||
5644 | find mustInstanceOfFunctionalElement_class(problem,interpretation,from); | ||
5645 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); | ||
5646 | find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
5647 | neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
5648 | } | ||
5649 | pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( | ||
5650 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5651 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
5652 | from: DefinedElement, to: DefinedElement) | ||
5653 | { | ||
5654 | find interpretation(problem,interpretation); | ||
5655 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
5656 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
5657 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
5658 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); | ||
5659 | find mustExist(problem, interpretation, from); | ||
5660 | find mustExist(problem, interpretation, to); | ||
5661 | find mustInstanceOfFunctionalInput_class(problem,interpretation,from); | ||
5662 | find mustInstanceOfInformationLink_class(problem,interpretation,to); | ||
5663 | find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
5664 | neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
5665 | } | ||
5666 | pattern refineRelation_type_attribute_Function( | ||
5667 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5668 | relationIterpretation:PartialRelationInterpretation, | ||
5669 | from: DefinedElement, to: DefinedElement) | ||
5670 | { | ||
5671 | find interpretation(problem,interpretation); | ||
5672 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
5673 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
5674 | find mustExist(problem, interpretation, from); | ||
5675 | find mustExist(problem, interpretation, to); | ||
5676 | find mustInstanceOfFunction_class(problem,interpretation,from); | ||
5677 | find mustInstanceOfFunctionType_enum(problem,interpretation,to); | ||
5678 | find mayInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
5679 | neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
5680 | } | ||
5681 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
5682 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
5683 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
5684 | |||
5685 | ////////// | ||
5686 | // 0. Util | ||
5687 | ////////// | ||
5688 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
5689 | PartialInterpretation.problem(interpretation,problem); | ||
5690 | } | ||
5691 | |||
5692 | ///////////////////////// | ||
5693 | // 0.1 Existence | ||
5694 | ///////////////////////// | ||
5695 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
5696 | find interpretation(problem,interpretation); | ||
5697 | LogicProblem.elements(problem,element); | ||
5698 | } or { | ||
5699 | find interpretation(problem,interpretation); | ||
5700 | PartialInterpretation.newElements(interpretation,element); | ||
5701 | } | ||
5702 | |||
5703 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
5704 | find mustExist(problem,interpretation,element); | ||
5705 | } or { | ||
5706 | find interpretation(problem,interpretation); | ||
5707 | neg find elementCloseWorld(element); | ||
5708 | PartialInterpretation.openWorldElements(interpretation,element); | ||
5709 | } | ||
5710 | |||
5711 | private pattern elementCloseWorld(element:DefinedElement) { | ||
5712 | PartialInterpretation.openWorldElements(i,element); | ||
5713 | PartialInterpretation.maxNewElements(i,0); | ||
5714 | } or { | ||
5715 | Scope.targetTypeInterpretation(scope,interpretation); | ||
5716 | PartialTypeInterpratation.elements(interpretation,element); | ||
5717 | Scope.maxNewElements(scope,0); | ||
5718 | } | ||
5719 | |||
5720 | //////////////////////// | ||
5721 | // 0.2 Equivalence | ||
5722 | //////////////////////// | ||
5723 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
5724 | find mayExist(problem,interpretation,a); | ||
5725 | find mayExist(problem,interpretation,b); | ||
5726 | a == b; | ||
5727 | } | ||
5728 | |||
5729 | //////////////////////// | ||
5730 | // 0.3 Required Patterns by TypeIndexer | ||
5731 | //////////////////////// | ||
5732 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
5733 | find interpretation(problem,interpretation); | ||
5734 | LogicProblem.types(problem,type); | ||
5735 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5736 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
5737 | } | ||
5738 | |||
5739 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
5740 | find interpretation(problem,interpretation); | ||
5741 | LogicProblem.types(problem,type); | ||
5742 | TypeDefinition.elements(type,element); | ||
5743 | } or { | ||
5744 | find interpretation(problem,interpretation); | ||
5745 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
5746 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
5747 | } | ||
5748 | |||
5749 | private pattern isPrimitive(element: PrimitiveElement) { | ||
5750 | PrimitiveElement(element); | ||
5751 | } | ||
5752 | |||
5753 | ////////// | ||
5754 | // 1. Problem-Specific Base Indexers | ||
5755 | ////////// | ||
5756 | // 1.1 Type Indexers | ||
5757 | ////////// | ||
5758 | // 1.1.1 primitive Type Indexers | ||
5759 | ////////// | ||
5760 | |||
5761 | ////////// | ||
5762 | // 1.1.2 domain-specific Type Indexers | ||
5763 | ////////// | ||
5764 | /** | ||
5765 | * An element must be an instance of type "FunctionalElement class". | ||
5766 | */ | ||
5767 | private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
5768 | Type.name(type,"FunctionalElement class"); | ||
5769 | find directInstanceOf(problem,interpretation,element,type); | ||
5770 | } | ||
5771 | private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
5772 | find interpretation(problem,interpretation); | ||
5773 | PartialInterpretation.scopes(interpretation,scope); | ||
5774 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
5775 | Scope.maxNewElements(scope,0); | ||
5776 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
5777 | Type.name(type,"FunctionalElement class"); | ||
5778 | } | ||
5779 | |||
5780 | /** | ||
5781 | * An element may be an instance of type "FunctionalElement class". | ||
5782 | */ | ||
5783 | private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
5784 | { | ||
5785 | find interpretation(problem,interpretation); | ||
5786 | PartialInterpretation.newElements(interpretation,element); | ||
5787 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
5788 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
5789 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
5790 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
5791 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
5792 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
5793 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
5794 | neg find isPrimitive(element); | ||
5795 | } or { | ||
5796 | find interpretation(problem,interpretation); | ||
5797 | PartialInterpretation.openWorldElements(interpretation,element); | ||
5798 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
5799 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
5800 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
5801 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
5802 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
5803 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
5804 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
5805 | neg find isPrimitive(element); | ||
5806 | } or | ||
5807 | { find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } | ||
5808 | /** | ||
5809 | * An element must be an instance of type "FunctionalArchitectureModel class". | ||
5810 | */ | ||
5811 | private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
5812 | Type.name(type,"FunctionalArchitectureModel class"); | ||
5813 | find directInstanceOf(problem,interpretation,element,type); | ||
5814 | } | ||
5815 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
5816 | find interpretation(problem,interpretation); | ||
5817 | PartialInterpretation.scopes(interpretation,scope); | ||
5818 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
5819 | Scope.maxNewElements(scope,0); | ||
5820 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
5821 | Type.name(type,"FunctionalArchitectureModel class"); | ||
5822 | } | ||
5823 | |||
5824 | /** | ||
5825 | * An element may be an instance of type "FunctionalArchitectureModel class". | ||
5826 | */ | ||
5827 | private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
5828 | { | ||
5829 | find interpretation(problem,interpretation); | ||
5830 | PartialInterpretation.newElements(interpretation,element); | ||
5831 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
5832 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
5833 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
5834 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
5835 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
5836 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
5837 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
5838 | neg find isPrimitive(element); | ||
5839 | } or { | ||
5840 | find interpretation(problem,interpretation); | ||
5841 | PartialInterpretation.openWorldElements(interpretation,element); | ||
5842 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
5843 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
5844 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
5845 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
5846 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
5847 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
5848 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
5849 | neg find isPrimitive(element); | ||
5850 | } or | ||
5851 | { find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } | ||
5852 | /** | ||
5853 | * An element must be an instance of type "Function class". | ||
5854 | */ | ||
5855 | private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
5856 | Type.name(type,"Function class"); | ||
5857 | find directInstanceOf(problem,interpretation,element,type); | ||
5858 | } | ||
5859 | private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
5860 | find interpretation(problem,interpretation); | ||
5861 | PartialInterpretation.scopes(interpretation,scope); | ||
5862 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
5863 | Scope.maxNewElements(scope,0); | ||
5864 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
5865 | Type.name(type,"Function class"); | ||
5866 | } | ||
5867 | |||
5868 | /** | ||
5869 | * An element may be an instance of type "Function class". | ||
5870 | */ | ||
5871 | private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
5872 | { | ||
5873 | find interpretation(problem,interpretation); | ||
5874 | PartialInterpretation.newElements(interpretation,element); | ||
5875 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
5876 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
5877 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
5878 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
5879 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
5880 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
5881 | neg find isPrimitive(element); | ||
5882 | } or { | ||
5883 | find interpretation(problem,interpretation); | ||
5884 | PartialInterpretation.openWorldElements(interpretation,element); | ||
5885 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
5886 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
5887 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
5888 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
5889 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
5890 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
5891 | neg find isPrimitive(element); | ||
5892 | } or | ||
5893 | { find mustInstanceOfFunction_class(problem,interpretation,element); } | ||
5894 | /** | ||
5895 | * An element must be an instance of type "FAMTerminator class". | ||
5896 | */ | ||
5897 | private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
5898 | Type.name(type,"FAMTerminator class"); | ||
5899 | find directInstanceOf(problem,interpretation,element,type); | ||
5900 | } | ||
5901 | private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
5902 | find interpretation(problem,interpretation); | ||
5903 | PartialInterpretation.scopes(interpretation,scope); | ||
5904 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
5905 | Scope.maxNewElements(scope,0); | ||
5906 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
5907 | Type.name(type,"FAMTerminator class"); | ||
5908 | } | ||
5909 | |||
5910 | /** | ||
5911 | * An element may be an instance of type "FAMTerminator class". | ||
5912 | */ | ||
5913 | private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
5914 | { | ||
5915 | find interpretation(problem,interpretation); | ||
5916 | PartialInterpretation.newElements(interpretation,element); | ||
5917 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
5918 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
5919 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
5920 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
5921 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
5922 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
5923 | neg find isPrimitive(element); | ||
5924 | } or { | ||
5925 | find interpretation(problem,interpretation); | ||
5926 | PartialInterpretation.openWorldElements(interpretation,element); | ||
5927 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
5928 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
5929 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
5930 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
5931 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
5932 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
5933 | neg find isPrimitive(element); | ||
5934 | } or | ||
5935 | { find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } | ||
5936 | /** | ||
5937 | * An element must be an instance of type "InformationLink class". | ||
5938 | */ | ||
5939 | private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
5940 | Type.name(type,"InformationLink class"); | ||
5941 | find directInstanceOf(problem,interpretation,element,type); | ||
5942 | } | ||
5943 | private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
5944 | find interpretation(problem,interpretation); | ||
5945 | PartialInterpretation.scopes(interpretation,scope); | ||
5946 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
5947 | Scope.maxNewElements(scope,0); | ||
5948 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
5949 | Type.name(type,"InformationLink class"); | ||
5950 | } | ||
5951 | |||
5952 | /** | ||
5953 | * An element may be an instance of type "InformationLink class". | ||
5954 | */ | ||
5955 | private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
5956 | { | ||
5957 | find interpretation(problem,interpretation); | ||
5958 | PartialInterpretation.newElements(interpretation,element); | ||
5959 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
5960 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
5961 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
5962 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
5963 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
5964 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
5965 | neg find isPrimitive(element); | ||
5966 | } or { | ||
5967 | find interpretation(problem,interpretation); | ||
5968 | PartialInterpretation.openWorldElements(interpretation,element); | ||
5969 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
5970 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
5971 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
5972 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
5973 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
5974 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
5975 | neg find isPrimitive(element); | ||
5976 | } or | ||
5977 | { find mustInstanceOfInformationLink_class(problem,interpretation,element); } | ||
5978 | /** | ||
5979 | * An element must be an instance of type "FunctionalInterface class". | ||
5980 | */ | ||
5981 | private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
5982 | Type.name(type,"FunctionalInterface class"); | ||
5983 | find directInstanceOf(problem,interpretation,element,type); | ||
5984 | } | ||
5985 | private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
5986 | find interpretation(problem,interpretation); | ||
5987 | PartialInterpretation.scopes(interpretation,scope); | ||
5988 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
5989 | Scope.maxNewElements(scope,0); | ||
5990 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
5991 | Type.name(type,"FunctionalInterface class"); | ||
5992 | } | ||
5993 | |||
5994 | /** | ||
5995 | * An element may be an instance of type "FunctionalInterface class". | ||
5996 | */ | ||
5997 | private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
5998 | { | ||
5999 | find interpretation(problem,interpretation); | ||
6000 | PartialInterpretation.newElements(interpretation,element); | ||
6001 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
6002 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
6003 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
6004 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
6005 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
6006 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
6007 | neg find isPrimitive(element); | ||
6008 | } or { | ||
6009 | find interpretation(problem,interpretation); | ||
6010 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6011 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
6012 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
6013 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
6014 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
6015 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
6016 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
6017 | neg find isPrimitive(element); | ||
6018 | } or | ||
6019 | { find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } | ||
6020 | /** | ||
6021 | * An element must be an instance of type "FunctionalInput class". | ||
6022 | */ | ||
6023 | private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6024 | Type.name(type,"FunctionalInput class"); | ||
6025 | find directInstanceOf(problem,interpretation,element,type); | ||
6026 | } | ||
6027 | private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6028 | find interpretation(problem,interpretation); | ||
6029 | PartialInterpretation.scopes(interpretation,scope); | ||
6030 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6031 | Scope.maxNewElements(scope,0); | ||
6032 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6033 | Type.name(type,"FunctionalInput class"); | ||
6034 | } | ||
6035 | |||
6036 | /** | ||
6037 | * An element may be an instance of type "FunctionalInput class". | ||
6038 | */ | ||
6039 | private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6040 | { | ||
6041 | find interpretation(problem,interpretation); | ||
6042 | PartialInterpretation.newElements(interpretation,element); | ||
6043 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
6044 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
6045 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
6046 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
6047 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
6048 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
6049 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
6050 | neg find isPrimitive(element); | ||
6051 | } or { | ||
6052 | find interpretation(problem,interpretation); | ||
6053 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6054 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
6055 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
6056 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
6057 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
6058 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
6059 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
6060 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
6061 | neg find isPrimitive(element); | ||
6062 | } or | ||
6063 | { find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } | ||
6064 | /** | ||
6065 | * An element must be an instance of type "FunctionalOutput class". | ||
6066 | */ | ||
6067 | private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6068 | Type.name(type,"FunctionalOutput class"); | ||
6069 | find directInstanceOf(problem,interpretation,element,type); | ||
6070 | } | ||
6071 | private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6072 | find interpretation(problem,interpretation); | ||
6073 | PartialInterpretation.scopes(interpretation,scope); | ||
6074 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6075 | Scope.maxNewElements(scope,0); | ||
6076 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6077 | Type.name(type,"FunctionalOutput class"); | ||
6078 | } | ||
6079 | |||
6080 | /** | ||
6081 | * An element may be an instance of type "FunctionalOutput class". | ||
6082 | */ | ||
6083 | private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6084 | { | ||
6085 | find interpretation(problem,interpretation); | ||
6086 | PartialInterpretation.newElements(interpretation,element); | ||
6087 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
6088 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
6089 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
6090 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
6091 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
6092 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
6093 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
6094 | neg find isPrimitive(element); | ||
6095 | } or { | ||
6096 | find interpretation(problem,interpretation); | ||
6097 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6098 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
6099 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
6100 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
6101 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
6102 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
6103 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
6104 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
6105 | neg find isPrimitive(element); | ||
6106 | } or | ||
6107 | { find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } | ||
6108 | /** | ||
6109 | * An element must be an instance of type "FunctionalData class". | ||
6110 | */ | ||
6111 | private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6112 | Type.name(type,"FunctionalData class"); | ||
6113 | find directInstanceOf(problem,interpretation,element,type); | ||
6114 | } | ||
6115 | private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6116 | find interpretation(problem,interpretation); | ||
6117 | PartialInterpretation.scopes(interpretation,scope); | ||
6118 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6119 | Scope.maxNewElements(scope,0); | ||
6120 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6121 | Type.name(type,"FunctionalData class"); | ||
6122 | } | ||
6123 | |||
6124 | /** | ||
6125 | * An element may be an instance of type "FunctionalData class". | ||
6126 | */ | ||
6127 | private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6128 | { | ||
6129 | find interpretation(problem,interpretation); | ||
6130 | PartialInterpretation.newElements(interpretation,element); | ||
6131 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
6132 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
6133 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
6134 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
6135 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
6136 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
6137 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
6138 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
6139 | neg find isPrimitive(element); | ||
6140 | } or { | ||
6141 | find interpretation(problem,interpretation); | ||
6142 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6143 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
6144 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
6145 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
6146 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
6147 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
6148 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
6149 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
6150 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
6151 | neg find isPrimitive(element); | ||
6152 | } or | ||
6153 | { find mustInstanceOfFunctionalData_class(problem,interpretation,element); } | ||
6154 | /** | ||
6155 | * An element must be an instance of type "FunctionType enum". | ||
6156 | */ | ||
6157 | private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6158 | Type.name(type,"FunctionType enum"); | ||
6159 | find directInstanceOf(problem,interpretation,element,type); | ||
6160 | } | ||
6161 | private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6162 | find interpretation(problem,interpretation); | ||
6163 | PartialInterpretation.scopes(interpretation,scope); | ||
6164 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6165 | Scope.maxNewElements(scope,0); | ||
6166 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6167 | Type.name(type,"FunctionType enum"); | ||
6168 | } | ||
6169 | |||
6170 | /** | ||
6171 | * An element may be an instance of type "FunctionType enum". | ||
6172 | */ | ||
6173 | private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6174 | { find mustInstanceOfFunctionType_enum(problem,interpretation,element); } | ||
6175 | /** | ||
6176 | * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
6177 | */ | ||
6178 | private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6179 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
6180 | find directInstanceOf(problem,interpretation,element,type); | ||
6181 | } | ||
6182 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6183 | find interpretation(problem,interpretation); | ||
6184 | PartialInterpretation.scopes(interpretation,scope); | ||
6185 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6186 | Scope.maxNewElements(scope,0); | ||
6187 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6188 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
6189 | } | ||
6190 | |||
6191 | /** | ||
6192 | * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
6193 | */ | ||
6194 | private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6195 | { find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } | ||
6196 | /** | ||
6197 | * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
6198 | */ | ||
6199 | private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6200 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
6201 | find directInstanceOf(problem,interpretation,element,type); | ||
6202 | } | ||
6203 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6204 | find interpretation(problem,interpretation); | ||
6205 | PartialInterpretation.scopes(interpretation,scope); | ||
6206 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6207 | Scope.maxNewElements(scope,0); | ||
6208 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6209 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
6210 | } | ||
6211 | |||
6212 | /** | ||
6213 | * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
6214 | */ | ||
6215 | private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6216 | { | ||
6217 | find interpretation(problem,interpretation); | ||
6218 | PartialInterpretation.newElements(interpretation,element); | ||
6219 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
6220 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
6221 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
6222 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
6223 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
6224 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
6225 | neg find isPrimitive(element); | ||
6226 | } or { | ||
6227 | find interpretation(problem,interpretation); | ||
6228 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6229 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
6230 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
6231 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
6232 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
6233 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
6234 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
6235 | neg find isPrimitive(element); | ||
6236 | } or | ||
6237 | { find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } | ||
6238 | |||
6239 | ////////// | ||
6240 | // 1.2 Relation Declaration Indexers | ||
6241 | ////////// | ||
6242 | /** | ||
6243 | * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) | ||
6244 | */ | ||
6245 | private pattern mustInRelationinterface_reference_FunctionalElement( | ||
6246 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6247 | source: DefinedElement, target:DefinedElement) | ||
6248 | { | ||
6249 | find interpretation(problem,interpretation); | ||
6250 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
6251 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); | ||
6252 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
6253 | BinaryElementRelationLink.param1(link,source); | ||
6254 | BinaryElementRelationLink.param2(link,target); | ||
6255 | } | ||
6256 | /** | ||
6257 | * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) | ||
6258 | */ | ||
6259 | private pattern mayInRelationinterface_reference_FunctionalElement( | ||
6260 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6261 | source: DefinedElement, target:DefinedElement) | ||
6262 | { | ||
6263 | find interpretation(problem,interpretation); | ||
6264 | // The two endpoint of the link have to exist | ||
6265 | find mayExist(problem, interpretation, source); | ||
6266 | find mayExist(problem, interpretation, target); | ||
6267 | // Type consistency | ||
6268 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
6269 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
6270 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
6271 | // the upper bound of the multiplicity should be considered. | ||
6272 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); | ||
6273 | check(numberOfExistingReferences < 1); | ||
6274 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
6275 | // the upper bound of the opposite reference multiplicity should be considered. | ||
6276 | numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); | ||
6277 | check(numberOfExistingOppositeReferences < 1); | ||
6278 | // The reference is containment, then a new reference cannot be create if: | ||
6279 | // 1. Multiple parents | ||
6280 | neg find mustContains4(problem,interpretation,_,target); | ||
6281 | // 2. Circle in the containment hierarchy | ||
6282 | neg find mustTransitiveContains(source,target); | ||
6283 | } or { | ||
6284 | find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); | ||
6285 | } | ||
6286 | /** | ||
6287 | * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) | ||
6288 | */ | ||
6289 | private pattern mustInRelationmodel_reference_FunctionalElement( | ||
6290 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6291 | source: DefinedElement, target:DefinedElement) | ||
6292 | { | ||
6293 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); | ||
6294 | } | ||
6295 | /** | ||
6296 | * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) | ||
6297 | */ | ||
6298 | private pattern mayInRelationmodel_reference_FunctionalElement( | ||
6299 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6300 | source: DefinedElement, target:DefinedElement) | ||
6301 | { | ||
6302 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); | ||
6303 | } | ||
6304 | /** | ||
6305 | * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) | ||
6306 | */ | ||
6307 | private pattern mustInRelationparent_reference_FunctionalElement( | ||
6308 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6309 | source: DefinedElement, target:DefinedElement) | ||
6310 | { | ||
6311 | find interpretation(problem,interpretation); | ||
6312 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
6313 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); | ||
6314 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
6315 | BinaryElementRelationLink.param1(link,source); | ||
6316 | BinaryElementRelationLink.param2(link,target); | ||
6317 | } | ||
6318 | /** | ||
6319 | * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) | ||
6320 | */ | ||
6321 | private pattern mayInRelationparent_reference_FunctionalElement( | ||
6322 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6323 | source: DefinedElement, target:DefinedElement) | ||
6324 | { | ||
6325 | find interpretation(problem,interpretation); | ||
6326 | // The two endpoint of the link have to exist | ||
6327 | find mayExist(problem, interpretation, source); | ||
6328 | find mayExist(problem, interpretation, target); | ||
6329 | // Type consistency | ||
6330 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
6331 | find mayInstanceOfFunction_class(problem,interpretation,target); | ||
6332 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
6333 | // the upper bound of the multiplicity should be considered. | ||
6334 | numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); | ||
6335 | check(numberOfExistingReferences < 1); | ||
6336 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
6337 | // 1. Multiple parents | ||
6338 | neg find mustContains4(problem,interpretation,source,_); | ||
6339 | // 2. Circle in the containment hierarchy | ||
6340 | neg find mustTransitiveContains(source,target); | ||
6341 | } or { | ||
6342 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); | ||
6343 | } | ||
6344 | /** | ||
6345 | * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) | ||
6346 | */ | ||
6347 | private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( | ||
6348 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6349 | source: DefinedElement, target:DefinedElement) | ||
6350 | { | ||
6351 | find interpretation(problem,interpretation); | ||
6352 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
6353 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
6354 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
6355 | BinaryElementRelationLink.param1(link,source); | ||
6356 | BinaryElementRelationLink.param2(link,target); | ||
6357 | } | ||
6358 | /** | ||
6359 | * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) | ||
6360 | */ | ||
6361 | private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( | ||
6362 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6363 | source: DefinedElement, target:DefinedElement) | ||
6364 | { | ||
6365 | find interpretation(problem,interpretation); | ||
6366 | // The two endpoint of the link have to exist | ||
6367 | find mayExist(problem, interpretation, source); | ||
6368 | find mayExist(problem, interpretation, target); | ||
6369 | // Type consistency | ||
6370 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); | ||
6371 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
6372 | // The reference is containment, then a new reference cannot be create if: | ||
6373 | // 1. Multiple parents | ||
6374 | neg find mustContains4(problem,interpretation,_,target); | ||
6375 | // 2. Circle in the containment hierarchy | ||
6376 | neg find mustTransitiveContains(source,target); | ||
6377 | } or { | ||
6378 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); | ||
6379 | } | ||
6380 | /** | ||
6381 | * Matcher for detecting tuples t where []subElements reference Function(source,target) | ||
6382 | */ | ||
6383 | private pattern mustInRelationsubElements_reference_Function( | ||
6384 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6385 | source: DefinedElement, target:DefinedElement) | ||
6386 | { | ||
6387 | find interpretation(problem,interpretation); | ||
6388 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
6389 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); | ||
6390 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
6391 | BinaryElementRelationLink.param1(link,source); | ||
6392 | BinaryElementRelationLink.param2(link,target); | ||
6393 | } | ||
6394 | /** | ||
6395 | * Matcher for detecting tuples t where <>subElements reference Function(source,target) | ||
6396 | */ | ||
6397 | private pattern mayInRelationsubElements_reference_Function( | ||
6398 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6399 | source: DefinedElement, target:DefinedElement) | ||
6400 | { | ||
6401 | find interpretation(problem,interpretation); | ||
6402 | // The two endpoint of the link have to exist | ||
6403 | find mayExist(problem, interpretation, source); | ||
6404 | find mayExist(problem, interpretation, target); | ||
6405 | // Type consistency | ||
6406 | find mayInstanceOfFunction_class(problem,interpretation,source); | ||
6407 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
6408 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
6409 | // the upper bound of the opposite reference multiplicity should be considered. | ||
6410 | numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); | ||
6411 | check(numberOfExistingOppositeReferences < 1); | ||
6412 | // The reference is containment, then a new reference cannot be create if: | ||
6413 | // 1. Multiple parents | ||
6414 | neg find mustContains4(problem,interpretation,_,target); | ||
6415 | // 2. Circle in the containment hierarchy | ||
6416 | neg find mustTransitiveContains(source,target); | ||
6417 | } or { | ||
6418 | find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); | ||
6419 | } | ||
6420 | /** | ||
6421 | * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) | ||
6422 | */ | ||
6423 | private pattern mustInRelationdata_reference_FAMTerminator( | ||
6424 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6425 | source: DefinedElement, target:DefinedElement) | ||
6426 | { | ||
6427 | find interpretation(problem,interpretation); | ||
6428 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
6429 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); | ||
6430 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
6431 | BinaryElementRelationLink.param1(link,source); | ||
6432 | BinaryElementRelationLink.param2(link,target); | ||
6433 | } | ||
6434 | /** | ||
6435 | * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) | ||
6436 | */ | ||
6437 | private pattern mayInRelationdata_reference_FAMTerminator( | ||
6438 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6439 | source: DefinedElement, target:DefinedElement) | ||
6440 | { | ||
6441 | find interpretation(problem,interpretation); | ||
6442 | // The two endpoint of the link have to exist | ||
6443 | find mayExist(problem, interpretation, source); | ||
6444 | find mayExist(problem, interpretation, target); | ||
6445 | // Type consistency | ||
6446 | find mayInstanceOfFAMTerminator_class(problem,interpretation,source); | ||
6447 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
6448 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
6449 | // the upper bound of the multiplicity should be considered. | ||
6450 | numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); | ||
6451 | check(numberOfExistingReferences < 1); | ||
6452 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
6453 | // the upper bound of the opposite reference multiplicity should be considered. | ||
6454 | numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); | ||
6455 | check(numberOfExistingOppositeReferences < 1); | ||
6456 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
6457 | // 1. Multiple parents | ||
6458 | neg find mustContains4(problem,interpretation,source,_); | ||
6459 | // 2. Circle in the containment hierarchy | ||
6460 | neg find mustTransitiveContains(source,target); | ||
6461 | } or { | ||
6462 | find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); | ||
6463 | } | ||
6464 | /** | ||
6465 | * Matcher for detecting tuples t where []from reference InformationLink(source,target) | ||
6466 | */ | ||
6467 | private pattern mustInRelationfrom_reference_InformationLink( | ||
6468 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6469 | source: DefinedElement, target:DefinedElement) | ||
6470 | { | ||
6471 | find interpretation(problem,interpretation); | ||
6472 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
6473 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); | ||
6474 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
6475 | BinaryElementRelationLink.param1(link,source); | ||
6476 | BinaryElementRelationLink.param2(link,target); | ||
6477 | } | ||
6478 | /** | ||
6479 | * Matcher for detecting tuples t where <>from reference InformationLink(source,target) | ||
6480 | */ | ||
6481 | private pattern mayInRelationfrom_reference_InformationLink( | ||
6482 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6483 | source: DefinedElement, target:DefinedElement) | ||
6484 | { | ||
6485 | find interpretation(problem,interpretation); | ||
6486 | // The two endpoint of the link have to exist | ||
6487 | find mayExist(problem, interpretation, source); | ||
6488 | find mayExist(problem, interpretation, target); | ||
6489 | // Type consistency | ||
6490 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
6491 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); | ||
6492 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
6493 | // the upper bound of the multiplicity should be considered. | ||
6494 | numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); | ||
6495 | check(numberOfExistingReferences < 1); | ||
6496 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
6497 | // 1. Multiple parents | ||
6498 | neg find mustContains4(problem,interpretation,source,_); | ||
6499 | // 2. Circle in the containment hierarchy | ||
6500 | neg find mustTransitiveContains(source,target); | ||
6501 | } or { | ||
6502 | find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); | ||
6503 | } | ||
6504 | /** | ||
6505 | * Matcher for detecting tuples t where []to reference InformationLink(source,target) | ||
6506 | */ | ||
6507 | private pattern mustInRelationto_reference_InformationLink( | ||
6508 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6509 | source: DefinedElement, target:DefinedElement) | ||
6510 | { | ||
6511 | find interpretation(problem,interpretation); | ||
6512 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
6513 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
6514 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
6515 | BinaryElementRelationLink.param1(link,source); | ||
6516 | BinaryElementRelationLink.param2(link,target); | ||
6517 | } | ||
6518 | /** | ||
6519 | * Matcher for detecting tuples t where <>to reference InformationLink(source,target) | ||
6520 | */ | ||
6521 | private pattern mayInRelationto_reference_InformationLink( | ||
6522 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6523 | source: DefinedElement, target:DefinedElement) | ||
6524 | { | ||
6525 | find interpretation(problem,interpretation); | ||
6526 | // The two endpoint of the link have to exist | ||
6527 | find mayExist(problem, interpretation, source); | ||
6528 | find mayExist(problem, interpretation, target); | ||
6529 | // Type consistency | ||
6530 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
6531 | find mayInstanceOfFunctionalInput_class(problem,interpretation,target); | ||
6532 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
6533 | // the upper bound of the multiplicity should be considered. | ||
6534 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); | ||
6535 | check(numberOfExistingReferences < 1); | ||
6536 | } or { | ||
6537 | find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); | ||
6538 | } | ||
6539 | /** | ||
6540 | * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) | ||
6541 | */ | ||
6542 | private pattern mustInRelationdata_reference_FunctionalInterface( | ||
6543 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6544 | source: DefinedElement, target:DefinedElement) | ||
6545 | { | ||
6546 | find interpretation(problem,interpretation); | ||
6547 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
6548 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); | ||
6549 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
6550 | BinaryElementRelationLink.param1(link,source); | ||
6551 | BinaryElementRelationLink.param2(link,target); | ||
6552 | } | ||
6553 | /** | ||
6554 | * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) | ||
6555 | */ | ||
6556 | private pattern mayInRelationdata_reference_FunctionalInterface( | ||
6557 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6558 | source: DefinedElement, target:DefinedElement) | ||
6559 | { | ||
6560 | find interpretation(problem,interpretation); | ||
6561 | // The two endpoint of the link have to exist | ||
6562 | find mayExist(problem, interpretation, source); | ||
6563 | find mayExist(problem, interpretation, target); | ||
6564 | // Type consistency | ||
6565 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
6566 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
6567 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
6568 | // the upper bound of the opposite reference multiplicity should be considered. | ||
6569 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); | ||
6570 | check(numberOfExistingOppositeReferences < 1); | ||
6571 | // The reference is containment, then a new reference cannot be create if: | ||
6572 | // 1. Multiple parents | ||
6573 | neg find mustContains4(problem,interpretation,_,target); | ||
6574 | // 2. Circle in the containment hierarchy | ||
6575 | neg find mustTransitiveContains(source,target); | ||
6576 | } or { | ||
6577 | find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); | ||
6578 | } | ||
6579 | /** | ||
6580 | * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) | ||
6581 | */ | ||
6582 | private pattern mustInRelationelement_reference_FunctionalInterface( | ||
6583 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6584 | source: DefinedElement, target:DefinedElement) | ||
6585 | { | ||
6586 | find interpretation(problem,interpretation); | ||
6587 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
6588 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); | ||
6589 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
6590 | BinaryElementRelationLink.param1(link,source); | ||
6591 | BinaryElementRelationLink.param2(link,target); | ||
6592 | } | ||
6593 | /** | ||
6594 | * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) | ||
6595 | */ | ||
6596 | private pattern mayInRelationelement_reference_FunctionalInterface( | ||
6597 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6598 | source: DefinedElement, target:DefinedElement) | ||
6599 | { | ||
6600 | find interpretation(problem,interpretation); | ||
6601 | // The two endpoint of the link have to exist | ||
6602 | find mayExist(problem, interpretation, source); | ||
6603 | find mayExist(problem, interpretation, target); | ||
6604 | // Type consistency | ||
6605 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
6606 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
6607 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
6608 | // the upper bound of the multiplicity should be considered. | ||
6609 | numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); | ||
6610 | check(numberOfExistingReferences < 1); | ||
6611 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
6612 | // the upper bound of the opposite reference multiplicity should be considered. | ||
6613 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); | ||
6614 | check(numberOfExistingOppositeReferences < 1); | ||
6615 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
6616 | // 1. Multiple parents | ||
6617 | neg find mustContains4(problem,interpretation,source,_); | ||
6618 | // 2. Circle in the containment hierarchy | ||
6619 | neg find mustTransitiveContains(source,target); | ||
6620 | } or { | ||
6621 | find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); | ||
6622 | } | ||
6623 | /** | ||
6624 | * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) | ||
6625 | */ | ||
6626 | private pattern mustInRelationIncomingLinks_reference_FunctionalInput( | ||
6627 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6628 | source: DefinedElement, target:DefinedElement) | ||
6629 | { | ||
6630 | find interpretation(problem,interpretation); | ||
6631 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
6632 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
6633 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
6634 | BinaryElementRelationLink.param1(link,source); | ||
6635 | BinaryElementRelationLink.param2(link,target); | ||
6636 | } | ||
6637 | /** | ||
6638 | * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) | ||
6639 | */ | ||
6640 | private pattern mayInRelationIncomingLinks_reference_FunctionalInput( | ||
6641 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6642 | source: DefinedElement, target:DefinedElement) | ||
6643 | { | ||
6644 | find interpretation(problem,interpretation); | ||
6645 | // The two endpoint of the link have to exist | ||
6646 | find mayExist(problem, interpretation, source); | ||
6647 | find mayExist(problem, interpretation, target); | ||
6648 | // Type consistency | ||
6649 | find mayInstanceOfFunctionalInput_class(problem,interpretation,source); | ||
6650 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
6651 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
6652 | // the upper bound of the opposite reference multiplicity should be considered. | ||
6653 | numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); | ||
6654 | check(numberOfExistingOppositeReferences < 1); | ||
6655 | } or { | ||
6656 | find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); | ||
6657 | } | ||
6658 | /** | ||
6659 | * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) | ||
6660 | */ | ||
6661 | private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( | ||
6662 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6663 | source: DefinedElement, target:DefinedElement) | ||
6664 | { | ||
6665 | find interpretation(problem,interpretation); | ||
6666 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
6667 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); | ||
6668 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
6669 | BinaryElementRelationLink.param1(link,source); | ||
6670 | BinaryElementRelationLink.param2(link,target); | ||
6671 | } | ||
6672 | /** | ||
6673 | * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) | ||
6674 | */ | ||
6675 | private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( | ||
6676 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6677 | source: DefinedElement, target:DefinedElement) | ||
6678 | { | ||
6679 | find interpretation(problem,interpretation); | ||
6680 | // The two endpoint of the link have to exist | ||
6681 | find mayExist(problem, interpretation, source); | ||
6682 | find mayExist(problem, interpretation, target); | ||
6683 | // Type consistency | ||
6684 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); | ||
6685 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
6686 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
6687 | // the upper bound of the opposite reference multiplicity should be considered. | ||
6688 | numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); | ||
6689 | check(numberOfExistingOppositeReferences < 1); | ||
6690 | // The reference is containment, then a new reference cannot be create if: | ||
6691 | // 1. Multiple parents | ||
6692 | neg find mustContains4(problem,interpretation,_,target); | ||
6693 | // 2. Circle in the containment hierarchy | ||
6694 | neg find mustTransitiveContains(source,target); | ||
6695 | } or { | ||
6696 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); | ||
6697 | } | ||
6698 | /** | ||
6699 | * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) | ||
6700 | */ | ||
6701 | private pattern mustInRelationterminator_reference_FunctionalData( | ||
6702 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6703 | source: DefinedElement, target:DefinedElement) | ||
6704 | { | ||
6705 | find interpretation(problem,interpretation); | ||
6706 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
6707 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); | ||
6708 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
6709 | BinaryElementRelationLink.param1(link,source); | ||
6710 | BinaryElementRelationLink.param2(link,target); | ||
6711 | } | ||
6712 | /** | ||
6713 | * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) | ||
6714 | */ | ||
6715 | private pattern mayInRelationterminator_reference_FunctionalData( | ||
6716 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6717 | source: DefinedElement, target:DefinedElement) | ||
6718 | { | ||
6719 | find interpretation(problem,interpretation); | ||
6720 | // The two endpoint of the link have to exist | ||
6721 | find mayExist(problem, interpretation, source); | ||
6722 | find mayExist(problem, interpretation, target); | ||
6723 | // Type consistency | ||
6724 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
6725 | find mayInstanceOfFAMTerminator_class(problem,interpretation,target); | ||
6726 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
6727 | // the upper bound of the multiplicity should be considered. | ||
6728 | numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); | ||
6729 | check(numberOfExistingReferences < 1); | ||
6730 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
6731 | // the upper bound of the opposite reference multiplicity should be considered. | ||
6732 | numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); | ||
6733 | check(numberOfExistingOppositeReferences < 1); | ||
6734 | // The reference is containment, then a new reference cannot be create if: | ||
6735 | // 1. Multiple parents | ||
6736 | neg find mustContains4(problem,interpretation,_,target); | ||
6737 | // 2. Circle in the containment hierarchy | ||
6738 | neg find mustTransitiveContains(source,target); | ||
6739 | } or { | ||
6740 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); | ||
6741 | } | ||
6742 | /** | ||
6743 | * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) | ||
6744 | */ | ||
6745 | private pattern mustInRelationinterface_reference_FunctionalData( | ||
6746 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6747 | source: DefinedElement, target:DefinedElement) | ||
6748 | { | ||
6749 | find interpretation(problem,interpretation); | ||
6750 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
6751 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); | ||
6752 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
6753 | BinaryElementRelationLink.param1(link,source); | ||
6754 | BinaryElementRelationLink.param2(link,target); | ||
6755 | } | ||
6756 | /** | ||
6757 | * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) | ||
6758 | */ | ||
6759 | private pattern mayInRelationinterface_reference_FunctionalData( | ||
6760 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6761 | source: DefinedElement, target:DefinedElement) | ||
6762 | { | ||
6763 | find interpretation(problem,interpretation); | ||
6764 | // The two endpoint of the link have to exist | ||
6765 | find mayExist(problem, interpretation, source); | ||
6766 | find mayExist(problem, interpretation, target); | ||
6767 | // Type consistency | ||
6768 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
6769 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
6770 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
6771 | // the upper bound of the multiplicity should be considered. | ||
6772 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); | ||
6773 | check(numberOfExistingReferences < 1); | ||
6774 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
6775 | // 1. Multiple parents | ||
6776 | neg find mustContains4(problem,interpretation,source,_); | ||
6777 | // 2. Circle in the containment hierarchy | ||
6778 | neg find mustTransitiveContains(source,target); | ||
6779 | } or { | ||
6780 | find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); | ||
6781 | } | ||
6782 | /** | ||
6783 | * Matcher for detecting tuples t where []type attribute Function(source,target) | ||
6784 | */ | ||
6785 | private pattern mustInRelationtype_attribute_Function( | ||
6786 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6787 | source: DefinedElement, target:DefinedElement) | ||
6788 | { | ||
6789 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); | ||
6790 | } | ||
6791 | /** | ||
6792 | * Matcher for detecting tuples t where []type attribute Function(source,target) | ||
6793 | */ | ||
6794 | private pattern mayInRelationtype_attribute_Function( | ||
6795 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6796 | source: DefinedElement, target:DefinedElement) | ||
6797 | { | ||
6798 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); | ||
6799 | } | ||
6800 | |||
6801 | ////////// | ||
6802 | // 1.3 Relation Definition Indexers | ||
6803 | ////////// | ||
6804 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam terminatorAndInformation | ||
6805 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( | ||
6806 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6807 | var_T, var_I) | ||
6808 | { | ||
6809 | find interpretation(problem,interpretation); | ||
6810 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
6811 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
6812 | // T is exported | ||
6813 | // I is exported | ||
6814 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
6815 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); | ||
6816 | find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); | ||
6817 | var_virtual0 == var_I; | ||
6818 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
6819 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); | ||
6820 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
6821 | var_virtual1 == var_T; | ||
6822 | }or{ | ||
6823 | find interpretation(problem,interpretation); | ||
6824 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
6825 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
6826 | // T is exported | ||
6827 | // I is exported | ||
6828 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
6829 | find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); | ||
6830 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); | ||
6831 | var_virtual0 == var_In; | ||
6832 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); | ||
6833 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); | ||
6834 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
6835 | var_virtual1 == var_T; | ||
6836 | } | ||
6837 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( | ||
6838 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6839 | var_T, var_I) | ||
6840 | { | ||
6841 | find interpretation(problem,interpretation); | ||
6842 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
6843 | find mayInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
6844 | // T is exported | ||
6845 | // I is exported | ||
6846 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
6847 | find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); | ||
6848 | find mayInstanceOfInformationLink_class(problem,interpretation,var_virtual0); | ||
6849 | find mayEquivalent(problem, interpretation, var_virtual0, var_I); | ||
6850 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
6851 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); | ||
6852 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
6853 | find mayEquivalent(problem, interpretation, var_virtual1, var_T); | ||
6854 | }or{ | ||
6855 | find interpretation(problem,interpretation); | ||
6856 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
6857 | find mayInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
6858 | // T is exported | ||
6859 | // I is exported | ||
6860 | find mayInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
6861 | find mayInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); | ||
6862 | find mayInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); | ||
6863 | find mayEquivalent(problem, interpretation, var_virtual0, var_In); | ||
6864 | find mayInstanceOfFunctionalInput_class(problem,interpretation,var_In); | ||
6865 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); | ||
6866 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
6867 | find mayEquivalent(problem, interpretation, var_virtual1, var_T); | ||
6868 | } | ||
6869 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( | ||
6870 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6871 | var_T, var_I) | ||
6872 | { | ||
6873 | find interpretation(problem,interpretation); | ||
6874 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
6875 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
6876 | // T is exported | ||
6877 | // I is exported | ||
6878 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
6879 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); | ||
6880 | find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); | ||
6881 | var_virtual0 == var_I; | ||
6882 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
6883 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); | ||
6884 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
6885 | var_virtual1 == var_T; | ||
6886 | }or{ | ||
6887 | find interpretation(problem,interpretation); | ||
6888 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
6889 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
6890 | // T is exported | ||
6891 | // I is exported | ||
6892 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
6893 | find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); | ||
6894 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); | ||
6895 | var_virtual0 == var_In; | ||
6896 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); | ||
6897 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); | ||
6898 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
6899 | var_virtual1 == var_T; | ||
6900 | } | ||
6901 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam type | ||
6902 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( | ||
6903 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6904 | var_This, var_Target) | ||
6905 | { | ||
6906 | find interpretation(problem,interpretation); | ||
6907 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
6908 | // type constraint is enforced by construction | ||
6909 | // This is exported | ||
6910 | // Target is exported | ||
6911 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
6912 | var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); | ||
6913 | var_Target == var_virtual0; | ||
6914 | }or{ | ||
6915 | find interpretation(problem,interpretation); | ||
6916 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
6917 | // type constraint is enforced by construction | ||
6918 | // This is exported | ||
6919 | // Target is exported | ||
6920 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
6921 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
6922 | var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); | ||
6923 | var_Target == var_virtual0; | ||
6924 | }or{ | ||
6925 | find interpretation(problem,interpretation); | ||
6926 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
6927 | // type constraint is enforced by construction | ||
6928 | // This is exported | ||
6929 | // Target is exported | ||
6930 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); | ||
6931 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
6932 | var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); | ||
6933 | var_Target == var_virtual0; | ||
6934 | } | ||
6935 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( | ||
6936 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6937 | var_This, var_Target) | ||
6938 | { | ||
6939 | find interpretation(problem,interpretation); | ||
6940 | find mayInstanceOfFunction_class(problem,interpretation,var_This); | ||
6941 | // type constraint is enforced by construction | ||
6942 | // This is exported | ||
6943 | // Target is exported | ||
6944 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
6945 | var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); | ||
6946 | find mayEquivalent(problem, interpretation, var_Target, var_virtual0); | ||
6947 | }or{ | ||
6948 | find interpretation(problem,interpretation); | ||
6949 | find mayInstanceOfFunction_class(problem,interpretation,var_This); | ||
6950 | // type constraint is enforced by construction | ||
6951 | // This is exported | ||
6952 | // Target is exported | ||
6953 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
6954 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
6955 | var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); | ||
6956 | find mayEquivalent(problem, interpretation, var_Target, var_virtual0); | ||
6957 | }or{ | ||
6958 | find interpretation(problem,interpretation); | ||
6959 | find mayInstanceOfFunction_class(problem,interpretation,var_This); | ||
6960 | // type constraint is enforced by construction | ||
6961 | // This is exported | ||
6962 | // Target is exported | ||
6963 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); | ||
6964 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
6965 | var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); | ||
6966 | find mayEquivalent(problem, interpretation, var_Target, var_virtual0); | ||
6967 | } | ||
6968 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( | ||
6969 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6970 | var_This, var_Target) | ||
6971 | { | ||
6972 | find interpretation(problem,interpretation); | ||
6973 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
6974 | // type constraint is enforced by construction | ||
6975 | // This is exported | ||
6976 | // Target is exported | ||
6977 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
6978 | var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); | ||
6979 | var_Target == var_virtual0; | ||
6980 | }or{ | ||
6981 | find interpretation(problem,interpretation); | ||
6982 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
6983 | // type constraint is enforced by construction | ||
6984 | // This is exported | ||
6985 | // Target is exported | ||
6986 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
6987 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
6988 | var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); | ||
6989 | var_Target == var_virtual0; | ||
6990 | }or{ | ||
6991 | find interpretation(problem,interpretation); | ||
6992 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
6993 | // type constraint is enforced by construction | ||
6994 | // This is exported | ||
6995 | // Target is exported | ||
6996 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); | ||
6997 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
6998 | var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); | ||
6999 | var_Target == var_virtual0; | ||
7000 | } | ||
7001 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam rootElements | ||
7002 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( | ||
7003 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7004 | var_Model, var_Root) | ||
7005 | { | ||
7006 | find interpretation(problem,interpretation); | ||
7007 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
7008 | find mustInstanceOfFunction_class(problem,interpretation,var_Root); | ||
7009 | // Model is exported | ||
7010 | // Root is exported | ||
7011 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
7012 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); | ||
7013 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); | ||
7014 | var_virtual0 == var_Root; | ||
7015 | } | ||
7016 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( | ||
7017 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7018 | var_Model, var_Root) | ||
7019 | { | ||
7020 | find interpretation(problem,interpretation); | ||
7021 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
7022 | find mayInstanceOfFunction_class(problem,interpretation,var_Root); | ||
7023 | // Model is exported | ||
7024 | // Root is exported | ||
7025 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
7026 | find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); | ||
7027 | find mayInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); | ||
7028 | find mayEquivalent(problem, interpretation, var_virtual0, var_Root); | ||
7029 | } | ||
7030 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( | ||
7031 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7032 | var_Model, var_Root) | ||
7033 | { | ||
7034 | find interpretation(problem,interpretation); | ||
7035 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
7036 | find mustInstanceOfFunction_class(problem,interpretation,var_Root); | ||
7037 | // Model is exported | ||
7038 | // Root is exported | ||
7039 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
7040 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); | ||
7041 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); | ||
7042 | var_virtual0 == var_Root; | ||
7043 | } | ||
7044 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam parent | ||
7045 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( | ||
7046 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7047 | var_Func, var_Par) | ||
7048 | { | ||
7049 | find interpretation(problem,interpretation); | ||
7050 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
7051 | find mustInstanceOfFunction_class(problem,interpretation,var_Par); | ||
7052 | // Func is exported | ||
7053 | // Par is exported | ||
7054 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
7055 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); | ||
7056 | find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); | ||
7057 | var_virtual0 == var_Par; | ||
7058 | } | ||
7059 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( | ||
7060 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7061 | var_Func, var_Par) | ||
7062 | { | ||
7063 | find interpretation(problem,interpretation); | ||
7064 | find mayInstanceOfFunction_class(problem,interpretation,var_Func); | ||
7065 | find mayInstanceOfFunction_class(problem,interpretation,var_Par); | ||
7066 | // Func is exported | ||
7067 | // Par is exported | ||
7068 | find mayInstanceOfFunction_class(problem,interpretation,var_Func); | ||
7069 | find mayInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); | ||
7070 | find mayInstanceOfFunction_class(problem,interpretation,var_virtual0); | ||
7071 | find mayEquivalent(problem, interpretation, var_virtual0, var_Par); | ||
7072 | } | ||
7073 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( | ||
7074 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7075 | var_Func, var_Par) | ||
7076 | { | ||
7077 | find interpretation(problem,interpretation); | ||
7078 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
7079 | find mustInstanceOfFunction_class(problem,interpretation,var_Par); | ||
7080 | // Func is exported | ||
7081 | // Par is exported | ||
7082 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
7083 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); | ||
7084 | find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); | ||
7085 | var_virtual0 == var_Par; | ||
7086 | } | ||
7087 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam model | ||
7088 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( | ||
7089 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7090 | var_This, var_Target) | ||
7091 | { | ||
7092 | find interpretation(problem,interpretation); | ||
7093 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
7094 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
7095 | // This is exported | ||
7096 | // Target is exported | ||
7097 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
7098 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
7099 | } | ||
7100 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( | ||
7101 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7102 | var_This, var_Target) | ||
7103 | { | ||
7104 | find interpretation(problem,interpretation); | ||
7105 | find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
7106 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
7107 | // This is exported | ||
7108 | // Target is exported | ||
7109 | find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
7110 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
7111 | } | ||
7112 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( | ||
7113 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7114 | var_This, var_Target) | ||
7115 | { | ||
7116 | find interpretation(problem,interpretation); | ||
7117 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
7118 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
7119 | // This is exported | ||
7120 | // Target is exported | ||
7121 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
7122 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
7123 | } | ||
7124 | |||
7125 | ////////// | ||
7126 | // 1.4 Containment Indexer | ||
7127 | ////////// | ||
7128 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
7129 | find mustContains4(_,_,source,target); | ||
7130 | } | ||
7131 | |||
7132 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
7133 | source: DefinedElement, target: DefinedElement) | ||
7134 | { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or | ||
7135 | |||
7136 | { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or | ||
7137 | |||
7138 | { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or | ||
7139 | |||
7140 | { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or | ||
7141 | |||
7142 | { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or | ||
7143 | |||
7144 | { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } | ||
7145 | |||
7146 | private pattern mustTransitiveContains(source,target) { | ||
7147 | find mustContains2+(source,target); | ||
7148 | } | ||
7149 | |||
7150 | ////////// | ||
7151 | // 2. Invalidation Indexers | ||
7152 | ////////// | ||
7153 | // 2.1 Invalidated by WF Queries | ||
7154 | ////////// | ||
7155 | |||
7156 | ////////// | ||
7157 | // 3. Unfinishedness Indexers | ||
7158 | ////////// | ||
7159 | // 3.1 Unfinishedness Measured by Multiplicity | ||
7160 | ////////// | ||
7161 | pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
7162 | find interpretation(problem,interpretation); | ||
7163 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
7164 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
7165 | find mustInstanceOfInformationLink_class(problem,interpretation,object); | ||
7166 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); | ||
7167 | check(numberOfExistingReferences < 1); | ||
7168 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
7169 | } | ||
7170 | |||
7171 | ////////// | ||
7172 | // 3.2 Unfinishedness Measured by WF Queries | ||
7173 | ////////// | ||
7174 | |||
7175 | ////////// | ||
7176 | // 4. Refinement Indexers | ||
7177 | ////////// | ||
7178 | // 4.1 Object constructors | ||
7179 | ////////// | ||
7180 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
7181 | { | ||
7182 | find interpretation(problem,interpretation); | ||
7183 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); | ||
7184 | find mustExist(problem, interpretation, root); | ||
7185 | }or{ | ||
7186 | find interpretation(problem,interpretation); | ||
7187 | find mustInstanceOfFunctionalElement_class(problem,interpretation,root); | ||
7188 | find mustExist(problem, interpretation, root); | ||
7189 | }or{ | ||
7190 | find interpretation(problem,interpretation); | ||
7191 | find mustInstanceOfInformationLink_class(problem,interpretation,root); | ||
7192 | find mustExist(problem, interpretation, root); | ||
7193 | }or{ | ||
7194 | find interpretation(problem,interpretation); | ||
7195 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); | ||
7196 | find mustExist(problem, interpretation, root); | ||
7197 | }or{ | ||
7198 | find interpretation(problem,interpretation); | ||
7199 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); | ||
7200 | find mustExist(problem, interpretation, root); | ||
7201 | }or{ | ||
7202 | find interpretation(problem,interpretation); | ||
7203 | find mustInstanceOfFunctionalData_class(problem,interpretation,root); | ||
7204 | find mustExist(problem, interpretation, root); | ||
7205 | }or{ | ||
7206 | find interpretation(problem,interpretation); | ||
7207 | find mustInstanceOfFunction_class(problem,interpretation,root); | ||
7208 | find mustExist(problem, interpretation, root); | ||
7209 | }or{ | ||
7210 | find interpretation(problem,interpretation); | ||
7211 | find mustInstanceOfFAMTerminator_class(problem,interpretation,root); | ||
7212 | find mustExist(problem, interpretation, root); | ||
7213 | }or{ | ||
7214 | find interpretation(problem,interpretation); | ||
7215 | find mustInstanceOfFunctionalInput_class(problem,interpretation,root); | ||
7216 | find mustExist(problem, interpretation, root); | ||
7217 | }or{ | ||
7218 | find interpretation(problem,interpretation); | ||
7219 | find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); | ||
7220 | find mustExist(problem, interpretation, root); | ||
7221 | }or{ | ||
7222 | find interpretation(problem,interpretation); | ||
7223 | find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); | ||
7224 | find mustExist(problem, interpretation, root); | ||
7225 | } | ||
7226 | pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
7227 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7228 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
7229 | container:DefinedElement) | ||
7230 | { | ||
7231 | find interpretation(problem,interpretation); | ||
7232 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
7233 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
7234 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
7235 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
7236 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
7237 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
7238 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
7239 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
7240 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
7241 | find mustExist(problem, interpretation, container); | ||
7242 | neg find mustExist(problem, interpretation, newObject); | ||
7243 | } | ||
7244 | pattern createObject_FunctionalInput_class( | ||
7245 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7246 | typeInterpretation:PartialComplexTypeInterpretation) | ||
7247 | { | ||
7248 | find interpretation(problem,interpretation); | ||
7249 | neg find hasElementInContainment(problem,interpretation); | ||
7250 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
7251 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
7252 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
7253 | find mayExist(problem, interpretation, newObject); | ||
7254 | neg find mustExist(problem, interpretation, newObject); | ||
7255 | } | ||
7256 | pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
7257 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7258 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
7259 | container:DefinedElement) | ||
7260 | { | ||
7261 | find interpretation(problem,interpretation); | ||
7262 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
7263 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
7264 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
7265 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
7266 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
7267 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
7268 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
7269 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
7270 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
7271 | find mustExist(problem, interpretation, container); | ||
7272 | neg find mustExist(problem, interpretation, newObject); | ||
7273 | } | ||
7274 | pattern createObject_FunctionalOutput_class( | ||
7275 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7276 | typeInterpretation:PartialComplexTypeInterpretation) | ||
7277 | { | ||
7278 | find interpretation(problem,interpretation); | ||
7279 | neg find hasElementInContainment(problem,interpretation); | ||
7280 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
7281 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
7282 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
7283 | find mayExist(problem, interpretation, newObject); | ||
7284 | neg find mustExist(problem, interpretation, newObject); | ||
7285 | } | ||
7286 | pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( | ||
7287 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7288 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
7289 | container:DefinedElement) | ||
7290 | { | ||
7291 | find interpretation(problem,interpretation); | ||
7292 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
7293 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
7294 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
7295 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); | ||
7296 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
7297 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); | ||
7298 | find mustInstanceOfFunctionalData_class(problem,interpretation,container); | ||
7299 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
7300 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); | ||
7301 | find mustExist(problem, interpretation, container); | ||
7302 | neg find mustExist(problem, interpretation, newObject); | ||
7303 | } | ||
7304 | pattern createObject_FAMTerminator_class( | ||
7305 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7306 | typeInterpretation:PartialComplexTypeInterpretation) | ||
7307 | { | ||
7308 | find interpretation(problem,interpretation); | ||
7309 | neg find hasElementInContainment(problem,interpretation); | ||
7310 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
7311 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
7312 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
7313 | find mayExist(problem, interpretation, newObject); | ||
7314 | neg find mustExist(problem, interpretation, newObject); | ||
7315 | } | ||
7316 | pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( | ||
7317 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7318 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
7319 | container:DefinedElement) | ||
7320 | { | ||
7321 | find interpretation(problem,interpretation); | ||
7322 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
7323 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
7324 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
7325 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); | ||
7326 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
7327 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); | ||
7328 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); | ||
7329 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
7330 | find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); | ||
7331 | find mustExist(problem, interpretation, container); | ||
7332 | neg find mustExist(problem, interpretation, newObject); | ||
7333 | } | ||
7334 | pattern createObject_InformationLink_class( | ||
7335 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7336 | typeInterpretation:PartialComplexTypeInterpretation) | ||
7337 | { | ||
7338 | find interpretation(problem,interpretation); | ||
7339 | neg find hasElementInContainment(problem,interpretation); | ||
7340 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
7341 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
7342 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
7343 | find mayExist(problem, interpretation, newObject); | ||
7344 | neg find mustExist(problem, interpretation, newObject); | ||
7345 | } | ||
7346 | pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( | ||
7347 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7348 | typeInterpretation:PartialComplexTypeInterpretation) | ||
7349 | { | ||
7350 | find interpretation(problem,interpretation); | ||
7351 | neg find hasElementInContainment(problem,interpretation); | ||
7352 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
7353 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); | ||
7354 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); | ||
7355 | find mayExist(problem, interpretation, newObject); | ||
7356 | neg find mustExist(problem, interpretation, newObject); | ||
7357 | } | ||
7358 | pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( | ||
7359 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7360 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
7361 | container:DefinedElement) | ||
7362 | { | ||
7363 | find interpretation(problem,interpretation); | ||
7364 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
7365 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
7366 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
7367 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
7368 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); | ||
7369 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
7370 | find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); | ||
7371 | find mustExist(problem, interpretation, container); | ||
7372 | neg find mustExist(problem, interpretation, newObject); | ||
7373 | } | ||
7374 | pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( | ||
7375 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7376 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
7377 | container:DefinedElement) | ||
7378 | { | ||
7379 | find interpretation(problem,interpretation); | ||
7380 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
7381 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
7382 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
7383 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); | ||
7384 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
7385 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); | ||
7386 | find mustInstanceOfFunction_class(problem,interpretation,container); | ||
7387 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
7388 | find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); | ||
7389 | find mustExist(problem, interpretation, container); | ||
7390 | neg find mustExist(problem, interpretation, newObject); | ||
7391 | } | ||
7392 | pattern createObject_Function_class( | ||
7393 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7394 | typeInterpretation:PartialComplexTypeInterpretation) | ||
7395 | { | ||
7396 | find interpretation(problem,interpretation); | ||
7397 | neg find hasElementInContainment(problem,interpretation); | ||
7398 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
7399 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
7400 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
7401 | find mayExist(problem, interpretation, newObject); | ||
7402 | neg find mustExist(problem, interpretation, newObject); | ||
7403 | } | ||
7404 | pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( | ||
7405 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7406 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
7407 | container:DefinedElement) | ||
7408 | { | ||
7409 | find interpretation(problem,interpretation); | ||
7410 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
7411 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
7412 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
7413 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); | ||
7414 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
7415 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); | ||
7416 | find mustInstanceOfFunctionalElement_class(problem,interpretation,container); | ||
7417 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
7418 | find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); | ||
7419 | find mustExist(problem, interpretation, container); | ||
7420 | neg find mustExist(problem, interpretation, newObject); | ||
7421 | } | ||
7422 | pattern createObject_FunctionalInterface_class( | ||
7423 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7424 | typeInterpretation:PartialComplexTypeInterpretation) | ||
7425 | { | ||
7426 | find interpretation(problem,interpretation); | ||
7427 | neg find hasElementInContainment(problem,interpretation); | ||
7428 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
7429 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
7430 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
7431 | find mayExist(problem, interpretation, newObject); | ||
7432 | neg find mustExist(problem, interpretation, newObject); | ||
7433 | } | ||
7434 | |||
7435 | ////////// | ||
7436 | // 4.2 Type refinement | ||
7437 | ////////// | ||
7438 | pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
7439 | find interpretation(problem,interpretation); | ||
7440 | PartialInterpretation.newElements(interpretation,element); | ||
7441 | find mayInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
7442 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
7443 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
7444 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
7445 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
7446 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
7447 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
7448 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
7449 | } | ||
7450 | pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
7451 | find interpretation(problem,interpretation); | ||
7452 | PartialInterpretation.newElements(interpretation,element); | ||
7453 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
7454 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
7455 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
7456 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
7457 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
7458 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
7459 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
7460 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
7461 | } | ||
7462 | pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
7463 | find interpretation(problem,interpretation); | ||
7464 | PartialInterpretation.newElements(interpretation,element); | ||
7465 | find mayInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
7466 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
7467 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
7468 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
7469 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
7470 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
7471 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
7472 | } | ||
7473 | pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
7474 | find interpretation(problem,interpretation); | ||
7475 | PartialInterpretation.newElements(interpretation,element); | ||
7476 | find mayInstanceOfInformationLink_class(problem,interpretation,element); | ||
7477 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
7478 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
7479 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
7480 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
7481 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
7482 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
7483 | } | ||
7484 | pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
7485 | find interpretation(problem,interpretation); | ||
7486 | PartialInterpretation.newElements(interpretation,element); | ||
7487 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
7488 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
7489 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
7490 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
7491 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
7492 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
7493 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
7494 | } | ||
7495 | pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
7496 | find interpretation(problem,interpretation); | ||
7497 | PartialInterpretation.newElements(interpretation,element); | ||
7498 | find mayInstanceOfFunction_class(problem,interpretation,element); | ||
7499 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
7500 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
7501 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
7502 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
7503 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
7504 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
7505 | } | ||
7506 | pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
7507 | find interpretation(problem,interpretation); | ||
7508 | PartialInterpretation.newElements(interpretation,element); | ||
7509 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
7510 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
7511 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
7512 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
7513 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
7514 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
7515 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
7516 | } | ||
7517 | |||
7518 | ////////// | ||
7519 | // 4.3 Relation refinement | ||
7520 | ////////// | ||
7521 | pattern refineRelation_model_reference_FunctionalElement( | ||
7522 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7523 | relationIterpretation:PartialRelationInterpretation, | ||
7524 | from: DefinedElement, to: DefinedElement) | ||
7525 | { | ||
7526 | find interpretation(problem,interpretation); | ||
7527 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
7528 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
7529 | find mustExist(problem, interpretation, from); | ||
7530 | find mustExist(problem, interpretation, to); | ||
7531 | find mustInstanceOfFunctionalElement_class(problem,interpretation,from); | ||
7532 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); | ||
7533 | find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
7534 | neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
7535 | } | ||
7536 | pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( | ||
7537 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7538 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
7539 | from: DefinedElement, to: DefinedElement) | ||
7540 | { | ||
7541 | find interpretation(problem,interpretation); | ||
7542 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
7543 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
7544 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
7545 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); | ||
7546 | find mustExist(problem, interpretation, from); | ||
7547 | find mustExist(problem, interpretation, to); | ||
7548 | find mustInstanceOfFunctionalInput_class(problem,interpretation,from); | ||
7549 | find mustInstanceOfInformationLink_class(problem,interpretation,to); | ||
7550 | find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
7551 | neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
7552 | } | ||
7553 | pattern refineRelation_type_attribute_Function( | ||
7554 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7555 | relationIterpretation:PartialRelationInterpretation, | ||
7556 | from: DefinedElement, to: DefinedElement) | ||
7557 | { | ||
7558 | find interpretation(problem,interpretation); | ||
7559 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
7560 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
7561 | find mustExist(problem, interpretation, from); | ||
7562 | find mustExist(problem, interpretation, to); | ||
7563 | find mustInstanceOfFunction_class(problem,interpretation,from); | ||
7564 | find mustInstanceOfFunctionType_enum(problem,interpretation,to); | ||
7565 | find mayInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
7566 | neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
7567 | } | ||
7568 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
7569 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
7570 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
7571 | |||
7572 | ////////// | ||
7573 | // 0. Util | ||
7574 | ////////// | ||
7575 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
7576 | PartialInterpretation.problem(interpretation,problem); | ||
7577 | } | ||
7578 | |||
7579 | ///////////////////////// | ||
7580 | // 0.1 Existence | ||
7581 | ///////////////////////// | ||
7582 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
7583 | find interpretation(problem,interpretation); | ||
7584 | LogicProblem.elements(problem,element); | ||
7585 | } or { | ||
7586 | find interpretation(problem,interpretation); | ||
7587 | PartialInterpretation.newElements(interpretation,element); | ||
7588 | } | ||
7589 | |||
7590 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
7591 | find mustExist(problem,interpretation,element); | ||
7592 | } or { | ||
7593 | find interpretation(problem,interpretation); | ||
7594 | neg find elementCloseWorld(element); | ||
7595 | PartialInterpretation.openWorldElements(interpretation,element); | ||
7596 | } | ||
7597 | |||
7598 | private pattern elementCloseWorld(element:DefinedElement) { | ||
7599 | PartialInterpretation.openWorldElements(i,element); | ||
7600 | PartialInterpretation.maxNewElements(i,0); | ||
7601 | } or { | ||
7602 | Scope.targetTypeInterpretation(scope,interpretation); | ||
7603 | PartialTypeInterpratation.elements(interpretation,element); | ||
7604 | Scope.maxNewElements(scope,0); | ||
7605 | } | ||
7606 | |||
7607 | //////////////////////// | ||
7608 | // 0.2 Equivalence | ||
7609 | //////////////////////// | ||
7610 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
7611 | find mayExist(problem,interpretation,a); | ||
7612 | find mayExist(problem,interpretation,b); | ||
7613 | a == b; | ||
7614 | } | ||
7615 | |||
7616 | //////////////////////// | ||
7617 | // 0.3 Required Patterns by TypeIndexer | ||
7618 | //////////////////////// | ||
7619 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
7620 | find interpretation(problem,interpretation); | ||
7621 | LogicProblem.types(problem,type); | ||
7622 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
7623 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
7624 | } | ||
7625 | |||
7626 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
7627 | find interpretation(problem,interpretation); | ||
7628 | LogicProblem.types(problem,type); | ||
7629 | TypeDefinition.elements(type,element); | ||
7630 | } or { | ||
7631 | find interpretation(problem,interpretation); | ||
7632 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
7633 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
7634 | } | ||
7635 | |||
7636 | private pattern isPrimitive(element: PrimitiveElement) { | ||
7637 | PrimitiveElement(element); | ||
7638 | } | ||
7639 | |||
7640 | ////////// | ||
7641 | // 1. Problem-Specific Base Indexers | ||
7642 | ////////// | ||
7643 | // 1.1 Type Indexers | ||
7644 | ////////// | ||
7645 | // 1.1.1 primitive Type Indexers | ||
7646 | ////////// | ||
7647 | |||
7648 | ////////// | ||
7649 | // 1.1.2 domain-specific Type Indexers | ||
7650 | ////////// | ||
7651 | /** | ||
7652 | * An element must be an instance of type "FunctionalElement class". | ||
7653 | */ | ||
7654 | private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
7655 | Type.name(type,"FunctionalElement class"); | ||
7656 | find directInstanceOf(problem,interpretation,element,type); | ||
7657 | } | ||
7658 | private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
7659 | find interpretation(problem,interpretation); | ||
7660 | PartialInterpretation.scopes(interpretation,scope); | ||
7661 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
7662 | Scope.maxNewElements(scope,0); | ||
7663 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
7664 | Type.name(type,"FunctionalElement class"); | ||
7665 | } | ||
7666 | |||
7667 | /** | ||
7668 | * An element may be an instance of type "FunctionalElement class". | ||
7669 | */ | ||
7670 | private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
7671 | { | ||
7672 | find interpretation(problem,interpretation); | ||
7673 | PartialInterpretation.newElements(interpretation,element); | ||
7674 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
7675 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
7676 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
7677 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
7678 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
7679 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
7680 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
7681 | neg find isPrimitive(element); | ||
7682 | } or { | ||
7683 | find interpretation(problem,interpretation); | ||
7684 | PartialInterpretation.openWorldElements(interpretation,element); | ||
7685 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
7686 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
7687 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
7688 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
7689 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
7690 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
7691 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
7692 | neg find isPrimitive(element); | ||
7693 | } or | ||
7694 | { find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } | ||
7695 | /** | ||
7696 | * An element must be an instance of type "FunctionalArchitectureModel class". | ||
7697 | */ | ||
7698 | private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
7699 | Type.name(type,"FunctionalArchitectureModel class"); | ||
7700 | find directInstanceOf(problem,interpretation,element,type); | ||
7701 | } | ||
7702 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
7703 | find interpretation(problem,interpretation); | ||
7704 | PartialInterpretation.scopes(interpretation,scope); | ||
7705 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
7706 | Scope.maxNewElements(scope,0); | ||
7707 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
7708 | Type.name(type,"FunctionalArchitectureModel class"); | ||
7709 | } | ||
7710 | |||
7711 | /** | ||
7712 | * An element may be an instance of type "FunctionalArchitectureModel class". | ||
7713 | */ | ||
7714 | private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
7715 | { | ||
7716 | find interpretation(problem,interpretation); | ||
7717 | PartialInterpretation.newElements(interpretation,element); | ||
7718 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
7719 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
7720 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
7721 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
7722 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
7723 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
7724 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
7725 | neg find isPrimitive(element); | ||
7726 | } or { | ||
7727 | find interpretation(problem,interpretation); | ||
7728 | PartialInterpretation.openWorldElements(interpretation,element); | ||
7729 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
7730 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
7731 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
7732 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
7733 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
7734 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
7735 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
7736 | neg find isPrimitive(element); | ||
7737 | } or | ||
7738 | { find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } | ||
7739 | /** | ||
7740 | * An element must be an instance of type "Function class". | ||
7741 | */ | ||
7742 | private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
7743 | Type.name(type,"Function class"); | ||
7744 | find directInstanceOf(problem,interpretation,element,type); | ||
7745 | } | ||
7746 | private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
7747 | find interpretation(problem,interpretation); | ||
7748 | PartialInterpretation.scopes(interpretation,scope); | ||
7749 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
7750 | Scope.maxNewElements(scope,0); | ||
7751 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
7752 | Type.name(type,"Function class"); | ||
7753 | } | ||
7754 | |||
7755 | /** | ||
7756 | * An element may be an instance of type "Function class". | ||
7757 | */ | ||
7758 | private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
7759 | { | ||
7760 | find interpretation(problem,interpretation); | ||
7761 | PartialInterpretation.newElements(interpretation,element); | ||
7762 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
7763 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
7764 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
7765 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
7766 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
7767 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
7768 | neg find isPrimitive(element); | ||
7769 | } or { | ||
7770 | find interpretation(problem,interpretation); | ||
7771 | PartialInterpretation.openWorldElements(interpretation,element); | ||
7772 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
7773 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
7774 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
7775 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
7776 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
7777 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
7778 | neg find isPrimitive(element); | ||
7779 | } or | ||
7780 | { find mustInstanceOfFunction_class(problem,interpretation,element); } | ||
7781 | /** | ||
7782 | * An element must be an instance of type "FAMTerminator class". | ||
7783 | */ | ||
7784 | private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
7785 | Type.name(type,"FAMTerminator class"); | ||
7786 | find directInstanceOf(problem,interpretation,element,type); | ||
7787 | } | ||
7788 | private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
7789 | find interpretation(problem,interpretation); | ||
7790 | PartialInterpretation.scopes(interpretation,scope); | ||
7791 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
7792 | Scope.maxNewElements(scope,0); | ||
7793 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
7794 | Type.name(type,"FAMTerminator class"); | ||
7795 | } | ||
7796 | |||
7797 | /** | ||
7798 | * An element may be an instance of type "FAMTerminator class". | ||
7799 | */ | ||
7800 | private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
7801 | { | ||
7802 | find interpretation(problem,interpretation); | ||
7803 | PartialInterpretation.newElements(interpretation,element); | ||
7804 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
7805 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
7806 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
7807 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
7808 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
7809 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
7810 | neg find isPrimitive(element); | ||
7811 | } or { | ||
7812 | find interpretation(problem,interpretation); | ||
7813 | PartialInterpretation.openWorldElements(interpretation,element); | ||
7814 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
7815 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
7816 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
7817 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
7818 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
7819 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
7820 | neg find isPrimitive(element); | ||
7821 | } or | ||
7822 | { find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } | ||
7823 | /** | ||
7824 | * An element must be an instance of type "InformationLink class". | ||
7825 | */ | ||
7826 | private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
7827 | Type.name(type,"InformationLink class"); | ||
7828 | find directInstanceOf(problem,interpretation,element,type); | ||
7829 | } | ||
7830 | private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
7831 | find interpretation(problem,interpretation); | ||
7832 | PartialInterpretation.scopes(interpretation,scope); | ||
7833 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
7834 | Scope.maxNewElements(scope,0); | ||
7835 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
7836 | Type.name(type,"InformationLink class"); | ||
7837 | } | ||
7838 | |||
7839 | /** | ||
7840 | * An element may be an instance of type "InformationLink class". | ||
7841 | */ | ||
7842 | private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
7843 | { | ||
7844 | find interpretation(problem,interpretation); | ||
7845 | PartialInterpretation.newElements(interpretation,element); | ||
7846 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
7847 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
7848 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
7849 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
7850 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
7851 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
7852 | neg find isPrimitive(element); | ||
7853 | } or { | ||
7854 | find interpretation(problem,interpretation); | ||
7855 | PartialInterpretation.openWorldElements(interpretation,element); | ||
7856 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
7857 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
7858 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
7859 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
7860 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
7861 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
7862 | neg find isPrimitive(element); | ||
7863 | } or | ||
7864 | { find mustInstanceOfInformationLink_class(problem,interpretation,element); } | ||
7865 | /** | ||
7866 | * An element must be an instance of type "FunctionalInterface class". | ||
7867 | */ | ||
7868 | private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
7869 | Type.name(type,"FunctionalInterface class"); | ||
7870 | find directInstanceOf(problem,interpretation,element,type); | ||
7871 | } | ||
7872 | private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
7873 | find interpretation(problem,interpretation); | ||
7874 | PartialInterpretation.scopes(interpretation,scope); | ||
7875 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
7876 | Scope.maxNewElements(scope,0); | ||
7877 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
7878 | Type.name(type,"FunctionalInterface class"); | ||
7879 | } | ||
7880 | |||
7881 | /** | ||
7882 | * An element may be an instance of type "FunctionalInterface class". | ||
7883 | */ | ||
7884 | private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
7885 | { | ||
7886 | find interpretation(problem,interpretation); | ||
7887 | PartialInterpretation.newElements(interpretation,element); | ||
7888 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
7889 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
7890 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
7891 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
7892 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
7893 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
7894 | neg find isPrimitive(element); | ||
7895 | } or { | ||
7896 | find interpretation(problem,interpretation); | ||
7897 | PartialInterpretation.openWorldElements(interpretation,element); | ||
7898 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
7899 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
7900 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
7901 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
7902 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
7903 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
7904 | neg find isPrimitive(element); | ||
7905 | } or | ||
7906 | { find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } | ||
7907 | /** | ||
7908 | * An element must be an instance of type "FunctionalInput class". | ||
7909 | */ | ||
7910 | private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
7911 | Type.name(type,"FunctionalInput class"); | ||
7912 | find directInstanceOf(problem,interpretation,element,type); | ||
7913 | } | ||
7914 | private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
7915 | find interpretation(problem,interpretation); | ||
7916 | PartialInterpretation.scopes(interpretation,scope); | ||
7917 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
7918 | Scope.maxNewElements(scope,0); | ||
7919 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
7920 | Type.name(type,"FunctionalInput class"); | ||
7921 | } | ||
7922 | |||
7923 | /** | ||
7924 | * An element may be an instance of type "FunctionalInput class". | ||
7925 | */ | ||
7926 | private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
7927 | { | ||
7928 | find interpretation(problem,interpretation); | ||
7929 | PartialInterpretation.newElements(interpretation,element); | ||
7930 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
7931 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
7932 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
7933 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
7934 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
7935 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
7936 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
7937 | neg find isPrimitive(element); | ||
7938 | } or { | ||
7939 | find interpretation(problem,interpretation); | ||
7940 | PartialInterpretation.openWorldElements(interpretation,element); | ||
7941 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
7942 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
7943 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
7944 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
7945 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
7946 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
7947 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
7948 | neg find isPrimitive(element); | ||
7949 | } or | ||
7950 | { find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } | ||
7951 | /** | ||
7952 | * An element must be an instance of type "FunctionalOutput class". | ||
7953 | */ | ||
7954 | private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
7955 | Type.name(type,"FunctionalOutput class"); | ||
7956 | find directInstanceOf(problem,interpretation,element,type); | ||
7957 | } | ||
7958 | private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
7959 | find interpretation(problem,interpretation); | ||
7960 | PartialInterpretation.scopes(interpretation,scope); | ||
7961 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
7962 | Scope.maxNewElements(scope,0); | ||
7963 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
7964 | Type.name(type,"FunctionalOutput class"); | ||
7965 | } | ||
7966 | |||
7967 | /** | ||
7968 | * An element may be an instance of type "FunctionalOutput class". | ||
7969 | */ | ||
7970 | private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
7971 | { | ||
7972 | find interpretation(problem,interpretation); | ||
7973 | PartialInterpretation.newElements(interpretation,element); | ||
7974 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
7975 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
7976 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
7977 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
7978 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
7979 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
7980 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
7981 | neg find isPrimitive(element); | ||
7982 | } or { | ||
7983 | find interpretation(problem,interpretation); | ||
7984 | PartialInterpretation.openWorldElements(interpretation,element); | ||
7985 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
7986 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
7987 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
7988 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
7989 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
7990 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
7991 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
7992 | neg find isPrimitive(element); | ||
7993 | } or | ||
7994 | { find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } | ||
7995 | /** | ||
7996 | * An element must be an instance of type "FunctionalData class". | ||
7997 | */ | ||
7998 | private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
7999 | Type.name(type,"FunctionalData class"); | ||
8000 | find directInstanceOf(problem,interpretation,element,type); | ||
8001 | } | ||
8002 | private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
8003 | find interpretation(problem,interpretation); | ||
8004 | PartialInterpretation.scopes(interpretation,scope); | ||
8005 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
8006 | Scope.maxNewElements(scope,0); | ||
8007 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
8008 | Type.name(type,"FunctionalData class"); | ||
8009 | } | ||
8010 | |||
8011 | /** | ||
8012 | * An element may be an instance of type "FunctionalData class". | ||
8013 | */ | ||
8014 | private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
8015 | { | ||
8016 | find interpretation(problem,interpretation); | ||
8017 | PartialInterpretation.newElements(interpretation,element); | ||
8018 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
8019 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
8020 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
8021 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
8022 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
8023 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
8024 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
8025 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
8026 | neg find isPrimitive(element); | ||
8027 | } or { | ||
8028 | find interpretation(problem,interpretation); | ||
8029 | PartialInterpretation.openWorldElements(interpretation,element); | ||
8030 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
8031 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
8032 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
8033 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
8034 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
8035 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
8036 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
8037 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
8038 | neg find isPrimitive(element); | ||
8039 | } or | ||
8040 | { find mustInstanceOfFunctionalData_class(problem,interpretation,element); } | ||
8041 | /** | ||
8042 | * An element must be an instance of type "FunctionType enum". | ||
8043 | */ | ||
8044 | private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
8045 | Type.name(type,"FunctionType enum"); | ||
8046 | find directInstanceOf(problem,interpretation,element,type); | ||
8047 | } | ||
8048 | private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
8049 | find interpretation(problem,interpretation); | ||
8050 | PartialInterpretation.scopes(interpretation,scope); | ||
8051 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
8052 | Scope.maxNewElements(scope,0); | ||
8053 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
8054 | Type.name(type,"FunctionType enum"); | ||
8055 | } | ||
8056 | |||
8057 | /** | ||
8058 | * An element may be an instance of type "FunctionType enum". | ||
8059 | */ | ||
8060 | private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
8061 | { find mustInstanceOfFunctionType_enum(problem,interpretation,element); } | ||
8062 | /** | ||
8063 | * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
8064 | */ | ||
8065 | private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
8066 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
8067 | find directInstanceOf(problem,interpretation,element,type); | ||
8068 | } | ||
8069 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
8070 | find interpretation(problem,interpretation); | ||
8071 | PartialInterpretation.scopes(interpretation,scope); | ||
8072 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
8073 | Scope.maxNewElements(scope,0); | ||
8074 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
8075 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
8076 | } | ||
8077 | |||
8078 | /** | ||
8079 | * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
8080 | */ | ||
8081 | private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
8082 | { find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } | ||
8083 | /** | ||
8084 | * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
8085 | */ | ||
8086 | private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
8087 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
8088 | find directInstanceOf(problem,interpretation,element,type); | ||
8089 | } | ||
8090 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
8091 | find interpretation(problem,interpretation); | ||
8092 | PartialInterpretation.scopes(interpretation,scope); | ||
8093 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
8094 | Scope.maxNewElements(scope,0); | ||
8095 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
8096 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
8097 | } | ||
8098 | |||
8099 | /** | ||
8100 | * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
8101 | */ | ||
8102 | private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
8103 | { | ||
8104 | find interpretation(problem,interpretation); | ||
8105 | PartialInterpretation.newElements(interpretation,element); | ||
8106 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
8107 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
8108 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
8109 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
8110 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
8111 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
8112 | neg find isPrimitive(element); | ||
8113 | } or { | ||
8114 | find interpretation(problem,interpretation); | ||
8115 | PartialInterpretation.openWorldElements(interpretation,element); | ||
8116 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
8117 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
8118 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
8119 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
8120 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
8121 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
8122 | neg find isPrimitive(element); | ||
8123 | } or | ||
8124 | { find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } | ||
8125 | |||
8126 | ////////// | ||
8127 | // 1.2 Relation Declaration Indexers | ||
8128 | ////////// | ||
8129 | /** | ||
8130 | * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) | ||
8131 | */ | ||
8132 | private pattern mustInRelationinterface_reference_FunctionalElement( | ||
8133 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8134 | source: DefinedElement, target:DefinedElement) | ||
8135 | { | ||
8136 | find interpretation(problem,interpretation); | ||
8137 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
8138 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); | ||
8139 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
8140 | BinaryElementRelationLink.param1(link,source); | ||
8141 | BinaryElementRelationLink.param2(link,target); | ||
8142 | } | ||
8143 | /** | ||
8144 | * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) | ||
8145 | */ | ||
8146 | private pattern mayInRelationinterface_reference_FunctionalElement( | ||
8147 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8148 | source: DefinedElement, target:DefinedElement) | ||
8149 | { | ||
8150 | find interpretation(problem,interpretation); | ||
8151 | // The two endpoint of the link have to exist | ||
8152 | find mayExist(problem, interpretation, source); | ||
8153 | find mayExist(problem, interpretation, target); | ||
8154 | // Type consistency | ||
8155 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
8156 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
8157 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
8158 | // the upper bound of the multiplicity should be considered. | ||
8159 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); | ||
8160 | check(numberOfExistingReferences < 1); | ||
8161 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
8162 | // the upper bound of the opposite reference multiplicity should be considered. | ||
8163 | numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); | ||
8164 | check(numberOfExistingOppositeReferences < 1); | ||
8165 | // The reference is containment, then a new reference cannot be create if: | ||
8166 | // 1. Multiple parents | ||
8167 | neg find mustContains4(problem,interpretation,_,target); | ||
8168 | // 2. Circle in the containment hierarchy | ||
8169 | neg find mustTransitiveContains(source,target); | ||
8170 | } or { | ||
8171 | find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); | ||
8172 | } | ||
8173 | /** | ||
8174 | * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) | ||
8175 | */ | ||
8176 | private pattern mustInRelationmodel_reference_FunctionalElement( | ||
8177 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8178 | source: DefinedElement, target:DefinedElement) | ||
8179 | { | ||
8180 | find interpretation(problem,interpretation); | ||
8181 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
8182 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
8183 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
8184 | BinaryElementRelationLink.param1(link,source); | ||
8185 | BinaryElementRelationLink.param2(link,target); | ||
8186 | } | ||
8187 | /** | ||
8188 | * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target) | ||
8189 | */ | ||
8190 | private pattern mayInRelationmodel_reference_FunctionalElement( | ||
8191 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8192 | source: DefinedElement, target:DefinedElement) | ||
8193 | { | ||
8194 | find interpretation(problem,interpretation); | ||
8195 | // The two endpoint of the link have to exist | ||
8196 | find mayExist(problem, interpretation, source); | ||
8197 | find mayExist(problem, interpretation, target); | ||
8198 | // Type consistency | ||
8199 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
8200 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target); | ||
8201 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
8202 | // the upper bound of the multiplicity should be considered. | ||
8203 | numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_); | ||
8204 | check(numberOfExistingReferences < 1); | ||
8205 | } or { | ||
8206 | find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target); | ||
8207 | } | ||
8208 | /** | ||
8209 | * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) | ||
8210 | */ | ||
8211 | private pattern mustInRelationparent_reference_FunctionalElement( | ||
8212 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8213 | source: DefinedElement, target:DefinedElement) | ||
8214 | { | ||
8215 | find interpretation(problem,interpretation); | ||
8216 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
8217 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); | ||
8218 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
8219 | BinaryElementRelationLink.param1(link,source); | ||
8220 | BinaryElementRelationLink.param2(link,target); | ||
8221 | } | ||
8222 | /** | ||
8223 | * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) | ||
8224 | */ | ||
8225 | private pattern mayInRelationparent_reference_FunctionalElement( | ||
8226 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8227 | source: DefinedElement, target:DefinedElement) | ||
8228 | { | ||
8229 | find interpretation(problem,interpretation); | ||
8230 | // The two endpoint of the link have to exist | ||
8231 | find mayExist(problem, interpretation, source); | ||
8232 | find mayExist(problem, interpretation, target); | ||
8233 | // Type consistency | ||
8234 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
8235 | find mayInstanceOfFunction_class(problem,interpretation,target); | ||
8236 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
8237 | // the upper bound of the multiplicity should be considered. | ||
8238 | numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); | ||
8239 | check(numberOfExistingReferences < 1); | ||
8240 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
8241 | // 1. Multiple parents | ||
8242 | neg find mustContains4(problem,interpretation,source,_); | ||
8243 | // 2. Circle in the containment hierarchy | ||
8244 | neg find mustTransitiveContains(source,target); | ||
8245 | } or { | ||
8246 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); | ||
8247 | } | ||
8248 | /** | ||
8249 | * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) | ||
8250 | */ | ||
8251 | private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( | ||
8252 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8253 | source: DefinedElement, target:DefinedElement) | ||
8254 | { | ||
8255 | find interpretation(problem,interpretation); | ||
8256 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
8257 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
8258 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
8259 | BinaryElementRelationLink.param1(link,source); | ||
8260 | BinaryElementRelationLink.param2(link,target); | ||
8261 | } | ||
8262 | /** | ||
8263 | * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) | ||
8264 | */ | ||
8265 | private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( | ||
8266 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8267 | source: DefinedElement, target:DefinedElement) | ||
8268 | { | ||
8269 | find interpretation(problem,interpretation); | ||
8270 | // The two endpoint of the link have to exist | ||
8271 | find mayExist(problem, interpretation, source); | ||
8272 | find mayExist(problem, interpretation, target); | ||
8273 | // Type consistency | ||
8274 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); | ||
8275 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
8276 | // The reference is containment, then a new reference cannot be create if: | ||
8277 | // 1. Multiple parents | ||
8278 | neg find mustContains4(problem,interpretation,_,target); | ||
8279 | // 2. Circle in the containment hierarchy | ||
8280 | neg find mustTransitiveContains(source,target); | ||
8281 | } or { | ||
8282 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); | ||
8283 | } | ||
8284 | /** | ||
8285 | * Matcher for detecting tuples t where []subElements reference Function(source,target) | ||
8286 | */ | ||
8287 | private pattern mustInRelationsubElements_reference_Function( | ||
8288 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8289 | source: DefinedElement, target:DefinedElement) | ||
8290 | { | ||
8291 | find interpretation(problem,interpretation); | ||
8292 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
8293 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); | ||
8294 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
8295 | BinaryElementRelationLink.param1(link,source); | ||
8296 | BinaryElementRelationLink.param2(link,target); | ||
8297 | } | ||
8298 | /** | ||
8299 | * Matcher for detecting tuples t where <>subElements reference Function(source,target) | ||
8300 | */ | ||
8301 | private pattern mayInRelationsubElements_reference_Function( | ||
8302 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8303 | source: DefinedElement, target:DefinedElement) | ||
8304 | { | ||
8305 | find interpretation(problem,interpretation); | ||
8306 | // The two endpoint of the link have to exist | ||
8307 | find mayExist(problem, interpretation, source); | ||
8308 | find mayExist(problem, interpretation, target); | ||
8309 | // Type consistency | ||
8310 | find mayInstanceOfFunction_class(problem,interpretation,source); | ||
8311 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
8312 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
8313 | // the upper bound of the opposite reference multiplicity should be considered. | ||
8314 | numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); | ||
8315 | check(numberOfExistingOppositeReferences < 1); | ||
8316 | // The reference is containment, then a new reference cannot be create if: | ||
8317 | // 1. Multiple parents | ||
8318 | neg find mustContains4(problem,interpretation,_,target); | ||
8319 | // 2. Circle in the containment hierarchy | ||
8320 | neg find mustTransitiveContains(source,target); | ||
8321 | } or { | ||
8322 | find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); | ||
8323 | } | ||
8324 | /** | ||
8325 | * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) | ||
8326 | */ | ||
8327 | private pattern mustInRelationdata_reference_FAMTerminator( | ||
8328 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8329 | source: DefinedElement, target:DefinedElement) | ||
8330 | { | ||
8331 | find interpretation(problem,interpretation); | ||
8332 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
8333 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); | ||
8334 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
8335 | BinaryElementRelationLink.param1(link,source); | ||
8336 | BinaryElementRelationLink.param2(link,target); | ||
8337 | } | ||
8338 | /** | ||
8339 | * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) | ||
8340 | */ | ||
8341 | private pattern mayInRelationdata_reference_FAMTerminator( | ||
8342 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8343 | source: DefinedElement, target:DefinedElement) | ||
8344 | { | ||
8345 | find interpretation(problem,interpretation); | ||
8346 | // The two endpoint of the link have to exist | ||
8347 | find mayExist(problem, interpretation, source); | ||
8348 | find mayExist(problem, interpretation, target); | ||
8349 | // Type consistency | ||
8350 | find mayInstanceOfFAMTerminator_class(problem,interpretation,source); | ||
8351 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
8352 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
8353 | // the upper bound of the multiplicity should be considered. | ||
8354 | numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); | ||
8355 | check(numberOfExistingReferences < 1); | ||
8356 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
8357 | // the upper bound of the opposite reference multiplicity should be considered. | ||
8358 | numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); | ||
8359 | check(numberOfExistingOppositeReferences < 1); | ||
8360 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
8361 | // 1. Multiple parents | ||
8362 | neg find mustContains4(problem,interpretation,source,_); | ||
8363 | // 2. Circle in the containment hierarchy | ||
8364 | neg find mustTransitiveContains(source,target); | ||
8365 | } or { | ||
8366 | find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); | ||
8367 | } | ||
8368 | /** | ||
8369 | * Matcher for detecting tuples t where []from reference InformationLink(source,target) | ||
8370 | */ | ||
8371 | private pattern mustInRelationfrom_reference_InformationLink( | ||
8372 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8373 | source: DefinedElement, target:DefinedElement) | ||
8374 | { | ||
8375 | find interpretation(problem,interpretation); | ||
8376 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
8377 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); | ||
8378 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
8379 | BinaryElementRelationLink.param1(link,source); | ||
8380 | BinaryElementRelationLink.param2(link,target); | ||
8381 | } | ||
8382 | /** | ||
8383 | * Matcher for detecting tuples t where <>from reference InformationLink(source,target) | ||
8384 | */ | ||
8385 | private pattern mayInRelationfrom_reference_InformationLink( | ||
8386 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8387 | source: DefinedElement, target:DefinedElement) | ||
8388 | { | ||
8389 | find interpretation(problem,interpretation); | ||
8390 | // The two endpoint of the link have to exist | ||
8391 | find mayExist(problem, interpretation, source); | ||
8392 | find mayExist(problem, interpretation, target); | ||
8393 | // Type consistency | ||
8394 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
8395 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); | ||
8396 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
8397 | // the upper bound of the multiplicity should be considered. | ||
8398 | numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); | ||
8399 | check(numberOfExistingReferences < 1); | ||
8400 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
8401 | // 1. Multiple parents | ||
8402 | neg find mustContains4(problem,interpretation,source,_); | ||
8403 | // 2. Circle in the containment hierarchy | ||
8404 | neg find mustTransitiveContains(source,target); | ||
8405 | } or { | ||
8406 | find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); | ||
8407 | } | ||
8408 | /** | ||
8409 | * Matcher for detecting tuples t where []to reference InformationLink(source,target) | ||
8410 | */ | ||
8411 | private pattern mustInRelationto_reference_InformationLink( | ||
8412 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8413 | source: DefinedElement, target:DefinedElement) | ||
8414 | { | ||
8415 | find interpretation(problem,interpretation); | ||
8416 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
8417 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
8418 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
8419 | BinaryElementRelationLink.param1(link,source); | ||
8420 | BinaryElementRelationLink.param2(link,target); | ||
8421 | } | ||
8422 | /** | ||
8423 | * Matcher for detecting tuples t where <>to reference InformationLink(source,target) | ||
8424 | */ | ||
8425 | private pattern mayInRelationto_reference_InformationLink( | ||
8426 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8427 | source: DefinedElement, target:DefinedElement) | ||
8428 | { | ||
8429 | find interpretation(problem,interpretation); | ||
8430 | // The two endpoint of the link have to exist | ||
8431 | find mayExist(problem, interpretation, source); | ||
8432 | find mayExist(problem, interpretation, target); | ||
8433 | // Type consistency | ||
8434 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
8435 | find mayInstanceOfFunctionalInput_class(problem,interpretation,target); | ||
8436 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
8437 | // the upper bound of the multiplicity should be considered. | ||
8438 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); | ||
8439 | check(numberOfExistingReferences < 1); | ||
8440 | } or { | ||
8441 | find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); | ||
8442 | } | ||
8443 | /** | ||
8444 | * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) | ||
8445 | */ | ||
8446 | private pattern mustInRelationdata_reference_FunctionalInterface( | ||
8447 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8448 | source: DefinedElement, target:DefinedElement) | ||
8449 | { | ||
8450 | find interpretation(problem,interpretation); | ||
8451 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
8452 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); | ||
8453 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
8454 | BinaryElementRelationLink.param1(link,source); | ||
8455 | BinaryElementRelationLink.param2(link,target); | ||
8456 | } | ||
8457 | /** | ||
8458 | * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) | ||
8459 | */ | ||
8460 | private pattern mayInRelationdata_reference_FunctionalInterface( | ||
8461 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8462 | source: DefinedElement, target:DefinedElement) | ||
8463 | { | ||
8464 | find interpretation(problem,interpretation); | ||
8465 | // The two endpoint of the link have to exist | ||
8466 | find mayExist(problem, interpretation, source); | ||
8467 | find mayExist(problem, interpretation, target); | ||
8468 | // Type consistency | ||
8469 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
8470 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
8471 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
8472 | // the upper bound of the opposite reference multiplicity should be considered. | ||
8473 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); | ||
8474 | check(numberOfExistingOppositeReferences < 1); | ||
8475 | // The reference is containment, then a new reference cannot be create if: | ||
8476 | // 1. Multiple parents | ||
8477 | neg find mustContains4(problem,interpretation,_,target); | ||
8478 | // 2. Circle in the containment hierarchy | ||
8479 | neg find mustTransitiveContains(source,target); | ||
8480 | } or { | ||
8481 | find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); | ||
8482 | } | ||
8483 | /** | ||
8484 | * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) | ||
8485 | */ | ||
8486 | private pattern mustInRelationelement_reference_FunctionalInterface( | ||
8487 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8488 | source: DefinedElement, target:DefinedElement) | ||
8489 | { | ||
8490 | find interpretation(problem,interpretation); | ||
8491 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
8492 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); | ||
8493 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
8494 | BinaryElementRelationLink.param1(link,source); | ||
8495 | BinaryElementRelationLink.param2(link,target); | ||
8496 | } | ||
8497 | /** | ||
8498 | * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) | ||
8499 | */ | ||
8500 | private pattern mayInRelationelement_reference_FunctionalInterface( | ||
8501 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8502 | source: DefinedElement, target:DefinedElement) | ||
8503 | { | ||
8504 | find interpretation(problem,interpretation); | ||
8505 | // The two endpoint of the link have to exist | ||
8506 | find mayExist(problem, interpretation, source); | ||
8507 | find mayExist(problem, interpretation, target); | ||
8508 | // Type consistency | ||
8509 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
8510 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
8511 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
8512 | // the upper bound of the multiplicity should be considered. | ||
8513 | numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); | ||
8514 | check(numberOfExistingReferences < 1); | ||
8515 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
8516 | // the upper bound of the opposite reference multiplicity should be considered. | ||
8517 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); | ||
8518 | check(numberOfExistingOppositeReferences < 1); | ||
8519 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
8520 | // 1. Multiple parents | ||
8521 | neg find mustContains4(problem,interpretation,source,_); | ||
8522 | // 2. Circle in the containment hierarchy | ||
8523 | neg find mustTransitiveContains(source,target); | ||
8524 | } or { | ||
8525 | find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); | ||
8526 | } | ||
8527 | /** | ||
8528 | * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) | ||
8529 | */ | ||
8530 | private pattern mustInRelationIncomingLinks_reference_FunctionalInput( | ||
8531 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8532 | source: DefinedElement, target:DefinedElement) | ||
8533 | { | ||
8534 | find interpretation(problem,interpretation); | ||
8535 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
8536 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
8537 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
8538 | BinaryElementRelationLink.param1(link,source); | ||
8539 | BinaryElementRelationLink.param2(link,target); | ||
8540 | } | ||
8541 | /** | ||
8542 | * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) | ||
8543 | */ | ||
8544 | private pattern mayInRelationIncomingLinks_reference_FunctionalInput( | ||
8545 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8546 | source: DefinedElement, target:DefinedElement) | ||
8547 | { | ||
8548 | find interpretation(problem,interpretation); | ||
8549 | // The two endpoint of the link have to exist | ||
8550 | find mayExist(problem, interpretation, source); | ||
8551 | find mayExist(problem, interpretation, target); | ||
8552 | // Type consistency | ||
8553 | find mayInstanceOfFunctionalInput_class(problem,interpretation,source); | ||
8554 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
8555 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
8556 | // the upper bound of the opposite reference multiplicity should be considered. | ||
8557 | numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); | ||
8558 | check(numberOfExistingOppositeReferences < 1); | ||
8559 | } or { | ||
8560 | find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); | ||
8561 | } | ||
8562 | /** | ||
8563 | * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) | ||
8564 | */ | ||
8565 | private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( | ||
8566 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8567 | source: DefinedElement, target:DefinedElement) | ||
8568 | { | ||
8569 | find interpretation(problem,interpretation); | ||
8570 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
8571 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); | ||
8572 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
8573 | BinaryElementRelationLink.param1(link,source); | ||
8574 | BinaryElementRelationLink.param2(link,target); | ||
8575 | } | ||
8576 | /** | ||
8577 | * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) | ||
8578 | */ | ||
8579 | private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( | ||
8580 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8581 | source: DefinedElement, target:DefinedElement) | ||
8582 | { | ||
8583 | find interpretation(problem,interpretation); | ||
8584 | // The two endpoint of the link have to exist | ||
8585 | find mayExist(problem, interpretation, source); | ||
8586 | find mayExist(problem, interpretation, target); | ||
8587 | // Type consistency | ||
8588 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); | ||
8589 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
8590 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
8591 | // the upper bound of the opposite reference multiplicity should be considered. | ||
8592 | numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); | ||
8593 | check(numberOfExistingOppositeReferences < 1); | ||
8594 | // The reference is containment, then a new reference cannot be create if: | ||
8595 | // 1. Multiple parents | ||
8596 | neg find mustContains4(problem,interpretation,_,target); | ||
8597 | // 2. Circle in the containment hierarchy | ||
8598 | neg find mustTransitiveContains(source,target); | ||
8599 | } or { | ||
8600 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); | ||
8601 | } | ||
8602 | /** | ||
8603 | * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) | ||
8604 | */ | ||
8605 | private pattern mustInRelationterminator_reference_FunctionalData( | ||
8606 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8607 | source: DefinedElement, target:DefinedElement) | ||
8608 | { | ||
8609 | find interpretation(problem,interpretation); | ||
8610 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
8611 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); | ||
8612 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
8613 | BinaryElementRelationLink.param1(link,source); | ||
8614 | BinaryElementRelationLink.param2(link,target); | ||
8615 | } | ||
8616 | /** | ||
8617 | * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) | ||
8618 | */ | ||
8619 | private pattern mayInRelationterminator_reference_FunctionalData( | ||
8620 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8621 | source: DefinedElement, target:DefinedElement) | ||
8622 | { | ||
8623 | find interpretation(problem,interpretation); | ||
8624 | // The two endpoint of the link have to exist | ||
8625 | find mayExist(problem, interpretation, source); | ||
8626 | find mayExist(problem, interpretation, target); | ||
8627 | // Type consistency | ||
8628 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
8629 | find mayInstanceOfFAMTerminator_class(problem,interpretation,target); | ||
8630 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
8631 | // the upper bound of the multiplicity should be considered. | ||
8632 | numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); | ||
8633 | check(numberOfExistingReferences < 1); | ||
8634 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
8635 | // the upper bound of the opposite reference multiplicity should be considered. | ||
8636 | numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); | ||
8637 | check(numberOfExistingOppositeReferences < 1); | ||
8638 | // The reference is containment, then a new reference cannot be create if: | ||
8639 | // 1. Multiple parents | ||
8640 | neg find mustContains4(problem,interpretation,_,target); | ||
8641 | // 2. Circle in the containment hierarchy | ||
8642 | neg find mustTransitiveContains(source,target); | ||
8643 | } or { | ||
8644 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); | ||
8645 | } | ||
8646 | /** | ||
8647 | * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) | ||
8648 | */ | ||
8649 | private pattern mustInRelationinterface_reference_FunctionalData( | ||
8650 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8651 | source: DefinedElement, target:DefinedElement) | ||
8652 | { | ||
8653 | find interpretation(problem,interpretation); | ||
8654 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
8655 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); | ||
8656 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
8657 | BinaryElementRelationLink.param1(link,source); | ||
8658 | BinaryElementRelationLink.param2(link,target); | ||
8659 | } | ||
8660 | /** | ||
8661 | * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) | ||
8662 | */ | ||
8663 | private pattern mayInRelationinterface_reference_FunctionalData( | ||
8664 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8665 | source: DefinedElement, target:DefinedElement) | ||
8666 | { | ||
8667 | find interpretation(problem,interpretation); | ||
8668 | // The two endpoint of the link have to exist | ||
8669 | find mayExist(problem, interpretation, source); | ||
8670 | find mayExist(problem, interpretation, target); | ||
8671 | // Type consistency | ||
8672 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
8673 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
8674 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
8675 | // the upper bound of the multiplicity should be considered. | ||
8676 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); | ||
8677 | check(numberOfExistingReferences < 1); | ||
8678 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
8679 | // 1. Multiple parents | ||
8680 | neg find mustContains4(problem,interpretation,source,_); | ||
8681 | // 2. Circle in the containment hierarchy | ||
8682 | neg find mustTransitiveContains(source,target); | ||
8683 | } or { | ||
8684 | find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); | ||
8685 | } | ||
8686 | /** | ||
8687 | * Matcher for detecting tuples t where []type attribute Function(source,target) | ||
8688 | */ | ||
8689 | private pattern mustInRelationtype_attribute_Function( | ||
8690 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8691 | source: DefinedElement, target:DefinedElement) | ||
8692 | { | ||
8693 | find interpretation(problem,interpretation); | ||
8694 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
8695 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
8696 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
8697 | BinaryElementRelationLink.param1(link,source); | ||
8698 | BinaryElementRelationLink.param2(link,target); | ||
8699 | } | ||
8700 | /** | ||
8701 | * Matcher for detecting tuples t where <>type attribute Function(source,target) | ||
8702 | */ | ||
8703 | private pattern mayInRelationtype_attribute_Function( | ||
8704 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8705 | source: DefinedElement, target:DefinedElement) | ||
8706 | { | ||
8707 | find interpretation(problem,interpretation); | ||
8708 | // The two endpoint of the link have to exist | ||
8709 | find mayExist(problem, interpretation, source); | ||
8710 | find mayExist(problem, interpretation, target); | ||
8711 | // Type consistency | ||
8712 | find mayInstanceOfFunction_class(problem,interpretation,source); | ||
8713 | find mayInstanceOfFunctionType_enum(problem,interpretation,target); | ||
8714 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
8715 | // the upper bound of the multiplicity should be considered. | ||
8716 | numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_); | ||
8717 | check(numberOfExistingReferences < 1); | ||
8718 | } or { | ||
8719 | find mustInRelationtype_attribute_Function(problem,interpretation,source,target); | ||
8720 | } | ||
8721 | |||
8722 | ////////// | ||
8723 | // 1.3 Relation Definition Indexers | ||
8724 | ////////// | ||
8725 | |||
8726 | ////////// | ||
8727 | // 1.4 Containment Indexer | ||
8728 | ////////// | ||
8729 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
8730 | find mustContains4(_,_,source,target); | ||
8731 | } | ||
8732 | |||
8733 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8734 | source: DefinedElement, target: DefinedElement) | ||
8735 | { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or | ||
8736 | |||
8737 | { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or | ||
8738 | |||
8739 | { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or | ||
8740 | |||
8741 | { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or | ||
8742 | |||
8743 | { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or | ||
8744 | |||
8745 | { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } | ||
8746 | |||
8747 | private pattern mustTransitiveContains(source,target) { | ||
8748 | find mustContains2+(source,target); | ||
8749 | } | ||
8750 | |||
8751 | ////////// | ||
8752 | // 2. Invalidation Indexers | ||
8753 | ////////// | ||
8754 | // 2.1 Invalidated by WF Queries | ||
8755 | ////////// | ||
8756 | |||
8757 | ////////// | ||
8758 | // 3. Unfinishedness Indexers | ||
8759 | ////////// | ||
8760 | // 3.1 Unfinishedness Measured by Multiplicity | ||
8761 | ////////// | ||
8762 | pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
8763 | find interpretation(problem,interpretation); | ||
8764 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
8765 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
8766 | find mustInstanceOfFunctionalElement_class(problem,interpretation,object); | ||
8767 | numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_); | ||
8768 | check(numberOfExistingReferences < 1); | ||
8769 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
8770 | } | ||
8771 | pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
8772 | find interpretation(problem,interpretation); | ||
8773 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
8774 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
8775 | find mustInstanceOfInformationLink_class(problem,interpretation,object); | ||
8776 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); | ||
8777 | check(numberOfExistingReferences < 1); | ||
8778 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
8779 | } | ||
8780 | pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
8781 | find interpretation(problem,interpretation); | ||
8782 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
8783 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
8784 | find mustInstanceOfFunction_class(problem,interpretation,object); | ||
8785 | numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_); | ||
8786 | check(numberOfExistingReferences < 1); | ||
8787 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
8788 | } | ||
8789 | |||
8790 | ////////// | ||
8791 | // 3.2 Unfinishedness Measured by WF Queries | ||
8792 | ////////// | ||
8793 | |||
8794 | ////////// | ||
8795 | // 4. Refinement Indexers | ||
8796 | ////////// | ||
8797 | // 4.1 Object constructors | ||
8798 | ////////// | ||
8799 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
8800 | { | ||
8801 | find interpretation(problem,interpretation); | ||
8802 | find mustInstanceOfFunctionalData_class(problem,interpretation,root); | ||
8803 | find mustExist(problem, interpretation, root); | ||
8804 | }or{ | ||
8805 | find interpretation(problem,interpretation); | ||
8806 | find mustInstanceOfInformationLink_class(problem,interpretation,root); | ||
8807 | find mustExist(problem, interpretation, root); | ||
8808 | }or{ | ||
8809 | find interpretation(problem,interpretation); | ||
8810 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); | ||
8811 | find mustExist(problem, interpretation, root); | ||
8812 | }or{ | ||
8813 | find interpretation(problem,interpretation); | ||
8814 | find mustInstanceOfFAMTerminator_class(problem,interpretation,root); | ||
8815 | find mustExist(problem, interpretation, root); | ||
8816 | }or{ | ||
8817 | find interpretation(problem,interpretation); | ||
8818 | find mustInstanceOfFunctionalElement_class(problem,interpretation,root); | ||
8819 | find mustExist(problem, interpretation, root); | ||
8820 | }or{ | ||
8821 | find interpretation(problem,interpretation); | ||
8822 | find mustInstanceOfFunctionalInput_class(problem,interpretation,root); | ||
8823 | find mustExist(problem, interpretation, root); | ||
8824 | }or{ | ||
8825 | find interpretation(problem,interpretation); | ||
8826 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); | ||
8827 | find mustExist(problem, interpretation, root); | ||
8828 | }or{ | ||
8829 | find interpretation(problem,interpretation); | ||
8830 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); | ||
8831 | find mustExist(problem, interpretation, root); | ||
8832 | }or{ | ||
8833 | find interpretation(problem,interpretation); | ||
8834 | find mustInstanceOfFunction_class(problem,interpretation,root); | ||
8835 | find mustExist(problem, interpretation, root); | ||
8836 | }or{ | ||
8837 | find interpretation(problem,interpretation); | ||
8838 | find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); | ||
8839 | find mustExist(problem, interpretation, root); | ||
8840 | }or{ | ||
8841 | find interpretation(problem,interpretation); | ||
8842 | find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); | ||
8843 | find mustExist(problem, interpretation, root); | ||
8844 | } | ||
8845 | pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( | ||
8846 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8847 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
8848 | container:DefinedElement) | ||
8849 | { | ||
8850 | find interpretation(problem,interpretation); | ||
8851 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8852 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
8853 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
8854 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); | ||
8855 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
8856 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); | ||
8857 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); | ||
8858 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
8859 | find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); | ||
8860 | find mustExist(problem, interpretation, container); | ||
8861 | neg find mustExist(problem, interpretation, newObject); | ||
8862 | } | ||
8863 | pattern createObject_InformationLink_class( | ||
8864 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8865 | typeInterpretation:PartialComplexTypeInterpretation) | ||
8866 | { | ||
8867 | find interpretation(problem,interpretation); | ||
8868 | neg find hasElementInContainment(problem,interpretation); | ||
8869 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8870 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
8871 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
8872 | find mayExist(problem, interpretation, newObject); | ||
8873 | neg find mustExist(problem, interpretation, newObject); | ||
8874 | } | ||
8875 | pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
8876 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8877 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
8878 | container:DefinedElement) | ||
8879 | { | ||
8880 | find interpretation(problem,interpretation); | ||
8881 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8882 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
8883 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
8884 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
8885 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
8886 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
8887 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
8888 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
8889 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
8890 | find mustExist(problem, interpretation, container); | ||
8891 | neg find mustExist(problem, interpretation, newObject); | ||
8892 | } | ||
8893 | pattern createObject_FunctionalOutput_class( | ||
8894 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8895 | typeInterpretation:PartialComplexTypeInterpretation) | ||
8896 | { | ||
8897 | find interpretation(problem,interpretation); | ||
8898 | neg find hasElementInContainment(problem,interpretation); | ||
8899 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8900 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
8901 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
8902 | find mayExist(problem, interpretation, newObject); | ||
8903 | neg find mustExist(problem, interpretation, newObject); | ||
8904 | } | ||
8905 | pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
8906 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8907 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
8908 | container:DefinedElement) | ||
8909 | { | ||
8910 | find interpretation(problem,interpretation); | ||
8911 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8912 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
8913 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
8914 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
8915 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
8916 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
8917 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
8918 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
8919 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
8920 | find mustExist(problem, interpretation, container); | ||
8921 | neg find mustExist(problem, interpretation, newObject); | ||
8922 | } | ||
8923 | pattern createObject_FunctionalInput_class( | ||
8924 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8925 | typeInterpretation:PartialComplexTypeInterpretation) | ||
8926 | { | ||
8927 | find interpretation(problem,interpretation); | ||
8928 | neg find hasElementInContainment(problem,interpretation); | ||
8929 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8930 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
8931 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
8932 | find mayExist(problem, interpretation, newObject); | ||
8933 | neg find mustExist(problem, interpretation, newObject); | ||
8934 | } | ||
8935 | pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( | ||
8936 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8937 | typeInterpretation:PartialComplexTypeInterpretation) | ||
8938 | { | ||
8939 | find interpretation(problem,interpretation); | ||
8940 | neg find hasElementInContainment(problem,interpretation); | ||
8941 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8942 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); | ||
8943 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); | ||
8944 | find mayExist(problem, interpretation, newObject); | ||
8945 | neg find mustExist(problem, interpretation, newObject); | ||
8946 | } | ||
8947 | pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( | ||
8948 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8949 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
8950 | container:DefinedElement) | ||
8951 | { | ||
8952 | find interpretation(problem,interpretation); | ||
8953 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8954 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
8955 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
8956 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); | ||
8957 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
8958 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); | ||
8959 | find mustInstanceOfFunctionalElement_class(problem,interpretation,container); | ||
8960 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
8961 | find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); | ||
8962 | find mustExist(problem, interpretation, container); | ||
8963 | neg find mustExist(problem, interpretation, newObject); | ||
8964 | } | ||
8965 | pattern createObject_FunctionalInterface_class( | ||
8966 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8967 | typeInterpretation:PartialComplexTypeInterpretation) | ||
8968 | { | ||
8969 | find interpretation(problem,interpretation); | ||
8970 | neg find hasElementInContainment(problem,interpretation); | ||
8971 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8972 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
8973 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
8974 | find mayExist(problem, interpretation, newObject); | ||
8975 | neg find mustExist(problem, interpretation, newObject); | ||
8976 | } | ||
8977 | pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( | ||
8978 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8979 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
8980 | container:DefinedElement) | ||
8981 | { | ||
8982 | find interpretation(problem,interpretation); | ||
8983 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8984 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
8985 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
8986 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
8987 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); | ||
8988 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
8989 | find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); | ||
8990 | find mustExist(problem, interpretation, container); | ||
8991 | neg find mustExist(problem, interpretation, newObject); | ||
8992 | } | ||
8993 | pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( | ||
8994 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8995 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
8996 | container:DefinedElement) | ||
8997 | { | ||
8998 | find interpretation(problem,interpretation); | ||
8999 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
9000 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
9001 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
9002 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); | ||
9003 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
9004 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); | ||
9005 | find mustInstanceOfFunction_class(problem,interpretation,container); | ||
9006 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
9007 | find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); | ||
9008 | find mustExist(problem, interpretation, container); | ||
9009 | neg find mustExist(problem, interpretation, newObject); | ||
9010 | } | ||
9011 | pattern createObject_Function_class( | ||
9012 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9013 | typeInterpretation:PartialComplexTypeInterpretation) | ||
9014 | { | ||
9015 | find interpretation(problem,interpretation); | ||
9016 | neg find hasElementInContainment(problem,interpretation); | ||
9017 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
9018 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
9019 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
9020 | find mayExist(problem, interpretation, newObject); | ||
9021 | neg find mustExist(problem, interpretation, newObject); | ||
9022 | } | ||
9023 | pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( | ||
9024 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9025 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
9026 | container:DefinedElement) | ||
9027 | { | ||
9028 | find interpretation(problem,interpretation); | ||
9029 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
9030 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
9031 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
9032 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); | ||
9033 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
9034 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); | ||
9035 | find mustInstanceOfFunctionalData_class(problem,interpretation,container); | ||
9036 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
9037 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); | ||
9038 | find mustExist(problem, interpretation, container); | ||
9039 | neg find mustExist(problem, interpretation, newObject); | ||
9040 | } | ||
9041 | pattern createObject_FAMTerminator_class( | ||
9042 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9043 | typeInterpretation:PartialComplexTypeInterpretation) | ||
9044 | { | ||
9045 | find interpretation(problem,interpretation); | ||
9046 | neg find hasElementInContainment(problem,interpretation); | ||
9047 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
9048 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
9049 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
9050 | find mayExist(problem, interpretation, newObject); | ||
9051 | neg find mustExist(problem, interpretation, newObject); | ||
9052 | } | ||
9053 | |||
9054 | ////////// | ||
9055 | // 4.2 Type refinement | ||
9056 | ////////// | ||
9057 | pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
9058 | find interpretation(problem,interpretation); | ||
9059 | PartialInterpretation.newElements(interpretation,element); | ||
9060 | find mayInstanceOfInformationLink_class(problem,interpretation,element); | ||
9061 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9062 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
9063 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9064 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
9065 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
9066 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9067 | } | ||
9068 | pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
9069 | find interpretation(problem,interpretation); | ||
9070 | PartialInterpretation.newElements(interpretation,element); | ||
9071 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
9072 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9073 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
9074 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
9075 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9076 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
9077 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
9078 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9079 | } | ||
9080 | pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
9081 | find interpretation(problem,interpretation); | ||
9082 | PartialInterpretation.newElements(interpretation,element); | ||
9083 | find mayInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
9084 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9085 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
9086 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
9087 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9088 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
9089 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
9090 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9091 | } | ||
9092 | pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
9093 | find interpretation(problem,interpretation); | ||
9094 | PartialInterpretation.newElements(interpretation,element); | ||
9095 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
9096 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9097 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
9098 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
9099 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9100 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
9101 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9102 | } | ||
9103 | pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
9104 | find interpretation(problem,interpretation); | ||
9105 | PartialInterpretation.newElements(interpretation,element); | ||
9106 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9107 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9108 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
9109 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9110 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
9111 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
9112 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9113 | } | ||
9114 | pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
9115 | find interpretation(problem,interpretation); | ||
9116 | PartialInterpretation.newElements(interpretation,element); | ||
9117 | find mayInstanceOfFunction_class(problem,interpretation,element); | ||
9118 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9119 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
9120 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9121 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
9122 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
9123 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9124 | } | ||
9125 | pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
9126 | find interpretation(problem,interpretation); | ||
9127 | PartialInterpretation.newElements(interpretation,element); | ||
9128 | find mayInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9129 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9130 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
9131 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9132 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
9133 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
9134 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9135 | } | ||
9136 | |||
9137 | ////////// | ||
9138 | // 4.3 Relation refinement | ||
9139 | ////////// | ||
9140 | pattern refineRelation_model_reference_FunctionalElement( | ||
9141 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9142 | relationIterpretation:PartialRelationInterpretation, | ||
9143 | from: DefinedElement, to: DefinedElement) | ||
9144 | { | ||
9145 | find interpretation(problem,interpretation); | ||
9146 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
9147 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
9148 | find mustExist(problem, interpretation, from); | ||
9149 | find mustExist(problem, interpretation, to); | ||
9150 | find mustInstanceOfFunctionalElement_class(problem,interpretation,from); | ||
9151 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); | ||
9152 | find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
9153 | neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
9154 | } | ||
9155 | pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( | ||
9156 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9157 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
9158 | from: DefinedElement, to: DefinedElement) | ||
9159 | { | ||
9160 | find interpretation(problem,interpretation); | ||
9161 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
9162 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
9163 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
9164 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); | ||
9165 | find mustExist(problem, interpretation, from); | ||
9166 | find mustExist(problem, interpretation, to); | ||
9167 | find mustInstanceOfFunctionalInput_class(problem,interpretation,from); | ||
9168 | find mustInstanceOfInformationLink_class(problem,interpretation,to); | ||
9169 | find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
9170 | neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
9171 | } | ||
9172 | pattern refineRelation_type_attribute_Function( | ||
9173 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9174 | relationIterpretation:PartialRelationInterpretation, | ||
9175 | from: DefinedElement, to: DefinedElement) | ||
9176 | { | ||
9177 | find interpretation(problem,interpretation); | ||
9178 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
9179 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
9180 | find mustExist(problem, interpretation, from); | ||
9181 | find mustExist(problem, interpretation, to); | ||
9182 | find mustInstanceOfFunction_class(problem,interpretation,from); | ||
9183 | find mustInstanceOfFunctionType_enum(problem,interpretation,to); | ||
9184 | find mayInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
9185 | neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
9186 | } | ||
9187 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
9188 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
9189 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
9190 | |||
9191 | ////////// | ||
9192 | // 0. Util | ||
9193 | ////////// | ||
9194 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9195 | PartialInterpretation.problem(interpretation,problem); | ||
9196 | } | ||
9197 | |||
9198 | ///////////////////////// | ||
9199 | // 0.1 Existence | ||
9200 | ///////////////////////// | ||
9201 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9202 | find interpretation(problem,interpretation); | ||
9203 | LogicProblem.elements(problem,element); | ||
9204 | } or { | ||
9205 | find interpretation(problem,interpretation); | ||
9206 | PartialInterpretation.newElements(interpretation,element); | ||
9207 | } | ||
9208 | |||
9209 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9210 | find mustExist(problem,interpretation,element); | ||
9211 | } or { | ||
9212 | find interpretation(problem,interpretation); | ||
9213 | neg find elementCloseWorld(element); | ||
9214 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9215 | } | ||
9216 | |||
9217 | private pattern elementCloseWorld(element:DefinedElement) { | ||
9218 | PartialInterpretation.openWorldElements(i,element); | ||
9219 | PartialInterpretation.maxNewElements(i,0); | ||
9220 | } or { | ||
9221 | Scope.targetTypeInterpretation(scope,interpretation); | ||
9222 | PartialTypeInterpratation.elements(interpretation,element); | ||
9223 | Scope.maxNewElements(scope,0); | ||
9224 | } | ||
9225 | |||
9226 | //////////////////////// | ||
9227 | // 0.2 Equivalence | ||
9228 | //////////////////////// | ||
9229 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
9230 | find mayExist(problem,interpretation,a); | ||
9231 | find mayExist(problem,interpretation,b); | ||
9232 | a == b; | ||
9233 | } | ||
9234 | |||
9235 | //////////////////////// | ||
9236 | // 0.3 Required Patterns by TypeIndexer | ||
9237 | //////////////////////// | ||
9238 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
9239 | find interpretation(problem,interpretation); | ||
9240 | LogicProblem.types(problem,type); | ||
9241 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
9242 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9243 | } | ||
9244 | |||
9245 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
9246 | find interpretation(problem,interpretation); | ||
9247 | LogicProblem.types(problem,type); | ||
9248 | TypeDefinition.elements(type,element); | ||
9249 | } or { | ||
9250 | find interpretation(problem,interpretation); | ||
9251 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
9252 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
9253 | } | ||
9254 | |||
9255 | private pattern isPrimitive(element: PrimitiveElement) { | ||
9256 | PrimitiveElement(element); | ||
9257 | } | ||
9258 | |||
9259 | ////////// | ||
9260 | // 1. Problem-Specific Base Indexers | ||
9261 | ////////// | ||
9262 | // 1.1 Type Indexers | ||
9263 | ////////// | ||
9264 | // 1.1.1 primitive Type Indexers | ||
9265 | ////////// | ||
9266 | |||
9267 | ////////// | ||
9268 | // 1.1.2 domain-specific Type Indexers | ||
9269 | ////////// | ||
9270 | /** | ||
9271 | * An element must be an instance of type "FunctionalElement class". | ||
9272 | */ | ||
9273 | private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9274 | Type.name(type,"FunctionalElement class"); | ||
9275 | find directInstanceOf(problem,interpretation,element,type); | ||
9276 | } | ||
9277 | private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9278 | find interpretation(problem,interpretation); | ||
9279 | PartialInterpretation.scopes(interpretation,scope); | ||
9280 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9281 | Scope.maxNewElements(scope,0); | ||
9282 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9283 | Type.name(type,"FunctionalElement class"); | ||
9284 | } | ||
9285 | |||
9286 | /** | ||
9287 | * An element may be an instance of type "FunctionalElement class". | ||
9288 | */ | ||
9289 | private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9290 | { | ||
9291 | find interpretation(problem,interpretation); | ||
9292 | PartialInterpretation.newElements(interpretation,element); | ||
9293 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9294 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
9295 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9296 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
9297 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
9298 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9299 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
9300 | neg find isPrimitive(element); | ||
9301 | } or { | ||
9302 | find interpretation(problem,interpretation); | ||
9303 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9304 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9305 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
9306 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9307 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
9308 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
9309 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9310 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
9311 | neg find isPrimitive(element); | ||
9312 | } or | ||
9313 | { find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } | ||
9314 | /** | ||
9315 | * An element must be an instance of type "FunctionalArchitectureModel class". | ||
9316 | */ | ||
9317 | private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9318 | Type.name(type,"FunctionalArchitectureModel class"); | ||
9319 | find directInstanceOf(problem,interpretation,element,type); | ||
9320 | } | ||
9321 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9322 | find interpretation(problem,interpretation); | ||
9323 | PartialInterpretation.scopes(interpretation,scope); | ||
9324 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9325 | Scope.maxNewElements(scope,0); | ||
9326 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9327 | Type.name(type,"FunctionalArchitectureModel class"); | ||
9328 | } | ||
9329 | |||
9330 | /** | ||
9331 | * An element may be an instance of type "FunctionalArchitectureModel class". | ||
9332 | */ | ||
9333 | private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9334 | { | ||
9335 | find interpretation(problem,interpretation); | ||
9336 | PartialInterpretation.newElements(interpretation,element); | ||
9337 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9338 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
9339 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9340 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
9341 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
9342 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9343 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
9344 | neg find isPrimitive(element); | ||
9345 | } or { | ||
9346 | find interpretation(problem,interpretation); | ||
9347 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9348 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9349 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
9350 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9351 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
9352 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
9353 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9354 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
9355 | neg find isPrimitive(element); | ||
9356 | } or | ||
9357 | { find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } | ||
9358 | /** | ||
9359 | * An element must be an instance of type "Function class". | ||
9360 | */ | ||
9361 | private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9362 | Type.name(type,"Function class"); | ||
9363 | find directInstanceOf(problem,interpretation,element,type); | ||
9364 | } | ||
9365 | private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9366 | find interpretation(problem,interpretation); | ||
9367 | PartialInterpretation.scopes(interpretation,scope); | ||
9368 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9369 | Scope.maxNewElements(scope,0); | ||
9370 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9371 | Type.name(type,"Function class"); | ||
9372 | } | ||
9373 | |||
9374 | /** | ||
9375 | * An element may be an instance of type "Function class". | ||
9376 | */ | ||
9377 | private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9378 | { | ||
9379 | find interpretation(problem,interpretation); | ||
9380 | PartialInterpretation.newElements(interpretation,element); | ||
9381 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9382 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
9383 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9384 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
9385 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9386 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
9387 | neg find isPrimitive(element); | ||
9388 | } or { | ||
9389 | find interpretation(problem,interpretation); | ||
9390 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9391 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9392 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
9393 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9394 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
9395 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9396 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
9397 | neg find isPrimitive(element); | ||
9398 | } or | ||
9399 | { find mustInstanceOfFunction_class(problem,interpretation,element); } | ||
9400 | /** | ||
9401 | * An element must be an instance of type "FAMTerminator class". | ||
9402 | */ | ||
9403 | private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9404 | Type.name(type,"FAMTerminator class"); | ||
9405 | find directInstanceOf(problem,interpretation,element,type); | ||
9406 | } | ||
9407 | private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9408 | find interpretation(problem,interpretation); | ||
9409 | PartialInterpretation.scopes(interpretation,scope); | ||
9410 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9411 | Scope.maxNewElements(scope,0); | ||
9412 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9413 | Type.name(type,"FAMTerminator class"); | ||
9414 | } | ||
9415 | |||
9416 | /** | ||
9417 | * An element may be an instance of type "FAMTerminator class". | ||
9418 | */ | ||
9419 | private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9420 | { | ||
9421 | find interpretation(problem,interpretation); | ||
9422 | PartialInterpretation.newElements(interpretation,element); | ||
9423 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9424 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
9425 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9426 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
9427 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
9428 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
9429 | neg find isPrimitive(element); | ||
9430 | } or { | ||
9431 | find interpretation(problem,interpretation); | ||
9432 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9433 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9434 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
9435 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9436 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
9437 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
9438 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
9439 | neg find isPrimitive(element); | ||
9440 | } or | ||
9441 | { find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } | ||
9442 | /** | ||
9443 | * An element must be an instance of type "InformationLink class". | ||
9444 | */ | ||
9445 | private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9446 | Type.name(type,"InformationLink class"); | ||
9447 | find directInstanceOf(problem,interpretation,element,type); | ||
9448 | } | ||
9449 | private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9450 | find interpretation(problem,interpretation); | ||
9451 | PartialInterpretation.scopes(interpretation,scope); | ||
9452 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9453 | Scope.maxNewElements(scope,0); | ||
9454 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9455 | Type.name(type,"InformationLink class"); | ||
9456 | } | ||
9457 | |||
9458 | /** | ||
9459 | * An element may be an instance of type "InformationLink class". | ||
9460 | */ | ||
9461 | private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9462 | { | ||
9463 | find interpretation(problem,interpretation); | ||
9464 | PartialInterpretation.newElements(interpretation,element); | ||
9465 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9466 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
9467 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
9468 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
9469 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9470 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
9471 | neg find isPrimitive(element); | ||
9472 | } or { | ||
9473 | find interpretation(problem,interpretation); | ||
9474 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9475 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9476 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
9477 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
9478 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
9479 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9480 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
9481 | neg find isPrimitive(element); | ||
9482 | } or | ||
9483 | { find mustInstanceOfInformationLink_class(problem,interpretation,element); } | ||
9484 | /** | ||
9485 | * An element must be an instance of type "FunctionalInterface class". | ||
9486 | */ | ||
9487 | private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9488 | Type.name(type,"FunctionalInterface class"); | ||
9489 | find directInstanceOf(problem,interpretation,element,type); | ||
9490 | } | ||
9491 | private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9492 | find interpretation(problem,interpretation); | ||
9493 | PartialInterpretation.scopes(interpretation,scope); | ||
9494 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9495 | Scope.maxNewElements(scope,0); | ||
9496 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9497 | Type.name(type,"FunctionalInterface class"); | ||
9498 | } | ||
9499 | |||
9500 | /** | ||
9501 | * An element may be an instance of type "FunctionalInterface class". | ||
9502 | */ | ||
9503 | private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9504 | { | ||
9505 | find interpretation(problem,interpretation); | ||
9506 | PartialInterpretation.newElements(interpretation,element); | ||
9507 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
9508 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9509 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
9510 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
9511 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9512 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
9513 | neg find isPrimitive(element); | ||
9514 | } or { | ||
9515 | find interpretation(problem,interpretation); | ||
9516 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9517 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
9518 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9519 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
9520 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
9521 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9522 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
9523 | neg find isPrimitive(element); | ||
9524 | } or | ||
9525 | { find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } | ||
9526 | /** | ||
9527 | * An element must be an instance of type "FunctionalInput class". | ||
9528 | */ | ||
9529 | private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9530 | Type.name(type,"FunctionalInput class"); | ||
9531 | find directInstanceOf(problem,interpretation,element,type); | ||
9532 | } | ||
9533 | private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9534 | find interpretation(problem,interpretation); | ||
9535 | PartialInterpretation.scopes(interpretation,scope); | ||
9536 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9537 | Scope.maxNewElements(scope,0); | ||
9538 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9539 | Type.name(type,"FunctionalInput class"); | ||
9540 | } | ||
9541 | |||
9542 | /** | ||
9543 | * An element may be an instance of type "FunctionalInput class". | ||
9544 | */ | ||
9545 | private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9546 | { | ||
9547 | find interpretation(problem,interpretation); | ||
9548 | PartialInterpretation.newElements(interpretation,element); | ||
9549 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9550 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
9551 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9552 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
9553 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
9554 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9555 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
9556 | neg find isPrimitive(element); | ||
9557 | } or { | ||
9558 | find interpretation(problem,interpretation); | ||
9559 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9560 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9561 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
9562 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9563 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
9564 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
9565 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9566 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
9567 | neg find isPrimitive(element); | ||
9568 | } or | ||
9569 | { find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } | ||
9570 | /** | ||
9571 | * An element must be an instance of type "FunctionalOutput class". | ||
9572 | */ | ||
9573 | private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9574 | Type.name(type,"FunctionalOutput class"); | ||
9575 | find directInstanceOf(problem,interpretation,element,type); | ||
9576 | } | ||
9577 | private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9578 | find interpretation(problem,interpretation); | ||
9579 | PartialInterpretation.scopes(interpretation,scope); | ||
9580 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9581 | Scope.maxNewElements(scope,0); | ||
9582 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9583 | Type.name(type,"FunctionalOutput class"); | ||
9584 | } | ||
9585 | |||
9586 | /** | ||
9587 | * An element may be an instance of type "FunctionalOutput class". | ||
9588 | */ | ||
9589 | private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9590 | { | ||
9591 | find interpretation(problem,interpretation); | ||
9592 | PartialInterpretation.newElements(interpretation,element); | ||
9593 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
9594 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9595 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
9596 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9597 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
9598 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9599 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
9600 | neg find isPrimitive(element); | ||
9601 | } or { | ||
9602 | find interpretation(problem,interpretation); | ||
9603 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9604 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
9605 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9606 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
9607 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9608 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
9609 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9610 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
9611 | neg find isPrimitive(element); | ||
9612 | } or | ||
9613 | { find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } | ||
9614 | /** | ||
9615 | * An element must be an instance of type "FunctionalData class". | ||
9616 | */ | ||
9617 | private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9618 | Type.name(type,"FunctionalData class"); | ||
9619 | find directInstanceOf(problem,interpretation,element,type); | ||
9620 | } | ||
9621 | private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9622 | find interpretation(problem,interpretation); | ||
9623 | PartialInterpretation.scopes(interpretation,scope); | ||
9624 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9625 | Scope.maxNewElements(scope,0); | ||
9626 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9627 | Type.name(type,"FunctionalData class"); | ||
9628 | } | ||
9629 | |||
9630 | /** | ||
9631 | * An element may be an instance of type "FunctionalData class". | ||
9632 | */ | ||
9633 | private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9634 | { | ||
9635 | find interpretation(problem,interpretation); | ||
9636 | PartialInterpretation.newElements(interpretation,element); | ||
9637 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9638 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
9639 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
9640 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9641 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
9642 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
9643 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9644 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
9645 | neg find isPrimitive(element); | ||
9646 | } or { | ||
9647 | find interpretation(problem,interpretation); | ||
9648 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9649 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9650 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
9651 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
9652 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9653 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
9654 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
9655 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9656 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
9657 | neg find isPrimitive(element); | ||
9658 | } or | ||
9659 | { find mustInstanceOfFunctionalData_class(problem,interpretation,element); } | ||
9660 | /** | ||
9661 | * An element must be an instance of type "FunctionType enum". | ||
9662 | */ | ||
9663 | private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9664 | Type.name(type,"FunctionType enum"); | ||
9665 | find directInstanceOf(problem,interpretation,element,type); | ||
9666 | } | ||
9667 | private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9668 | find interpretation(problem,interpretation); | ||
9669 | PartialInterpretation.scopes(interpretation,scope); | ||
9670 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9671 | Scope.maxNewElements(scope,0); | ||
9672 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9673 | Type.name(type,"FunctionType enum"); | ||
9674 | } | ||
9675 | |||
9676 | /** | ||
9677 | * An element may be an instance of type "FunctionType enum". | ||
9678 | */ | ||
9679 | private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9680 | { find mustInstanceOfFunctionType_enum(problem,interpretation,element); } | ||
9681 | /** | ||
9682 | * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
9683 | */ | ||
9684 | private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9685 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
9686 | find directInstanceOf(problem,interpretation,element,type); | ||
9687 | } | ||
9688 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9689 | find interpretation(problem,interpretation); | ||
9690 | PartialInterpretation.scopes(interpretation,scope); | ||
9691 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9692 | Scope.maxNewElements(scope,0); | ||
9693 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9694 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
9695 | } | ||
9696 | |||
9697 | /** | ||
9698 | * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
9699 | */ | ||
9700 | private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9701 | { find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } | ||
9702 | /** | ||
9703 | * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
9704 | */ | ||
9705 | private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9706 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
9707 | find directInstanceOf(problem,interpretation,element,type); | ||
9708 | } | ||
9709 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9710 | find interpretation(problem,interpretation); | ||
9711 | PartialInterpretation.scopes(interpretation,scope); | ||
9712 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9713 | Scope.maxNewElements(scope,0); | ||
9714 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9715 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
9716 | } | ||
9717 | |||
9718 | /** | ||
9719 | * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
9720 | */ | ||
9721 | private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9722 | { | ||
9723 | find interpretation(problem,interpretation); | ||
9724 | PartialInterpretation.newElements(interpretation,element); | ||
9725 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9726 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9727 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
9728 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
9729 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9730 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
9731 | neg find isPrimitive(element); | ||
9732 | } or { | ||
9733 | find interpretation(problem,interpretation); | ||
9734 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9735 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
9736 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
9737 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
9738 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
9739 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
9740 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
9741 | neg find isPrimitive(element); | ||
9742 | } or | ||
9743 | { find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } | ||
9744 | |||
9745 | ////////// | ||
9746 | // 1.2 Relation Declaration Indexers | ||
9747 | ////////// | ||
9748 | /** | ||
9749 | * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) | ||
9750 | */ | ||
9751 | private pattern mustInRelationinterface_reference_FunctionalElement( | ||
9752 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9753 | source: DefinedElement, target:DefinedElement) | ||
9754 | { | ||
9755 | find interpretation(problem,interpretation); | ||
9756 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
9757 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); | ||
9758 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
9759 | BinaryElementRelationLink.param1(link,source); | ||
9760 | BinaryElementRelationLink.param2(link,target); | ||
9761 | } | ||
9762 | /** | ||
9763 | * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) | ||
9764 | */ | ||
9765 | private pattern mayInRelationinterface_reference_FunctionalElement( | ||
9766 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9767 | source: DefinedElement, target:DefinedElement) | ||
9768 | { | ||
9769 | find interpretation(problem,interpretation); | ||
9770 | // The two endpoint of the link have to exist | ||
9771 | find mayExist(problem, interpretation, source); | ||
9772 | find mayExist(problem, interpretation, target); | ||
9773 | // Type consistency | ||
9774 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
9775 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
9776 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
9777 | // the upper bound of the multiplicity should be considered. | ||
9778 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); | ||
9779 | check(numberOfExistingReferences < 1); | ||
9780 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
9781 | // the upper bound of the opposite reference multiplicity should be considered. | ||
9782 | numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); | ||
9783 | check(numberOfExistingOppositeReferences < 1); | ||
9784 | // The reference is containment, then a new reference cannot be create if: | ||
9785 | // 1. Multiple parents | ||
9786 | neg find mustContains4(problem,interpretation,_,target); | ||
9787 | // 2. Circle in the containment hierarchy | ||
9788 | neg find mustTransitiveContains(source,target); | ||
9789 | } or { | ||
9790 | find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); | ||
9791 | } | ||
9792 | /** | ||
9793 | * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) | ||
9794 | */ | ||
9795 | private pattern mustInRelationmodel_reference_FunctionalElement( | ||
9796 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9797 | source: DefinedElement, target:DefinedElement) | ||
9798 | { | ||
9799 | find interpretation(problem,interpretation); | ||
9800 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
9801 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
9802 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
9803 | BinaryElementRelationLink.param1(link,source); | ||
9804 | BinaryElementRelationLink.param2(link,target); | ||
9805 | } | ||
9806 | /** | ||
9807 | * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target) | ||
9808 | */ | ||
9809 | private pattern mayInRelationmodel_reference_FunctionalElement( | ||
9810 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9811 | source: DefinedElement, target:DefinedElement) | ||
9812 | { | ||
9813 | find interpretation(problem,interpretation); | ||
9814 | // The two endpoint of the link have to exist | ||
9815 | find mayExist(problem, interpretation, source); | ||
9816 | find mayExist(problem, interpretation, target); | ||
9817 | // Type consistency | ||
9818 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
9819 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target); | ||
9820 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
9821 | // the upper bound of the multiplicity should be considered. | ||
9822 | numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_); | ||
9823 | check(numberOfExistingReferences < 1); | ||
9824 | } or { | ||
9825 | find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target); | ||
9826 | } | ||
9827 | /** | ||
9828 | * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) | ||
9829 | */ | ||
9830 | private pattern mustInRelationparent_reference_FunctionalElement( | ||
9831 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9832 | source: DefinedElement, target:DefinedElement) | ||
9833 | { | ||
9834 | find interpretation(problem,interpretation); | ||
9835 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
9836 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); | ||
9837 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
9838 | BinaryElementRelationLink.param1(link,source); | ||
9839 | BinaryElementRelationLink.param2(link,target); | ||
9840 | } | ||
9841 | /** | ||
9842 | * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) | ||
9843 | */ | ||
9844 | private pattern mayInRelationparent_reference_FunctionalElement( | ||
9845 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9846 | source: DefinedElement, target:DefinedElement) | ||
9847 | { | ||
9848 | find interpretation(problem,interpretation); | ||
9849 | // The two endpoint of the link have to exist | ||
9850 | find mayExist(problem, interpretation, source); | ||
9851 | find mayExist(problem, interpretation, target); | ||
9852 | // Type consistency | ||
9853 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
9854 | find mayInstanceOfFunction_class(problem,interpretation,target); | ||
9855 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
9856 | // the upper bound of the multiplicity should be considered. | ||
9857 | numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); | ||
9858 | check(numberOfExistingReferences < 1); | ||
9859 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
9860 | // 1. Multiple parents | ||
9861 | neg find mustContains4(problem,interpretation,source,_); | ||
9862 | // 2. Circle in the containment hierarchy | ||
9863 | neg find mustTransitiveContains(source,target); | ||
9864 | } or { | ||
9865 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); | ||
9866 | } | ||
9867 | /** | ||
9868 | * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) | ||
9869 | */ | ||
9870 | private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( | ||
9871 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9872 | source: DefinedElement, target:DefinedElement) | ||
9873 | { | ||
9874 | find interpretation(problem,interpretation); | ||
9875 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
9876 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
9877 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
9878 | BinaryElementRelationLink.param1(link,source); | ||
9879 | BinaryElementRelationLink.param2(link,target); | ||
9880 | } | ||
9881 | /** | ||
9882 | * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) | ||
9883 | */ | ||
9884 | private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( | ||
9885 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9886 | source: DefinedElement, target:DefinedElement) | ||
9887 | { | ||
9888 | find interpretation(problem,interpretation); | ||
9889 | // The two endpoint of the link have to exist | ||
9890 | find mayExist(problem, interpretation, source); | ||
9891 | find mayExist(problem, interpretation, target); | ||
9892 | // Type consistency | ||
9893 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); | ||
9894 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
9895 | // The reference is containment, then a new reference cannot be create if: | ||
9896 | // 1. Multiple parents | ||
9897 | neg find mustContains4(problem,interpretation,_,target); | ||
9898 | // 2. Circle in the containment hierarchy | ||
9899 | neg find mustTransitiveContains(source,target); | ||
9900 | } or { | ||
9901 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); | ||
9902 | } | ||
9903 | /** | ||
9904 | * Matcher for detecting tuples t where []subElements reference Function(source,target) | ||
9905 | */ | ||
9906 | private pattern mustInRelationsubElements_reference_Function( | ||
9907 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9908 | source: DefinedElement, target:DefinedElement) | ||
9909 | { | ||
9910 | find interpretation(problem,interpretation); | ||
9911 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
9912 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); | ||
9913 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
9914 | BinaryElementRelationLink.param1(link,source); | ||
9915 | BinaryElementRelationLink.param2(link,target); | ||
9916 | } | ||
9917 | /** | ||
9918 | * Matcher for detecting tuples t where <>subElements reference Function(source,target) | ||
9919 | */ | ||
9920 | private pattern mayInRelationsubElements_reference_Function( | ||
9921 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9922 | source: DefinedElement, target:DefinedElement) | ||
9923 | { | ||
9924 | find interpretation(problem,interpretation); | ||
9925 | // The two endpoint of the link have to exist | ||
9926 | find mayExist(problem, interpretation, source); | ||
9927 | find mayExist(problem, interpretation, target); | ||
9928 | // Type consistency | ||
9929 | find mayInstanceOfFunction_class(problem,interpretation,source); | ||
9930 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
9931 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
9932 | // the upper bound of the opposite reference multiplicity should be considered. | ||
9933 | numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); | ||
9934 | check(numberOfExistingOppositeReferences < 1); | ||
9935 | // The reference is containment, then a new reference cannot be create if: | ||
9936 | // 1. Multiple parents | ||
9937 | neg find mustContains4(problem,interpretation,_,target); | ||
9938 | // 2. Circle in the containment hierarchy | ||
9939 | neg find mustTransitiveContains(source,target); | ||
9940 | } or { | ||
9941 | find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); | ||
9942 | } | ||
9943 | /** | ||
9944 | * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) | ||
9945 | */ | ||
9946 | private pattern mustInRelationdata_reference_FAMTerminator( | ||
9947 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9948 | source: DefinedElement, target:DefinedElement) | ||
9949 | { | ||
9950 | find interpretation(problem,interpretation); | ||
9951 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
9952 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); | ||
9953 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
9954 | BinaryElementRelationLink.param1(link,source); | ||
9955 | BinaryElementRelationLink.param2(link,target); | ||
9956 | } | ||
9957 | /** | ||
9958 | * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) | ||
9959 | */ | ||
9960 | private pattern mayInRelationdata_reference_FAMTerminator( | ||
9961 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9962 | source: DefinedElement, target:DefinedElement) | ||
9963 | { | ||
9964 | find interpretation(problem,interpretation); | ||
9965 | // The two endpoint of the link have to exist | ||
9966 | find mayExist(problem, interpretation, source); | ||
9967 | find mayExist(problem, interpretation, target); | ||
9968 | // Type consistency | ||
9969 | find mayInstanceOfFAMTerminator_class(problem,interpretation,source); | ||
9970 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
9971 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
9972 | // the upper bound of the multiplicity should be considered. | ||
9973 | numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); | ||
9974 | check(numberOfExistingReferences < 1); | ||
9975 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
9976 | // the upper bound of the opposite reference multiplicity should be considered. | ||
9977 | numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); | ||
9978 | check(numberOfExistingOppositeReferences < 1); | ||
9979 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
9980 | // 1. Multiple parents | ||
9981 | neg find mustContains4(problem,interpretation,source,_); | ||
9982 | // 2. Circle in the containment hierarchy | ||
9983 | neg find mustTransitiveContains(source,target); | ||
9984 | } or { | ||
9985 | find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); | ||
9986 | } | ||
9987 | /** | ||
9988 | * Matcher for detecting tuples t where []from reference InformationLink(source,target) | ||
9989 | */ | ||
9990 | private pattern mustInRelationfrom_reference_InformationLink( | ||
9991 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9992 | source: DefinedElement, target:DefinedElement) | ||
9993 | { | ||
9994 | find interpretation(problem,interpretation); | ||
9995 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
9996 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); | ||
9997 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
9998 | BinaryElementRelationLink.param1(link,source); | ||
9999 | BinaryElementRelationLink.param2(link,target); | ||
10000 | } | ||
10001 | /** | ||
10002 | * Matcher for detecting tuples t where <>from reference InformationLink(source,target) | ||
10003 | */ | ||
10004 | private pattern mayInRelationfrom_reference_InformationLink( | ||
10005 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10006 | source: DefinedElement, target:DefinedElement) | ||
10007 | { | ||
10008 | find interpretation(problem,interpretation); | ||
10009 | // The two endpoint of the link have to exist | ||
10010 | find mayExist(problem, interpretation, source); | ||
10011 | find mayExist(problem, interpretation, target); | ||
10012 | // Type consistency | ||
10013 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
10014 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); | ||
10015 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
10016 | // the upper bound of the multiplicity should be considered. | ||
10017 | numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); | ||
10018 | check(numberOfExistingReferences < 1); | ||
10019 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
10020 | // 1. Multiple parents | ||
10021 | neg find mustContains4(problem,interpretation,source,_); | ||
10022 | // 2. Circle in the containment hierarchy | ||
10023 | neg find mustTransitiveContains(source,target); | ||
10024 | } or { | ||
10025 | find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); | ||
10026 | } | ||
10027 | /** | ||
10028 | * Matcher for detecting tuples t where []to reference InformationLink(source,target) | ||
10029 | */ | ||
10030 | private pattern mustInRelationto_reference_InformationLink( | ||
10031 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10032 | source: DefinedElement, target:DefinedElement) | ||
10033 | { | ||
10034 | find interpretation(problem,interpretation); | ||
10035 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
10036 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
10037 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
10038 | BinaryElementRelationLink.param1(link,source); | ||
10039 | BinaryElementRelationLink.param2(link,target); | ||
10040 | } | ||
10041 | /** | ||
10042 | * Matcher for detecting tuples t where <>to reference InformationLink(source,target) | ||
10043 | */ | ||
10044 | private pattern mayInRelationto_reference_InformationLink( | ||
10045 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10046 | source: DefinedElement, target:DefinedElement) | ||
10047 | { | ||
10048 | find interpretation(problem,interpretation); | ||
10049 | // The two endpoint of the link have to exist | ||
10050 | find mayExist(problem, interpretation, source); | ||
10051 | find mayExist(problem, interpretation, target); | ||
10052 | // Type consistency | ||
10053 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
10054 | find mayInstanceOfFunctionalInput_class(problem,interpretation,target); | ||
10055 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
10056 | // the upper bound of the multiplicity should be considered. | ||
10057 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); | ||
10058 | check(numberOfExistingReferences < 1); | ||
10059 | } or { | ||
10060 | find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); | ||
10061 | } | ||
10062 | /** | ||
10063 | * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) | ||
10064 | */ | ||
10065 | private pattern mustInRelationdata_reference_FunctionalInterface( | ||
10066 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10067 | source: DefinedElement, target:DefinedElement) | ||
10068 | { | ||
10069 | find interpretation(problem,interpretation); | ||
10070 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
10071 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); | ||
10072 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
10073 | BinaryElementRelationLink.param1(link,source); | ||
10074 | BinaryElementRelationLink.param2(link,target); | ||
10075 | } | ||
10076 | /** | ||
10077 | * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) | ||
10078 | */ | ||
10079 | private pattern mayInRelationdata_reference_FunctionalInterface( | ||
10080 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10081 | source: DefinedElement, target:DefinedElement) | ||
10082 | { | ||
10083 | find interpretation(problem,interpretation); | ||
10084 | // The two endpoint of the link have to exist | ||
10085 | find mayExist(problem, interpretation, source); | ||
10086 | find mayExist(problem, interpretation, target); | ||
10087 | // Type consistency | ||
10088 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
10089 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
10090 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
10091 | // the upper bound of the opposite reference multiplicity should be considered. | ||
10092 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); | ||
10093 | check(numberOfExistingOppositeReferences < 1); | ||
10094 | // The reference is containment, then a new reference cannot be create if: | ||
10095 | // 1. Multiple parents | ||
10096 | neg find mustContains4(problem,interpretation,_,target); | ||
10097 | // 2. Circle in the containment hierarchy | ||
10098 | neg find mustTransitiveContains(source,target); | ||
10099 | } or { | ||
10100 | find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); | ||
10101 | } | ||
10102 | /** | ||
10103 | * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) | ||
10104 | */ | ||
10105 | private pattern mustInRelationelement_reference_FunctionalInterface( | ||
10106 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10107 | source: DefinedElement, target:DefinedElement) | ||
10108 | { | ||
10109 | find interpretation(problem,interpretation); | ||
10110 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
10111 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); | ||
10112 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
10113 | BinaryElementRelationLink.param1(link,source); | ||
10114 | BinaryElementRelationLink.param2(link,target); | ||
10115 | } | ||
10116 | /** | ||
10117 | * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) | ||
10118 | */ | ||
10119 | private pattern mayInRelationelement_reference_FunctionalInterface( | ||
10120 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10121 | source: DefinedElement, target:DefinedElement) | ||
10122 | { | ||
10123 | find interpretation(problem,interpretation); | ||
10124 | // The two endpoint of the link have to exist | ||
10125 | find mayExist(problem, interpretation, source); | ||
10126 | find mayExist(problem, interpretation, target); | ||
10127 | // Type consistency | ||
10128 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
10129 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
10130 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
10131 | // the upper bound of the multiplicity should be considered. | ||
10132 | numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); | ||
10133 | check(numberOfExistingReferences < 1); | ||
10134 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
10135 | // the upper bound of the opposite reference multiplicity should be considered. | ||
10136 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); | ||
10137 | check(numberOfExistingOppositeReferences < 1); | ||
10138 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
10139 | // 1. Multiple parents | ||
10140 | neg find mustContains4(problem,interpretation,source,_); | ||
10141 | // 2. Circle in the containment hierarchy | ||
10142 | neg find mustTransitiveContains(source,target); | ||
10143 | } or { | ||
10144 | find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); | ||
10145 | } | ||
10146 | /** | ||
10147 | * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) | ||
10148 | */ | ||
10149 | private pattern mustInRelationIncomingLinks_reference_FunctionalInput( | ||
10150 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10151 | source: DefinedElement, target:DefinedElement) | ||
10152 | { | ||
10153 | find interpretation(problem,interpretation); | ||
10154 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
10155 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
10156 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
10157 | BinaryElementRelationLink.param1(link,source); | ||
10158 | BinaryElementRelationLink.param2(link,target); | ||
10159 | } | ||
10160 | /** | ||
10161 | * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) | ||
10162 | */ | ||
10163 | private pattern mayInRelationIncomingLinks_reference_FunctionalInput( | ||
10164 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10165 | source: DefinedElement, target:DefinedElement) | ||
10166 | { | ||
10167 | find interpretation(problem,interpretation); | ||
10168 | // The two endpoint of the link have to exist | ||
10169 | find mayExist(problem, interpretation, source); | ||
10170 | find mayExist(problem, interpretation, target); | ||
10171 | // Type consistency | ||
10172 | find mayInstanceOfFunctionalInput_class(problem,interpretation,source); | ||
10173 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
10174 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
10175 | // the upper bound of the opposite reference multiplicity should be considered. | ||
10176 | numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); | ||
10177 | check(numberOfExistingOppositeReferences < 1); | ||
10178 | } or { | ||
10179 | find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); | ||
10180 | } | ||
10181 | /** | ||
10182 | * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) | ||
10183 | */ | ||
10184 | private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( | ||
10185 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10186 | source: DefinedElement, target:DefinedElement) | ||
10187 | { | ||
10188 | find interpretation(problem,interpretation); | ||
10189 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
10190 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); | ||
10191 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
10192 | BinaryElementRelationLink.param1(link,source); | ||
10193 | BinaryElementRelationLink.param2(link,target); | ||
10194 | } | ||
10195 | /** | ||
10196 | * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) | ||
10197 | */ | ||
10198 | private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( | ||
10199 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10200 | source: DefinedElement, target:DefinedElement) | ||
10201 | { | ||
10202 | find interpretation(problem,interpretation); | ||
10203 | // The two endpoint of the link have to exist | ||
10204 | find mayExist(problem, interpretation, source); | ||
10205 | find mayExist(problem, interpretation, target); | ||
10206 | // Type consistency | ||
10207 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); | ||
10208 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
10209 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
10210 | // the upper bound of the opposite reference multiplicity should be considered. | ||
10211 | numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); | ||
10212 | check(numberOfExistingOppositeReferences < 1); | ||
10213 | // The reference is containment, then a new reference cannot be create if: | ||
10214 | // 1. Multiple parents | ||
10215 | neg find mustContains4(problem,interpretation,_,target); | ||
10216 | // 2. Circle in the containment hierarchy | ||
10217 | neg find mustTransitiveContains(source,target); | ||
10218 | } or { | ||
10219 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); | ||
10220 | } | ||
10221 | /** | ||
10222 | * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) | ||
10223 | */ | ||
10224 | private pattern mustInRelationterminator_reference_FunctionalData( | ||
10225 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10226 | source: DefinedElement, target:DefinedElement) | ||
10227 | { | ||
10228 | find interpretation(problem,interpretation); | ||
10229 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
10230 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); | ||
10231 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
10232 | BinaryElementRelationLink.param1(link,source); | ||
10233 | BinaryElementRelationLink.param2(link,target); | ||
10234 | } | ||
10235 | /** | ||
10236 | * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) | ||
10237 | */ | ||
10238 | private pattern mayInRelationterminator_reference_FunctionalData( | ||
10239 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10240 | source: DefinedElement, target:DefinedElement) | ||
10241 | { | ||
10242 | find interpretation(problem,interpretation); | ||
10243 | // The two endpoint of the link have to exist | ||
10244 | find mayExist(problem, interpretation, source); | ||
10245 | find mayExist(problem, interpretation, target); | ||
10246 | // Type consistency | ||
10247 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
10248 | find mayInstanceOfFAMTerminator_class(problem,interpretation,target); | ||
10249 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
10250 | // the upper bound of the multiplicity should be considered. | ||
10251 | numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); | ||
10252 | check(numberOfExistingReferences < 1); | ||
10253 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
10254 | // the upper bound of the opposite reference multiplicity should be considered. | ||
10255 | numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); | ||
10256 | check(numberOfExistingOppositeReferences < 1); | ||
10257 | // The reference is containment, then a new reference cannot be create if: | ||
10258 | // 1. Multiple parents | ||
10259 | neg find mustContains4(problem,interpretation,_,target); | ||
10260 | // 2. Circle in the containment hierarchy | ||
10261 | neg find mustTransitiveContains(source,target); | ||
10262 | } or { | ||
10263 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); | ||
10264 | } | ||
10265 | /** | ||
10266 | * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) | ||
10267 | */ | ||
10268 | private pattern mustInRelationinterface_reference_FunctionalData( | ||
10269 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10270 | source: DefinedElement, target:DefinedElement) | ||
10271 | { | ||
10272 | find interpretation(problem,interpretation); | ||
10273 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
10274 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); | ||
10275 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
10276 | BinaryElementRelationLink.param1(link,source); | ||
10277 | BinaryElementRelationLink.param2(link,target); | ||
10278 | } | ||
10279 | /** | ||
10280 | * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) | ||
10281 | */ | ||
10282 | private pattern mayInRelationinterface_reference_FunctionalData( | ||
10283 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10284 | source: DefinedElement, target:DefinedElement) | ||
10285 | { | ||
10286 | find interpretation(problem,interpretation); | ||
10287 | // The two endpoint of the link have to exist | ||
10288 | find mayExist(problem, interpretation, source); | ||
10289 | find mayExist(problem, interpretation, target); | ||
10290 | // Type consistency | ||
10291 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
10292 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
10293 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
10294 | // the upper bound of the multiplicity should be considered. | ||
10295 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); | ||
10296 | check(numberOfExistingReferences < 1); | ||
10297 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
10298 | // 1. Multiple parents | ||
10299 | neg find mustContains4(problem,interpretation,source,_); | ||
10300 | // 2. Circle in the containment hierarchy | ||
10301 | neg find mustTransitiveContains(source,target); | ||
10302 | } or { | ||
10303 | find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); | ||
10304 | } | ||
10305 | /** | ||
10306 | * Matcher for detecting tuples t where []type attribute Function(source,target) | ||
10307 | */ | ||
10308 | private pattern mustInRelationtype_attribute_Function( | ||
10309 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10310 | source: DefinedElement, target:DefinedElement) | ||
10311 | { | ||
10312 | find interpretation(problem,interpretation); | ||
10313 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
10314 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
10315 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
10316 | BinaryElementRelationLink.param1(link,source); | ||
10317 | BinaryElementRelationLink.param2(link,target); | ||
10318 | } | ||
10319 | /** | ||
10320 | * Matcher for detecting tuples t where <>type attribute Function(source,target) | ||
10321 | */ | ||
10322 | private pattern mayInRelationtype_attribute_Function( | ||
10323 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10324 | source: DefinedElement, target:DefinedElement) | ||
10325 | { | ||
10326 | find interpretation(problem,interpretation); | ||
10327 | // The two endpoint of the link have to exist | ||
10328 | find mayExist(problem, interpretation, source); | ||
10329 | find mayExist(problem, interpretation, target); | ||
10330 | // Type consistency | ||
10331 | find mayInstanceOfFunction_class(problem,interpretation,source); | ||
10332 | find mayInstanceOfFunctionType_enum(problem,interpretation,target); | ||
10333 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
10334 | // the upper bound of the multiplicity should be considered. | ||
10335 | numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_); | ||
10336 | check(numberOfExistingReferences < 1); | ||
10337 | } or { | ||
10338 | find mustInRelationtype_attribute_Function(problem,interpretation,source,target); | ||
10339 | } | ||
10340 | |||
10341 | ////////// | ||
10342 | // 1.3 Relation Definition Indexers | ||
10343 | ////////// | ||
10344 | |||
10345 | ////////// | ||
10346 | // 1.4 Containment Indexer | ||
10347 | ////////// | ||
10348 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
10349 | find mustContains4(_,_,source,target); | ||
10350 | } | ||
10351 | |||
10352 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
10353 | source: DefinedElement, target: DefinedElement) | ||
10354 | { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or | ||
10355 | |||
10356 | { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or | ||
10357 | |||
10358 | { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or | ||
10359 | |||
10360 | { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or | ||
10361 | |||
10362 | { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or | ||
10363 | |||
10364 | { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } | ||
10365 | |||
10366 | private pattern mustTransitiveContains(source,target) { | ||
10367 | find mustContains2+(source,target); | ||
10368 | } | ||
10369 | |||
10370 | ////////// | ||
10371 | // 2. Invalidation Indexers | ||
10372 | ////////// | ||
10373 | // 2.1 Invalidated by WF Queries | ||
10374 | ////////// | ||
10375 | |||
10376 | ////////// | ||
10377 | // 3. Unfinishedness Indexers | ||
10378 | ////////// | ||
10379 | // 3.1 Unfinishedness Measured by Multiplicity | ||
10380 | ////////// | ||
10381 | pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
10382 | find interpretation(problem,interpretation); | ||
10383 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
10384 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
10385 | find mustInstanceOfFunctionalElement_class(problem,interpretation,object); | ||
10386 | numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_); | ||
10387 | check(numberOfExistingReferences < 1); | ||
10388 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
10389 | } | ||
10390 | pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
10391 | find interpretation(problem,interpretation); | ||
10392 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
10393 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
10394 | find mustInstanceOfInformationLink_class(problem,interpretation,object); | ||
10395 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); | ||
10396 | check(numberOfExistingReferences < 1); | ||
10397 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
10398 | } | ||
10399 | pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
10400 | find interpretation(problem,interpretation); | ||
10401 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
10402 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
10403 | find mustInstanceOfFunction_class(problem,interpretation,object); | ||
10404 | numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_); | ||
10405 | check(numberOfExistingReferences < 1); | ||
10406 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
10407 | } | ||
10408 | |||
10409 | ////////// | ||
10410 | // 3.2 Unfinishedness Measured by WF Queries | ||
10411 | ////////// | ||
10412 | |||
10413 | ////////// | ||
10414 | // 4. Refinement Indexers | ||
10415 | ////////// | ||
10416 | // 4.1 Object constructors | ||
10417 | ////////// | ||
10418 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
10419 | { | ||
10420 | find interpretation(problem,interpretation); | ||
10421 | find mustInstanceOfFAMTerminator_class(problem,interpretation,root); | ||
10422 | find mustExist(problem, interpretation, root); | ||
10423 | }or{ | ||
10424 | find interpretation(problem,interpretation); | ||
10425 | find mustInstanceOfFunction_class(problem,interpretation,root); | ||
10426 | find mustExist(problem, interpretation, root); | ||
10427 | }or{ | ||
10428 | find interpretation(problem,interpretation); | ||
10429 | find mustInstanceOfFunctionalData_class(problem,interpretation,root); | ||
10430 | find mustExist(problem, interpretation, root); | ||
10431 | }or{ | ||
10432 | find interpretation(problem,interpretation); | ||
10433 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); | ||
10434 | find mustExist(problem, interpretation, root); | ||
10435 | }or{ | ||
10436 | find interpretation(problem,interpretation); | ||
10437 | find mustInstanceOfInformationLink_class(problem,interpretation,root); | ||
10438 | find mustExist(problem, interpretation, root); | ||
10439 | }or{ | ||
10440 | find interpretation(problem,interpretation); | ||
10441 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); | ||
10442 | find mustExist(problem, interpretation, root); | ||
10443 | }or{ | ||
10444 | find interpretation(problem,interpretation); | ||
10445 | find mustInstanceOfFunctionalElement_class(problem,interpretation,root); | ||
10446 | find mustExist(problem, interpretation, root); | ||
10447 | }or{ | ||
10448 | find interpretation(problem,interpretation); | ||
10449 | find mustInstanceOfFunctionalInput_class(problem,interpretation,root); | ||
10450 | find mustExist(problem, interpretation, root); | ||
10451 | }or{ | ||
10452 | find interpretation(problem,interpretation); | ||
10453 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); | ||
10454 | find mustExist(problem, interpretation, root); | ||
10455 | }or{ | ||
10456 | find interpretation(problem,interpretation); | ||
10457 | find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); | ||
10458 | find mustExist(problem, interpretation, root); | ||
10459 | }or{ | ||
10460 | find interpretation(problem,interpretation); | ||
10461 | find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); | ||
10462 | find mustExist(problem, interpretation, root); | ||
10463 | } | ||
10464 | pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( | ||
10465 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10466 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
10467 | container:DefinedElement) | ||
10468 | { | ||
10469 | find interpretation(problem,interpretation); | ||
10470 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
10471 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
10472 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
10473 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); | ||
10474 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
10475 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); | ||
10476 | find mustInstanceOfFunctionalElement_class(problem,interpretation,container); | ||
10477 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
10478 | find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); | ||
10479 | find mustExist(problem, interpretation, container); | ||
10480 | neg find mustExist(problem, interpretation, newObject); | ||
10481 | } | ||
10482 | pattern createObject_FunctionalInterface_class( | ||
10483 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10484 | typeInterpretation:PartialComplexTypeInterpretation) | ||
10485 | { | ||
10486 | find interpretation(problem,interpretation); | ||
10487 | neg find hasElementInContainment(problem,interpretation); | ||
10488 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
10489 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
10490 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
10491 | find mayExist(problem, interpretation, newObject); | ||
10492 | neg find mustExist(problem, interpretation, newObject); | ||
10493 | } | ||
10494 | pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
10495 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10496 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
10497 | container:DefinedElement) | ||
10498 | { | ||
10499 | find interpretation(problem,interpretation); | ||
10500 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
10501 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
10502 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
10503 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
10504 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
10505 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
10506 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
10507 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
10508 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
10509 | find mustExist(problem, interpretation, container); | ||
10510 | neg find mustExist(problem, interpretation, newObject); | ||
10511 | } | ||
10512 | pattern createObject_FunctionalInput_class( | ||
10513 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10514 | typeInterpretation:PartialComplexTypeInterpretation) | ||
10515 | { | ||
10516 | find interpretation(problem,interpretation); | ||
10517 | neg find hasElementInContainment(problem,interpretation); | ||
10518 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
10519 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
10520 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
10521 | find mayExist(problem, interpretation, newObject); | ||
10522 | neg find mustExist(problem, interpretation, newObject); | ||
10523 | } | ||
10524 | pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( | ||
10525 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10526 | typeInterpretation:PartialComplexTypeInterpretation) | ||
10527 | { | ||
10528 | find interpretation(problem,interpretation); | ||
10529 | neg find hasElementInContainment(problem,interpretation); | ||
10530 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
10531 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); | ||
10532 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); | ||
10533 | find mayExist(problem, interpretation, newObject); | ||
10534 | neg find mustExist(problem, interpretation, newObject); | ||
10535 | } | ||
10536 | pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( | ||
10537 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10538 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
10539 | container:DefinedElement) | ||
10540 | { | ||
10541 | find interpretation(problem,interpretation); | ||
10542 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
10543 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
10544 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
10545 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); | ||
10546 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
10547 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); | ||
10548 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); | ||
10549 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
10550 | find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); | ||
10551 | find mustExist(problem, interpretation, container); | ||
10552 | neg find mustExist(problem, interpretation, newObject); | ||
10553 | } | ||
10554 | pattern createObject_InformationLink_class( | ||
10555 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10556 | typeInterpretation:PartialComplexTypeInterpretation) | ||
10557 | { | ||
10558 | find interpretation(problem,interpretation); | ||
10559 | neg find hasElementInContainment(problem,interpretation); | ||
10560 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
10561 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
10562 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
10563 | find mayExist(problem, interpretation, newObject); | ||
10564 | neg find mustExist(problem, interpretation, newObject); | ||
10565 | } | ||
10566 | pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
10567 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10568 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
10569 | container:DefinedElement) | ||
10570 | { | ||
10571 | find interpretation(problem,interpretation); | ||
10572 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
10573 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
10574 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
10575 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
10576 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
10577 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
10578 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
10579 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
10580 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
10581 | find mustExist(problem, interpretation, container); | ||
10582 | neg find mustExist(problem, interpretation, newObject); | ||
10583 | } | ||
10584 | pattern createObject_FunctionalOutput_class( | ||
10585 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10586 | typeInterpretation:PartialComplexTypeInterpretation) | ||
10587 | { | ||
10588 | find interpretation(problem,interpretation); | ||
10589 | neg find hasElementInContainment(problem,interpretation); | ||
10590 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
10591 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
10592 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
10593 | find mayExist(problem, interpretation, newObject); | ||
10594 | neg find mustExist(problem, interpretation, newObject); | ||
10595 | } | ||
10596 | pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( | ||
10597 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10598 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
10599 | container:DefinedElement) | ||
10600 | { | ||
10601 | find interpretation(problem,interpretation); | ||
10602 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
10603 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
10604 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
10605 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
10606 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); | ||
10607 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
10608 | find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); | ||
10609 | find mustExist(problem, interpretation, container); | ||
10610 | neg find mustExist(problem, interpretation, newObject); | ||
10611 | } | ||
10612 | pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( | ||
10613 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10614 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
10615 | container:DefinedElement) | ||
10616 | { | ||
10617 | find interpretation(problem,interpretation); | ||
10618 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
10619 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
10620 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
10621 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); | ||
10622 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
10623 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); | ||
10624 | find mustInstanceOfFunction_class(problem,interpretation,container); | ||
10625 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
10626 | find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); | ||
10627 | find mustExist(problem, interpretation, container); | ||
10628 | neg find mustExist(problem, interpretation, newObject); | ||
10629 | } | ||
10630 | pattern createObject_Function_class( | ||
10631 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10632 | typeInterpretation:PartialComplexTypeInterpretation) | ||
10633 | { | ||
10634 | find interpretation(problem,interpretation); | ||
10635 | neg find hasElementInContainment(problem,interpretation); | ||
10636 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
10637 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
10638 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
10639 | find mayExist(problem, interpretation, newObject); | ||
10640 | neg find mustExist(problem, interpretation, newObject); | ||
10641 | } | ||
10642 | pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( | ||
10643 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10644 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
10645 | container:DefinedElement) | ||
10646 | { | ||
10647 | find interpretation(problem,interpretation); | ||
10648 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
10649 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
10650 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
10651 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); | ||
10652 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
10653 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); | ||
10654 | find mustInstanceOfFunctionalData_class(problem,interpretation,container); | ||
10655 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
10656 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); | ||
10657 | find mustExist(problem, interpretation, container); | ||
10658 | neg find mustExist(problem, interpretation, newObject); | ||
10659 | } | ||
10660 | pattern createObject_FAMTerminator_class( | ||
10661 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10662 | typeInterpretation:PartialComplexTypeInterpretation) | ||
10663 | { | ||
10664 | find interpretation(problem,interpretation); | ||
10665 | neg find hasElementInContainment(problem,interpretation); | ||
10666 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
10667 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
10668 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
10669 | find mayExist(problem, interpretation, newObject); | ||
10670 | neg find mustExist(problem, interpretation, newObject); | ||
10671 | } | ||
10672 | |||
10673 | ////////// | ||
10674 | // 4.2 Type refinement | ||
10675 | ////////// | ||
10676 | pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
10677 | find interpretation(problem,interpretation); | ||
10678 | PartialInterpretation.newElements(interpretation,element); | ||
10679 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
10680 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
10681 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
10682 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
10683 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
10684 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
10685 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
10686 | } | ||
10687 | pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
10688 | find interpretation(problem,interpretation); | ||
10689 | PartialInterpretation.newElements(interpretation,element); | ||
10690 | find mayInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
10691 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
10692 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
10693 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
10694 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
10695 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
10696 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
10697 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
10698 | } | ||
10699 | pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
10700 | find interpretation(problem,interpretation); | ||
10701 | PartialInterpretation.newElements(interpretation,element); | ||
10702 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
10703 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
10704 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
10705 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
10706 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
10707 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
10708 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
10709 | } | ||
10710 | pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
10711 | find interpretation(problem,interpretation); | ||
10712 | PartialInterpretation.newElements(interpretation,element); | ||
10713 | find mayInstanceOfInformationLink_class(problem,interpretation,element); | ||
10714 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
10715 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
10716 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
10717 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
10718 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
10719 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
10720 | } | ||
10721 | pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
10722 | find interpretation(problem,interpretation); | ||
10723 | PartialInterpretation.newElements(interpretation,element); | ||
10724 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
10725 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
10726 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
10727 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
10728 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
10729 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
10730 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
10731 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
10732 | } | ||
10733 | pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
10734 | find interpretation(problem,interpretation); | ||
10735 | PartialInterpretation.newElements(interpretation,element); | ||
10736 | find mayInstanceOfFunction_class(problem,interpretation,element); | ||
10737 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
10738 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
10739 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
10740 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
10741 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
10742 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
10743 | } | ||
10744 | pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
10745 | find interpretation(problem,interpretation); | ||
10746 | PartialInterpretation.newElements(interpretation,element); | ||
10747 | find mayInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
10748 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
10749 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
10750 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
10751 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
10752 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
10753 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
10754 | } | ||
10755 | |||
10756 | ////////// | ||
10757 | // 4.3 Relation refinement | ||
10758 | ////////// | ||
10759 | pattern refineRelation_model_reference_FunctionalElement( | ||
10760 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10761 | relationIterpretation:PartialRelationInterpretation, | ||
10762 | from: DefinedElement, to: DefinedElement) | ||
10763 | { | ||
10764 | find interpretation(problem,interpretation); | ||
10765 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
10766 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
10767 | find mustExist(problem, interpretation, from); | ||
10768 | find mustExist(problem, interpretation, to); | ||
10769 | find mustInstanceOfFunctionalElement_class(problem,interpretation,from); | ||
10770 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); | ||
10771 | find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
10772 | neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
10773 | } | ||
10774 | pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( | ||
10775 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10776 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
10777 | from: DefinedElement, to: DefinedElement) | ||
10778 | { | ||
10779 | find interpretation(problem,interpretation); | ||
10780 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
10781 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
10782 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
10783 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); | ||
10784 | find mustExist(problem, interpretation, from); | ||
10785 | find mustExist(problem, interpretation, to); | ||
10786 | find mustInstanceOfFunctionalInput_class(problem,interpretation,from); | ||
10787 | find mustInstanceOfInformationLink_class(problem,interpretation,to); | ||
10788 | find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
10789 | neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
10790 | } | ||
10791 | pattern refineRelation_type_attribute_Function( | ||
10792 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10793 | relationIterpretation:PartialRelationInterpretation, | ||
10794 | from: DefinedElement, to: DefinedElement) | ||
10795 | { | ||
10796 | find interpretation(problem,interpretation); | ||
10797 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
10798 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
10799 | find mustExist(problem, interpretation, from); | ||
10800 | find mustExist(problem, interpretation, to); | ||
10801 | find mustInstanceOfFunction_class(problem,interpretation,from); | ||
10802 | find mustInstanceOfFunctionType_enum(problem,interpretation,to); | ||
10803 | find mayInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
10804 | neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
10805 | } | ||
10806 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
10807 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
10808 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
10809 | |||
10810 | ////////// | ||
10811 | // 0. Util | ||
10812 | ////////// | ||
10813 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
10814 | PartialInterpretation.problem(interpretation,problem); | ||
10815 | } | ||
10816 | |||
10817 | ///////////////////////// | ||
10818 | // 0.1 Existence | ||
10819 | ///////////////////////// | ||
10820 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
10821 | find interpretation(problem,interpretation); | ||
10822 | LogicProblem.elements(problem,element); | ||
10823 | } or { | ||
10824 | find interpretation(problem,interpretation); | ||
10825 | PartialInterpretation.newElements(interpretation,element); | ||
10826 | } | ||
10827 | |||
10828 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
10829 | find mustExist(problem,interpretation,element); | ||
10830 | } or { | ||
10831 | find interpretation(problem,interpretation); | ||
10832 | neg find elementCloseWorld(element); | ||
10833 | PartialInterpretation.openWorldElements(interpretation,element); | ||
10834 | } | ||
10835 | |||
10836 | private pattern elementCloseWorld(element:DefinedElement) { | ||
10837 | PartialInterpretation.openWorldElements(i,element); | ||
10838 | PartialInterpretation.maxNewElements(i,0); | ||
10839 | } or { | ||
10840 | Scope.targetTypeInterpretation(scope,interpretation); | ||
10841 | PartialTypeInterpratation.elements(interpretation,element); | ||
10842 | Scope.maxNewElements(scope,0); | ||
10843 | } | ||
10844 | |||
10845 | //////////////////////// | ||
10846 | // 0.2 Equivalence | ||
10847 | //////////////////////// | ||
10848 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
10849 | find mayExist(problem,interpretation,a); | ||
10850 | find mayExist(problem,interpretation,b); | ||
10851 | a == b; | ||
10852 | } | ||
10853 | |||
10854 | //////////////////////// | ||
10855 | // 0.3 Required Patterns by TypeIndexer | ||
10856 | //////////////////////// | ||
10857 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
10858 | find interpretation(problem,interpretation); | ||
10859 | LogicProblem.types(problem,type); | ||
10860 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
10861 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
10862 | } | ||
10863 | |||
10864 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
10865 | find interpretation(problem,interpretation); | ||
10866 | LogicProblem.types(problem,type); | ||
10867 | TypeDefinition.elements(type,element); | ||
10868 | } or { | ||
10869 | find interpretation(problem,interpretation); | ||
10870 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
10871 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
10872 | } | ||
10873 | |||
10874 | private pattern isPrimitive(element: PrimitiveElement) { | ||
10875 | PrimitiveElement(element); | ||
10876 | } | ||
10877 | |||
10878 | ////////// | ||
10879 | // 1. Problem-Specific Base Indexers | ||
10880 | ////////// | ||
10881 | // 1.1 Type Indexers | ||
10882 | ////////// | ||
10883 | // 1.1.1 primitive Type Indexers | ||
10884 | ////////// | ||
10885 | |||
10886 | ////////// | ||
10887 | // 1.1.2 domain-specific Type Indexers | ||
10888 | ////////// | ||
10889 | /** | ||
10890 | * An element must be an instance of type "FunctionalElement class". | ||
10891 | */ | ||
10892 | private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
10893 | Type.name(type,"FunctionalElement class"); | ||
10894 | find directInstanceOf(problem,interpretation,element,type); | ||
10895 | } | ||
10896 | private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
10897 | find interpretation(problem,interpretation); | ||
10898 | PartialInterpretation.scopes(interpretation,scope); | ||
10899 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
10900 | Scope.maxNewElements(scope,0); | ||
10901 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
10902 | Type.name(type,"FunctionalElement class"); | ||
10903 | } | ||
10904 | |||
10905 | /** | ||
10906 | * An element may be an instance of type "FunctionalElement class". | ||
10907 | */ | ||
10908 | private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
10909 | { | ||
10910 | find interpretation(problem,interpretation); | ||
10911 | PartialInterpretation.newElements(interpretation,element); | ||
10912 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
10913 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
10914 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
10915 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
10916 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
10917 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
10918 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
10919 | neg find isPrimitive(element); | ||
10920 | } or { | ||
10921 | find interpretation(problem,interpretation); | ||
10922 | PartialInterpretation.openWorldElements(interpretation,element); | ||
10923 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
10924 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
10925 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
10926 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
10927 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
10928 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
10929 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
10930 | neg find isPrimitive(element); | ||
10931 | } or | ||
10932 | { find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } | ||
10933 | /** | ||
10934 | * An element must be an instance of type "FunctionalArchitectureModel class". | ||
10935 | */ | ||
10936 | private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
10937 | Type.name(type,"FunctionalArchitectureModel class"); | ||
10938 | find directInstanceOf(problem,interpretation,element,type); | ||
10939 | } | ||
10940 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
10941 | find interpretation(problem,interpretation); | ||
10942 | PartialInterpretation.scopes(interpretation,scope); | ||
10943 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
10944 | Scope.maxNewElements(scope,0); | ||
10945 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
10946 | Type.name(type,"FunctionalArchitectureModel class"); | ||
10947 | } | ||
10948 | |||
10949 | /** | ||
10950 | * An element may be an instance of type "FunctionalArchitectureModel class". | ||
10951 | */ | ||
10952 | private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
10953 | { | ||
10954 | find interpretation(problem,interpretation); | ||
10955 | PartialInterpretation.newElements(interpretation,element); | ||
10956 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
10957 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
10958 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
10959 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
10960 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
10961 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
10962 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
10963 | neg find isPrimitive(element); | ||
10964 | } or { | ||
10965 | find interpretation(problem,interpretation); | ||
10966 | PartialInterpretation.openWorldElements(interpretation,element); | ||
10967 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
10968 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
10969 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
10970 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
10971 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
10972 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
10973 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
10974 | neg find isPrimitive(element); | ||
10975 | } or | ||
10976 | { find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } | ||
10977 | /** | ||
10978 | * An element must be an instance of type "Function class". | ||
10979 | */ | ||
10980 | private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
10981 | Type.name(type,"Function class"); | ||
10982 | find directInstanceOf(problem,interpretation,element,type); | ||
10983 | } | ||
10984 | private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
10985 | find interpretation(problem,interpretation); | ||
10986 | PartialInterpretation.scopes(interpretation,scope); | ||
10987 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
10988 | Scope.maxNewElements(scope,0); | ||
10989 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
10990 | Type.name(type,"Function class"); | ||
10991 | } | ||
10992 | |||
10993 | /** | ||
10994 | * An element may be an instance of type "Function class". | ||
10995 | */ | ||
10996 | private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
10997 | { | ||
10998 | find interpretation(problem,interpretation); | ||
10999 | PartialInterpretation.newElements(interpretation,element); | ||
11000 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
11001 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
11002 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
11003 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
11004 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
11005 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
11006 | neg find isPrimitive(element); | ||
11007 | } or { | ||
11008 | find interpretation(problem,interpretation); | ||
11009 | PartialInterpretation.openWorldElements(interpretation,element); | ||
11010 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
11011 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
11012 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
11013 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
11014 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
11015 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
11016 | neg find isPrimitive(element); | ||
11017 | } or | ||
11018 | { find mustInstanceOfFunction_class(problem,interpretation,element); } | ||
11019 | /** | ||
11020 | * An element must be an instance of type "FAMTerminator class". | ||
11021 | */ | ||
11022 | private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
11023 | Type.name(type,"FAMTerminator class"); | ||
11024 | find directInstanceOf(problem,interpretation,element,type); | ||
11025 | } | ||
11026 | private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
11027 | find interpretation(problem,interpretation); | ||
11028 | PartialInterpretation.scopes(interpretation,scope); | ||
11029 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
11030 | Scope.maxNewElements(scope,0); | ||
11031 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
11032 | Type.name(type,"FAMTerminator class"); | ||
11033 | } | ||
11034 | |||
11035 | /** | ||
11036 | * An element may be an instance of type "FAMTerminator class". | ||
11037 | */ | ||
11038 | private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
11039 | { | ||
11040 | find interpretation(problem,interpretation); | ||
11041 | PartialInterpretation.newElements(interpretation,element); | ||
11042 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
11043 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
11044 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
11045 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
11046 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
11047 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
11048 | neg find isPrimitive(element); | ||
11049 | } or { | ||
11050 | find interpretation(problem,interpretation); | ||
11051 | PartialInterpretation.openWorldElements(interpretation,element); | ||
11052 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
11053 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
11054 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
11055 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
11056 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
11057 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
11058 | neg find isPrimitive(element); | ||
11059 | } or | ||
11060 | { find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } | ||
11061 | /** | ||
11062 | * An element must be an instance of type "InformationLink class". | ||
11063 | */ | ||
11064 | private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
11065 | Type.name(type,"InformationLink class"); | ||
11066 | find directInstanceOf(problem,interpretation,element,type); | ||
11067 | } | ||
11068 | private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
11069 | find interpretation(problem,interpretation); | ||
11070 | PartialInterpretation.scopes(interpretation,scope); | ||
11071 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
11072 | Scope.maxNewElements(scope,0); | ||
11073 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
11074 | Type.name(type,"InformationLink class"); | ||
11075 | } | ||
11076 | |||
11077 | /** | ||
11078 | * An element may be an instance of type "InformationLink class". | ||
11079 | */ | ||
11080 | private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
11081 | { | ||
11082 | find interpretation(problem,interpretation); | ||
11083 | PartialInterpretation.newElements(interpretation,element); | ||
11084 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
11085 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
11086 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
11087 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
11088 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
11089 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
11090 | neg find isPrimitive(element); | ||
11091 | } or { | ||
11092 | find interpretation(problem,interpretation); | ||
11093 | PartialInterpretation.openWorldElements(interpretation,element); | ||
11094 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
11095 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
11096 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
11097 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
11098 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
11099 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
11100 | neg find isPrimitive(element); | ||
11101 | } or | ||
11102 | { find mustInstanceOfInformationLink_class(problem,interpretation,element); } | ||
11103 | /** | ||
11104 | * An element must be an instance of type "FunctionalInterface class". | ||
11105 | */ | ||
11106 | private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
11107 | Type.name(type,"FunctionalInterface class"); | ||
11108 | find directInstanceOf(problem,interpretation,element,type); | ||
11109 | } | ||
11110 | private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
11111 | find interpretation(problem,interpretation); | ||
11112 | PartialInterpretation.scopes(interpretation,scope); | ||
11113 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
11114 | Scope.maxNewElements(scope,0); | ||
11115 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
11116 | Type.name(type,"FunctionalInterface class"); | ||
11117 | } | ||
11118 | |||
11119 | /** | ||
11120 | * An element may be an instance of type "FunctionalInterface class". | ||
11121 | */ | ||
11122 | private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
11123 | { | ||
11124 | find interpretation(problem,interpretation); | ||
11125 | PartialInterpretation.newElements(interpretation,element); | ||
11126 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
11127 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
11128 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
11129 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
11130 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
11131 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
11132 | neg find isPrimitive(element); | ||
11133 | } or { | ||
11134 | find interpretation(problem,interpretation); | ||
11135 | PartialInterpretation.openWorldElements(interpretation,element); | ||
11136 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
11137 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
11138 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
11139 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
11140 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
11141 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
11142 | neg find isPrimitive(element); | ||
11143 | } or | ||
11144 | { find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } | ||
11145 | /** | ||
11146 | * An element must be an instance of type "FunctionalInput class". | ||
11147 | */ | ||
11148 | private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
11149 | Type.name(type,"FunctionalInput class"); | ||
11150 | find directInstanceOf(problem,interpretation,element,type); | ||
11151 | } | ||
11152 | private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
11153 | find interpretation(problem,interpretation); | ||
11154 | PartialInterpretation.scopes(interpretation,scope); | ||
11155 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
11156 | Scope.maxNewElements(scope,0); | ||
11157 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
11158 | Type.name(type,"FunctionalInput class"); | ||
11159 | } | ||
11160 | |||
11161 | /** | ||
11162 | * An element may be an instance of type "FunctionalInput class". | ||
11163 | */ | ||
11164 | private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
11165 | { | ||
11166 | find interpretation(problem,interpretation); | ||
11167 | PartialInterpretation.newElements(interpretation,element); | ||
11168 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
11169 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
11170 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
11171 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
11172 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
11173 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
11174 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
11175 | neg find isPrimitive(element); | ||
11176 | } or { | ||
11177 | find interpretation(problem,interpretation); | ||
11178 | PartialInterpretation.openWorldElements(interpretation,element); | ||
11179 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
11180 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
11181 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
11182 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
11183 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
11184 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
11185 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
11186 | neg find isPrimitive(element); | ||
11187 | } or | ||
11188 | { find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } | ||
11189 | /** | ||
11190 | * An element must be an instance of type "FunctionalOutput class". | ||
11191 | */ | ||
11192 | private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
11193 | Type.name(type,"FunctionalOutput class"); | ||
11194 | find directInstanceOf(problem,interpretation,element,type); | ||
11195 | } | ||
11196 | private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
11197 | find interpretation(problem,interpretation); | ||
11198 | PartialInterpretation.scopes(interpretation,scope); | ||
11199 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
11200 | Scope.maxNewElements(scope,0); | ||
11201 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
11202 | Type.name(type,"FunctionalOutput class"); | ||
11203 | } | ||
11204 | |||
11205 | /** | ||
11206 | * An element may be an instance of type "FunctionalOutput class". | ||
11207 | */ | ||
11208 | private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
11209 | { | ||
11210 | find interpretation(problem,interpretation); | ||
11211 | PartialInterpretation.newElements(interpretation,element); | ||
11212 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
11213 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
11214 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
11215 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
11216 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
11217 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
11218 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
11219 | neg find isPrimitive(element); | ||
11220 | } or { | ||
11221 | find interpretation(problem,interpretation); | ||
11222 | PartialInterpretation.openWorldElements(interpretation,element); | ||
11223 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
11224 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
11225 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
11226 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
11227 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
11228 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
11229 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
11230 | neg find isPrimitive(element); | ||
11231 | } or | ||
11232 | { find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } | ||
11233 | /** | ||
11234 | * An element must be an instance of type "FunctionalData class". | ||
11235 | */ | ||
11236 | private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
11237 | Type.name(type,"FunctionalData class"); | ||
11238 | find directInstanceOf(problem,interpretation,element,type); | ||
11239 | } | ||
11240 | private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
11241 | find interpretation(problem,interpretation); | ||
11242 | PartialInterpretation.scopes(interpretation,scope); | ||
11243 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
11244 | Scope.maxNewElements(scope,0); | ||
11245 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
11246 | Type.name(type,"FunctionalData class"); | ||
11247 | } | ||
11248 | |||
11249 | /** | ||
11250 | * An element may be an instance of type "FunctionalData class". | ||
11251 | */ | ||
11252 | private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
11253 | { | ||
11254 | find interpretation(problem,interpretation); | ||
11255 | PartialInterpretation.newElements(interpretation,element); | ||
11256 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
11257 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
11258 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
11259 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
11260 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
11261 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
11262 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
11263 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
11264 | neg find isPrimitive(element); | ||
11265 | } or { | ||
11266 | find interpretation(problem,interpretation); | ||
11267 | PartialInterpretation.openWorldElements(interpretation,element); | ||
11268 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
11269 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
11270 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
11271 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
11272 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
11273 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
11274 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
11275 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
11276 | neg find isPrimitive(element); | ||
11277 | } or | ||
11278 | { find mustInstanceOfFunctionalData_class(problem,interpretation,element); } | ||
11279 | /** | ||
11280 | * An element must be an instance of type "FunctionType enum". | ||
11281 | */ | ||
11282 | private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
11283 | Type.name(type,"FunctionType enum"); | ||
11284 | find directInstanceOf(problem,interpretation,element,type); | ||
11285 | } | ||
11286 | private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
11287 | find interpretation(problem,interpretation); | ||
11288 | PartialInterpretation.scopes(interpretation,scope); | ||
11289 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
11290 | Scope.maxNewElements(scope,0); | ||
11291 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
11292 | Type.name(type,"FunctionType enum"); | ||
11293 | } | ||
11294 | |||
11295 | /** | ||
11296 | * An element may be an instance of type "FunctionType enum". | ||
11297 | */ | ||
11298 | private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
11299 | { find mustInstanceOfFunctionType_enum(problem,interpretation,element); } | ||
11300 | /** | ||
11301 | * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
11302 | */ | ||
11303 | private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
11304 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
11305 | find directInstanceOf(problem,interpretation,element,type); | ||
11306 | } | ||
11307 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
11308 | find interpretation(problem,interpretation); | ||
11309 | PartialInterpretation.scopes(interpretation,scope); | ||
11310 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
11311 | Scope.maxNewElements(scope,0); | ||
11312 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
11313 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
11314 | } | ||
11315 | |||
11316 | /** | ||
11317 | * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
11318 | */ | ||
11319 | private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
11320 | { find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } | ||
11321 | /** | ||
11322 | * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
11323 | */ | ||
11324 | private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
11325 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
11326 | find directInstanceOf(problem,interpretation,element,type); | ||
11327 | } | ||
11328 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
11329 | find interpretation(problem,interpretation); | ||
11330 | PartialInterpretation.scopes(interpretation,scope); | ||
11331 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
11332 | Scope.maxNewElements(scope,0); | ||
11333 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
11334 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
11335 | } | ||
11336 | |||
11337 | /** | ||
11338 | * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
11339 | */ | ||
11340 | private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
11341 | { | ||
11342 | find interpretation(problem,interpretation); | ||
11343 | PartialInterpretation.newElements(interpretation,element); | ||
11344 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
11345 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
11346 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
11347 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
11348 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
11349 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
11350 | neg find isPrimitive(element); | ||
11351 | } or { | ||
11352 | find interpretation(problem,interpretation); | ||
11353 | PartialInterpretation.openWorldElements(interpretation,element); | ||
11354 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
11355 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
11356 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
11357 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
11358 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
11359 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
11360 | neg find isPrimitive(element); | ||
11361 | } or | ||
11362 | { find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } | ||
11363 | |||
11364 | ////////// | ||
11365 | // 1.2 Relation Declaration Indexers | ||
11366 | ////////// | ||
11367 | /** | ||
11368 | * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) | ||
11369 | */ | ||
11370 | private pattern mustInRelationinterface_reference_FunctionalElement( | ||
11371 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11372 | source: DefinedElement, target:DefinedElement) | ||
11373 | { | ||
11374 | find interpretation(problem,interpretation); | ||
11375 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
11376 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); | ||
11377 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
11378 | BinaryElementRelationLink.param1(link,source); | ||
11379 | BinaryElementRelationLink.param2(link,target); | ||
11380 | } | ||
11381 | /** | ||
11382 | * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) | ||
11383 | */ | ||
11384 | private pattern mayInRelationinterface_reference_FunctionalElement( | ||
11385 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11386 | source: DefinedElement, target:DefinedElement) | ||
11387 | { | ||
11388 | find interpretation(problem,interpretation); | ||
11389 | // The two endpoint of the link have to exist | ||
11390 | find mayExist(problem, interpretation, source); | ||
11391 | find mayExist(problem, interpretation, target); | ||
11392 | // Type consistency | ||
11393 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
11394 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
11395 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
11396 | // the upper bound of the multiplicity should be considered. | ||
11397 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); | ||
11398 | check(numberOfExistingReferences < 1); | ||
11399 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
11400 | // the upper bound of the opposite reference multiplicity should be considered. | ||
11401 | numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); | ||
11402 | check(numberOfExistingOppositeReferences < 1); | ||
11403 | // The reference is containment, then a new reference cannot be create if: | ||
11404 | // 1. Multiple parents | ||
11405 | neg find mustContains4(problem,interpretation,_,target); | ||
11406 | // 2. Circle in the containment hierarchy | ||
11407 | neg find mustTransitiveContains(source,target); | ||
11408 | } or { | ||
11409 | find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); | ||
11410 | } | ||
11411 | /** | ||
11412 | * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) | ||
11413 | */ | ||
11414 | private pattern mustInRelationmodel_reference_FunctionalElement( | ||
11415 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11416 | source: DefinedElement, target:DefinedElement) | ||
11417 | { | ||
11418 | find interpretation(problem,interpretation); | ||
11419 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
11420 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
11421 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
11422 | BinaryElementRelationLink.param1(link,source); | ||
11423 | BinaryElementRelationLink.param2(link,target); | ||
11424 | } | ||
11425 | /** | ||
11426 | * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target) | ||
11427 | */ | ||
11428 | private pattern mayInRelationmodel_reference_FunctionalElement( | ||
11429 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11430 | source: DefinedElement, target:DefinedElement) | ||
11431 | { | ||
11432 | find interpretation(problem,interpretation); | ||
11433 | // The two endpoint of the link have to exist | ||
11434 | find mayExist(problem, interpretation, source); | ||
11435 | find mayExist(problem, interpretation, target); | ||
11436 | // Type consistency | ||
11437 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
11438 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target); | ||
11439 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
11440 | // the upper bound of the multiplicity should be considered. | ||
11441 | numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_); | ||
11442 | check(numberOfExistingReferences < 1); | ||
11443 | } or { | ||
11444 | find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target); | ||
11445 | } | ||
11446 | /** | ||
11447 | * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) | ||
11448 | */ | ||
11449 | private pattern mustInRelationparent_reference_FunctionalElement( | ||
11450 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11451 | source: DefinedElement, target:DefinedElement) | ||
11452 | { | ||
11453 | find interpretation(problem,interpretation); | ||
11454 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
11455 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); | ||
11456 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
11457 | BinaryElementRelationLink.param1(link,source); | ||
11458 | BinaryElementRelationLink.param2(link,target); | ||
11459 | } | ||
11460 | /** | ||
11461 | * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) | ||
11462 | */ | ||
11463 | private pattern mayInRelationparent_reference_FunctionalElement( | ||
11464 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11465 | source: DefinedElement, target:DefinedElement) | ||
11466 | { | ||
11467 | find interpretation(problem,interpretation); | ||
11468 | // The two endpoint of the link have to exist | ||
11469 | find mayExist(problem, interpretation, source); | ||
11470 | find mayExist(problem, interpretation, target); | ||
11471 | // Type consistency | ||
11472 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
11473 | find mayInstanceOfFunction_class(problem,interpretation,target); | ||
11474 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
11475 | // the upper bound of the multiplicity should be considered. | ||
11476 | numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); | ||
11477 | check(numberOfExistingReferences < 1); | ||
11478 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
11479 | // 1. Multiple parents | ||
11480 | neg find mustContains4(problem,interpretation,source,_); | ||
11481 | // 2. Circle in the containment hierarchy | ||
11482 | neg find mustTransitiveContains(source,target); | ||
11483 | } or { | ||
11484 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); | ||
11485 | } | ||
11486 | /** | ||
11487 | * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) | ||
11488 | */ | ||
11489 | private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( | ||
11490 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11491 | source: DefinedElement, target:DefinedElement) | ||
11492 | { | ||
11493 | find interpretation(problem,interpretation); | ||
11494 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
11495 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
11496 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
11497 | BinaryElementRelationLink.param1(link,source); | ||
11498 | BinaryElementRelationLink.param2(link,target); | ||
11499 | } | ||
11500 | /** | ||
11501 | * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) | ||
11502 | */ | ||
11503 | private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( | ||
11504 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11505 | source: DefinedElement, target:DefinedElement) | ||
11506 | { | ||
11507 | find interpretation(problem,interpretation); | ||
11508 | // The two endpoint of the link have to exist | ||
11509 | find mayExist(problem, interpretation, source); | ||
11510 | find mayExist(problem, interpretation, target); | ||
11511 | // Type consistency | ||
11512 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); | ||
11513 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
11514 | // The reference is containment, then a new reference cannot be create if: | ||
11515 | // 1. Multiple parents | ||
11516 | neg find mustContains4(problem,interpretation,_,target); | ||
11517 | // 2. Circle in the containment hierarchy | ||
11518 | neg find mustTransitiveContains(source,target); | ||
11519 | } or { | ||
11520 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); | ||
11521 | } | ||
11522 | /** | ||
11523 | * Matcher for detecting tuples t where []subElements reference Function(source,target) | ||
11524 | */ | ||
11525 | private pattern mustInRelationsubElements_reference_Function( | ||
11526 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11527 | source: DefinedElement, target:DefinedElement) | ||
11528 | { | ||
11529 | find interpretation(problem,interpretation); | ||
11530 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
11531 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); | ||
11532 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
11533 | BinaryElementRelationLink.param1(link,source); | ||
11534 | BinaryElementRelationLink.param2(link,target); | ||
11535 | } | ||
11536 | /** | ||
11537 | * Matcher for detecting tuples t where <>subElements reference Function(source,target) | ||
11538 | */ | ||
11539 | private pattern mayInRelationsubElements_reference_Function( | ||
11540 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11541 | source: DefinedElement, target:DefinedElement) | ||
11542 | { | ||
11543 | find interpretation(problem,interpretation); | ||
11544 | // The two endpoint of the link have to exist | ||
11545 | find mayExist(problem, interpretation, source); | ||
11546 | find mayExist(problem, interpretation, target); | ||
11547 | // Type consistency | ||
11548 | find mayInstanceOfFunction_class(problem,interpretation,source); | ||
11549 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
11550 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
11551 | // the upper bound of the opposite reference multiplicity should be considered. | ||
11552 | numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); | ||
11553 | check(numberOfExistingOppositeReferences < 1); | ||
11554 | // The reference is containment, then a new reference cannot be create if: | ||
11555 | // 1. Multiple parents | ||
11556 | neg find mustContains4(problem,interpretation,_,target); | ||
11557 | // 2. Circle in the containment hierarchy | ||
11558 | neg find mustTransitiveContains(source,target); | ||
11559 | } or { | ||
11560 | find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); | ||
11561 | } | ||
11562 | /** | ||
11563 | * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) | ||
11564 | */ | ||
11565 | private pattern mustInRelationdata_reference_FAMTerminator( | ||
11566 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11567 | source: DefinedElement, target:DefinedElement) | ||
11568 | { | ||
11569 | find interpretation(problem,interpretation); | ||
11570 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
11571 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); | ||
11572 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
11573 | BinaryElementRelationLink.param1(link,source); | ||
11574 | BinaryElementRelationLink.param2(link,target); | ||
11575 | } | ||
11576 | /** | ||
11577 | * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) | ||
11578 | */ | ||
11579 | private pattern mayInRelationdata_reference_FAMTerminator( | ||
11580 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11581 | source: DefinedElement, target:DefinedElement) | ||
11582 | { | ||
11583 | find interpretation(problem,interpretation); | ||
11584 | // The two endpoint of the link have to exist | ||
11585 | find mayExist(problem, interpretation, source); | ||
11586 | find mayExist(problem, interpretation, target); | ||
11587 | // Type consistency | ||
11588 | find mayInstanceOfFAMTerminator_class(problem,interpretation,source); | ||
11589 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
11590 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
11591 | // the upper bound of the multiplicity should be considered. | ||
11592 | numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); | ||
11593 | check(numberOfExistingReferences < 1); | ||
11594 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
11595 | // the upper bound of the opposite reference multiplicity should be considered. | ||
11596 | numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); | ||
11597 | check(numberOfExistingOppositeReferences < 1); | ||
11598 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
11599 | // 1. Multiple parents | ||
11600 | neg find mustContains4(problem,interpretation,source,_); | ||
11601 | // 2. Circle in the containment hierarchy | ||
11602 | neg find mustTransitiveContains(source,target); | ||
11603 | } or { | ||
11604 | find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); | ||
11605 | } | ||
11606 | /** | ||
11607 | * Matcher for detecting tuples t where []from reference InformationLink(source,target) | ||
11608 | */ | ||
11609 | private pattern mustInRelationfrom_reference_InformationLink( | ||
11610 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11611 | source: DefinedElement, target:DefinedElement) | ||
11612 | { | ||
11613 | find interpretation(problem,interpretation); | ||
11614 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
11615 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); | ||
11616 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
11617 | BinaryElementRelationLink.param1(link,source); | ||
11618 | BinaryElementRelationLink.param2(link,target); | ||
11619 | } | ||
11620 | /** | ||
11621 | * Matcher for detecting tuples t where <>from reference InformationLink(source,target) | ||
11622 | */ | ||
11623 | private pattern mayInRelationfrom_reference_InformationLink( | ||
11624 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11625 | source: DefinedElement, target:DefinedElement) | ||
11626 | { | ||
11627 | find interpretation(problem,interpretation); | ||
11628 | // The two endpoint of the link have to exist | ||
11629 | find mayExist(problem, interpretation, source); | ||
11630 | find mayExist(problem, interpretation, target); | ||
11631 | // Type consistency | ||
11632 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
11633 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); | ||
11634 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
11635 | // the upper bound of the multiplicity should be considered. | ||
11636 | numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); | ||
11637 | check(numberOfExistingReferences < 1); | ||
11638 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
11639 | // 1. Multiple parents | ||
11640 | neg find mustContains4(problem,interpretation,source,_); | ||
11641 | // 2. Circle in the containment hierarchy | ||
11642 | neg find mustTransitiveContains(source,target); | ||
11643 | } or { | ||
11644 | find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); | ||
11645 | } | ||
11646 | /** | ||
11647 | * Matcher for detecting tuples t where []to reference InformationLink(source,target) | ||
11648 | */ | ||
11649 | private pattern mustInRelationto_reference_InformationLink( | ||
11650 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11651 | source: DefinedElement, target:DefinedElement) | ||
11652 | { | ||
11653 | find interpretation(problem,interpretation); | ||
11654 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
11655 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
11656 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
11657 | BinaryElementRelationLink.param1(link,source); | ||
11658 | BinaryElementRelationLink.param2(link,target); | ||
11659 | } | ||
11660 | /** | ||
11661 | * Matcher for detecting tuples t where <>to reference InformationLink(source,target) | ||
11662 | */ | ||
11663 | private pattern mayInRelationto_reference_InformationLink( | ||
11664 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11665 | source: DefinedElement, target:DefinedElement) | ||
11666 | { | ||
11667 | find interpretation(problem,interpretation); | ||
11668 | // The two endpoint of the link have to exist | ||
11669 | find mayExist(problem, interpretation, source); | ||
11670 | find mayExist(problem, interpretation, target); | ||
11671 | // Type consistency | ||
11672 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
11673 | find mayInstanceOfFunctionalInput_class(problem,interpretation,target); | ||
11674 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
11675 | // the upper bound of the multiplicity should be considered. | ||
11676 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); | ||
11677 | check(numberOfExistingReferences < 1); | ||
11678 | } or { | ||
11679 | find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); | ||
11680 | } | ||
11681 | /** | ||
11682 | * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) | ||
11683 | */ | ||
11684 | private pattern mustInRelationdata_reference_FunctionalInterface( | ||
11685 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11686 | source: DefinedElement, target:DefinedElement) | ||
11687 | { | ||
11688 | find interpretation(problem,interpretation); | ||
11689 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
11690 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); | ||
11691 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
11692 | BinaryElementRelationLink.param1(link,source); | ||
11693 | BinaryElementRelationLink.param2(link,target); | ||
11694 | } | ||
11695 | /** | ||
11696 | * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) | ||
11697 | */ | ||
11698 | private pattern mayInRelationdata_reference_FunctionalInterface( | ||
11699 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11700 | source: DefinedElement, target:DefinedElement) | ||
11701 | { | ||
11702 | find interpretation(problem,interpretation); | ||
11703 | // The two endpoint of the link have to exist | ||
11704 | find mayExist(problem, interpretation, source); | ||
11705 | find mayExist(problem, interpretation, target); | ||
11706 | // Type consistency | ||
11707 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
11708 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
11709 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
11710 | // the upper bound of the opposite reference multiplicity should be considered. | ||
11711 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); | ||
11712 | check(numberOfExistingOppositeReferences < 1); | ||
11713 | // The reference is containment, then a new reference cannot be create if: | ||
11714 | // 1. Multiple parents | ||
11715 | neg find mustContains4(problem,interpretation,_,target); | ||
11716 | // 2. Circle in the containment hierarchy | ||
11717 | neg find mustTransitiveContains(source,target); | ||
11718 | } or { | ||
11719 | find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); | ||
11720 | } | ||
11721 | /** | ||
11722 | * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) | ||
11723 | */ | ||
11724 | private pattern mustInRelationelement_reference_FunctionalInterface( | ||
11725 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11726 | source: DefinedElement, target:DefinedElement) | ||
11727 | { | ||
11728 | find interpretation(problem,interpretation); | ||
11729 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
11730 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); | ||
11731 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
11732 | BinaryElementRelationLink.param1(link,source); | ||
11733 | BinaryElementRelationLink.param2(link,target); | ||
11734 | } | ||
11735 | /** | ||
11736 | * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) | ||
11737 | */ | ||
11738 | private pattern mayInRelationelement_reference_FunctionalInterface( | ||
11739 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11740 | source: DefinedElement, target:DefinedElement) | ||
11741 | { | ||
11742 | find interpretation(problem,interpretation); | ||
11743 | // The two endpoint of the link have to exist | ||
11744 | find mayExist(problem, interpretation, source); | ||
11745 | find mayExist(problem, interpretation, target); | ||
11746 | // Type consistency | ||
11747 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
11748 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
11749 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
11750 | // the upper bound of the multiplicity should be considered. | ||
11751 | numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); | ||
11752 | check(numberOfExistingReferences < 1); | ||
11753 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
11754 | // the upper bound of the opposite reference multiplicity should be considered. | ||
11755 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); | ||
11756 | check(numberOfExistingOppositeReferences < 1); | ||
11757 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
11758 | // 1. Multiple parents | ||
11759 | neg find mustContains4(problem,interpretation,source,_); | ||
11760 | // 2. Circle in the containment hierarchy | ||
11761 | neg find mustTransitiveContains(source,target); | ||
11762 | } or { | ||
11763 | find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); | ||
11764 | } | ||
11765 | /** | ||
11766 | * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) | ||
11767 | */ | ||
11768 | private pattern mustInRelationIncomingLinks_reference_FunctionalInput( | ||
11769 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11770 | source: DefinedElement, target:DefinedElement) | ||
11771 | { | ||
11772 | find interpretation(problem,interpretation); | ||
11773 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
11774 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
11775 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
11776 | BinaryElementRelationLink.param1(link,source); | ||
11777 | BinaryElementRelationLink.param2(link,target); | ||
11778 | } | ||
11779 | /** | ||
11780 | * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) | ||
11781 | */ | ||
11782 | private pattern mayInRelationIncomingLinks_reference_FunctionalInput( | ||
11783 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11784 | source: DefinedElement, target:DefinedElement) | ||
11785 | { | ||
11786 | find interpretation(problem,interpretation); | ||
11787 | // The two endpoint of the link have to exist | ||
11788 | find mayExist(problem, interpretation, source); | ||
11789 | find mayExist(problem, interpretation, target); | ||
11790 | // Type consistency | ||
11791 | find mayInstanceOfFunctionalInput_class(problem,interpretation,source); | ||
11792 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
11793 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
11794 | // the upper bound of the opposite reference multiplicity should be considered. | ||
11795 | numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); | ||
11796 | check(numberOfExistingOppositeReferences < 1); | ||
11797 | } or { | ||
11798 | find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); | ||
11799 | } | ||
11800 | /** | ||
11801 | * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) | ||
11802 | */ | ||
11803 | private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( | ||
11804 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11805 | source: DefinedElement, target:DefinedElement) | ||
11806 | { | ||
11807 | find interpretation(problem,interpretation); | ||
11808 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
11809 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); | ||
11810 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
11811 | BinaryElementRelationLink.param1(link,source); | ||
11812 | BinaryElementRelationLink.param2(link,target); | ||
11813 | } | ||
11814 | /** | ||
11815 | * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) | ||
11816 | */ | ||
11817 | private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( | ||
11818 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11819 | source: DefinedElement, target:DefinedElement) | ||
11820 | { | ||
11821 | find interpretation(problem,interpretation); | ||
11822 | // The two endpoint of the link have to exist | ||
11823 | find mayExist(problem, interpretation, source); | ||
11824 | find mayExist(problem, interpretation, target); | ||
11825 | // Type consistency | ||
11826 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); | ||
11827 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
11828 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
11829 | // the upper bound of the opposite reference multiplicity should be considered. | ||
11830 | numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); | ||
11831 | check(numberOfExistingOppositeReferences < 1); | ||
11832 | // The reference is containment, then a new reference cannot be create if: | ||
11833 | // 1. Multiple parents | ||
11834 | neg find mustContains4(problem,interpretation,_,target); | ||
11835 | // 2. Circle in the containment hierarchy | ||
11836 | neg find mustTransitiveContains(source,target); | ||
11837 | } or { | ||
11838 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); | ||
11839 | } | ||
11840 | /** | ||
11841 | * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) | ||
11842 | */ | ||
11843 | private pattern mustInRelationterminator_reference_FunctionalData( | ||
11844 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11845 | source: DefinedElement, target:DefinedElement) | ||
11846 | { | ||
11847 | find interpretation(problem,interpretation); | ||
11848 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
11849 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); | ||
11850 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
11851 | BinaryElementRelationLink.param1(link,source); | ||
11852 | BinaryElementRelationLink.param2(link,target); | ||
11853 | } | ||
11854 | /** | ||
11855 | * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) | ||
11856 | */ | ||
11857 | private pattern mayInRelationterminator_reference_FunctionalData( | ||
11858 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11859 | source: DefinedElement, target:DefinedElement) | ||
11860 | { | ||
11861 | find interpretation(problem,interpretation); | ||
11862 | // The two endpoint of the link have to exist | ||
11863 | find mayExist(problem, interpretation, source); | ||
11864 | find mayExist(problem, interpretation, target); | ||
11865 | // Type consistency | ||
11866 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
11867 | find mayInstanceOfFAMTerminator_class(problem,interpretation,target); | ||
11868 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
11869 | // the upper bound of the multiplicity should be considered. | ||
11870 | numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); | ||
11871 | check(numberOfExistingReferences < 1); | ||
11872 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
11873 | // the upper bound of the opposite reference multiplicity should be considered. | ||
11874 | numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); | ||
11875 | check(numberOfExistingOppositeReferences < 1); | ||
11876 | // The reference is containment, then a new reference cannot be create if: | ||
11877 | // 1. Multiple parents | ||
11878 | neg find mustContains4(problem,interpretation,_,target); | ||
11879 | // 2. Circle in the containment hierarchy | ||
11880 | neg find mustTransitiveContains(source,target); | ||
11881 | } or { | ||
11882 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); | ||
11883 | } | ||
11884 | /** | ||
11885 | * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) | ||
11886 | */ | ||
11887 | private pattern mustInRelationinterface_reference_FunctionalData( | ||
11888 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11889 | source: DefinedElement, target:DefinedElement) | ||
11890 | { | ||
11891 | find interpretation(problem,interpretation); | ||
11892 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
11893 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); | ||
11894 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
11895 | BinaryElementRelationLink.param1(link,source); | ||
11896 | BinaryElementRelationLink.param2(link,target); | ||
11897 | } | ||
11898 | /** | ||
11899 | * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) | ||
11900 | */ | ||
11901 | private pattern mayInRelationinterface_reference_FunctionalData( | ||
11902 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11903 | source: DefinedElement, target:DefinedElement) | ||
11904 | { | ||
11905 | find interpretation(problem,interpretation); | ||
11906 | // The two endpoint of the link have to exist | ||
11907 | find mayExist(problem, interpretation, source); | ||
11908 | find mayExist(problem, interpretation, target); | ||
11909 | // Type consistency | ||
11910 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
11911 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
11912 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
11913 | // the upper bound of the multiplicity should be considered. | ||
11914 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); | ||
11915 | check(numberOfExistingReferences < 1); | ||
11916 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
11917 | // 1. Multiple parents | ||
11918 | neg find mustContains4(problem,interpretation,source,_); | ||
11919 | // 2. Circle in the containment hierarchy | ||
11920 | neg find mustTransitiveContains(source,target); | ||
11921 | } or { | ||
11922 | find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); | ||
11923 | } | ||
11924 | /** | ||
11925 | * Matcher for detecting tuples t where []type attribute Function(source,target) | ||
11926 | */ | ||
11927 | private pattern mustInRelationtype_attribute_Function( | ||
11928 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11929 | source: DefinedElement, target:DefinedElement) | ||
11930 | { | ||
11931 | find interpretation(problem,interpretation); | ||
11932 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
11933 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
11934 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
11935 | BinaryElementRelationLink.param1(link,source); | ||
11936 | BinaryElementRelationLink.param2(link,target); | ||
11937 | } | ||
11938 | /** | ||
11939 | * Matcher for detecting tuples t where <>type attribute Function(source,target) | ||
11940 | */ | ||
11941 | private pattern mayInRelationtype_attribute_Function( | ||
11942 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11943 | source: DefinedElement, target:DefinedElement) | ||
11944 | { | ||
11945 | find interpretation(problem,interpretation); | ||
11946 | // The two endpoint of the link have to exist | ||
11947 | find mayExist(problem, interpretation, source); | ||
11948 | find mayExist(problem, interpretation, target); | ||
11949 | // Type consistency | ||
11950 | find mayInstanceOfFunction_class(problem,interpretation,source); | ||
11951 | find mayInstanceOfFunctionType_enum(problem,interpretation,target); | ||
11952 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
11953 | // the upper bound of the multiplicity should be considered. | ||
11954 | numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_); | ||
11955 | check(numberOfExistingReferences < 1); | ||
11956 | } or { | ||
11957 | find mustInRelationtype_attribute_Function(problem,interpretation,source,target); | ||
11958 | } | ||
11959 | |||
11960 | ////////// | ||
11961 | // 1.3 Relation Definition Indexers | ||
11962 | ////////// | ||
11963 | |||
11964 | ////////// | ||
11965 | // 1.4 Containment Indexer | ||
11966 | ////////// | ||
11967 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
11968 | find mustContains4(_,_,source,target); | ||
11969 | } | ||
11970 | |||
11971 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11972 | source: DefinedElement, target: DefinedElement) | ||
11973 | { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or | ||
11974 | |||
11975 | { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or | ||
11976 | |||
11977 | { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or | ||
11978 | |||
11979 | { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or | ||
11980 | |||
11981 | { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or | ||
11982 | |||
11983 | { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } | ||
11984 | |||
11985 | private pattern mustTransitiveContains(source,target) { | ||
11986 | find mustContains2+(source,target); | ||
11987 | } | ||
11988 | |||
11989 | ////////// | ||
11990 | // 2. Invalidation Indexers | ||
11991 | ////////// | ||
11992 | // 2.1 Invalidated by WF Queries | ||
11993 | ////////// | ||
11994 | |||
11995 | ////////// | ||
11996 | // 3. Unfinishedness Indexers | ||
11997 | ////////// | ||
11998 | // 3.1 Unfinishedness Measured by Multiplicity | ||
11999 | ////////// | ||
12000 | pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
12001 | find interpretation(problem,interpretation); | ||
12002 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
12003 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
12004 | find mustInstanceOfFunctionalElement_class(problem,interpretation,object); | ||
12005 | numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_); | ||
12006 | check(numberOfExistingReferences < 1); | ||
12007 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
12008 | } | ||
12009 | pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
12010 | find interpretation(problem,interpretation); | ||
12011 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
12012 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
12013 | find mustInstanceOfInformationLink_class(problem,interpretation,object); | ||
12014 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); | ||
12015 | check(numberOfExistingReferences < 1); | ||
12016 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
12017 | } | ||
12018 | pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
12019 | find interpretation(problem,interpretation); | ||
12020 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
12021 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
12022 | find mustInstanceOfFunction_class(problem,interpretation,object); | ||
12023 | numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_); | ||
12024 | check(numberOfExistingReferences < 1); | ||
12025 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
12026 | } | ||
12027 | |||
12028 | ////////// | ||
12029 | // 3.2 Unfinishedness Measured by WF Queries | ||
12030 | ////////// | ||
12031 | |||
12032 | ////////// | ||
12033 | // 4. Refinement Indexers | ||
12034 | ////////// | ||
12035 | // 4.1 Object constructors | ||
12036 | ////////// | ||
12037 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
12038 | { | ||
12039 | find interpretation(problem,interpretation); | ||
12040 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); | ||
12041 | find mustExist(problem, interpretation, root); | ||
12042 | }or{ | ||
12043 | find interpretation(problem,interpretation); | ||
12044 | find mustInstanceOfFunctionalElement_class(problem,interpretation,root); | ||
12045 | find mustExist(problem, interpretation, root); | ||
12046 | }or{ | ||
12047 | find interpretation(problem,interpretation); | ||
12048 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); | ||
12049 | find mustExist(problem, interpretation, root); | ||
12050 | }or{ | ||
12051 | find interpretation(problem,interpretation); | ||
12052 | find mustInstanceOfFunctionalData_class(problem,interpretation,root); | ||
12053 | find mustExist(problem, interpretation, root); | ||
12054 | }or{ | ||
12055 | find interpretation(problem,interpretation); | ||
12056 | find mustInstanceOfFunctionalInput_class(problem,interpretation,root); | ||
12057 | find mustExist(problem, interpretation, root); | ||
12058 | }or{ | ||
12059 | find interpretation(problem,interpretation); | ||
12060 | find mustInstanceOfInformationLink_class(problem,interpretation,root); | ||
12061 | find mustExist(problem, interpretation, root); | ||
12062 | }or{ | ||
12063 | find interpretation(problem,interpretation); | ||
12064 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); | ||
12065 | find mustExist(problem, interpretation, root); | ||
12066 | }or{ | ||
12067 | find interpretation(problem,interpretation); | ||
12068 | find mustInstanceOfFAMTerminator_class(problem,interpretation,root); | ||
12069 | find mustExist(problem, interpretation, root); | ||
12070 | }or{ | ||
12071 | find interpretation(problem,interpretation); | ||
12072 | find mustInstanceOfFunction_class(problem,interpretation,root); | ||
12073 | find mustExist(problem, interpretation, root); | ||
12074 | }or{ | ||
12075 | find interpretation(problem,interpretation); | ||
12076 | find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); | ||
12077 | find mustExist(problem, interpretation, root); | ||
12078 | }or{ | ||
12079 | find interpretation(problem,interpretation); | ||
12080 | find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); | ||
12081 | find mustExist(problem, interpretation, root); | ||
12082 | } | ||
12083 | pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( | ||
12084 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12085 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
12086 | container:DefinedElement) | ||
12087 | { | ||
12088 | find interpretation(problem,interpretation); | ||
12089 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
12090 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
12091 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
12092 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
12093 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); | ||
12094 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
12095 | find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); | ||
12096 | find mustExist(problem, interpretation, container); | ||
12097 | neg find mustExist(problem, interpretation, newObject); | ||
12098 | } | ||
12099 | pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( | ||
12100 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12101 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
12102 | container:DefinedElement) | ||
12103 | { | ||
12104 | find interpretation(problem,interpretation); | ||
12105 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
12106 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
12107 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
12108 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); | ||
12109 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
12110 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); | ||
12111 | find mustInstanceOfFunction_class(problem,interpretation,container); | ||
12112 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
12113 | find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); | ||
12114 | find mustExist(problem, interpretation, container); | ||
12115 | neg find mustExist(problem, interpretation, newObject); | ||
12116 | } | ||
12117 | pattern createObject_Function_class( | ||
12118 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12119 | typeInterpretation:PartialComplexTypeInterpretation) | ||
12120 | { | ||
12121 | find interpretation(problem,interpretation); | ||
12122 | neg find hasElementInContainment(problem,interpretation); | ||
12123 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
12124 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
12125 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
12126 | find mayExist(problem, interpretation, newObject); | ||
12127 | neg find mustExist(problem, interpretation, newObject); | ||
12128 | } | ||
12129 | pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( | ||
12130 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12131 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
12132 | container:DefinedElement) | ||
12133 | { | ||
12134 | find interpretation(problem,interpretation); | ||
12135 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
12136 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
12137 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
12138 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); | ||
12139 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
12140 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); | ||
12141 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); | ||
12142 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
12143 | find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); | ||
12144 | find mustExist(problem, interpretation, container); | ||
12145 | neg find mustExist(problem, interpretation, newObject); | ||
12146 | } | ||
12147 | pattern createObject_InformationLink_class( | ||
12148 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12149 | typeInterpretation:PartialComplexTypeInterpretation) | ||
12150 | { | ||
12151 | find interpretation(problem,interpretation); | ||
12152 | neg find hasElementInContainment(problem,interpretation); | ||
12153 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
12154 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
12155 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
12156 | find mayExist(problem, interpretation, newObject); | ||
12157 | neg find mustExist(problem, interpretation, newObject); | ||
12158 | } | ||
12159 | pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( | ||
12160 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12161 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
12162 | container:DefinedElement) | ||
12163 | { | ||
12164 | find interpretation(problem,interpretation); | ||
12165 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
12166 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
12167 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
12168 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); | ||
12169 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
12170 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); | ||
12171 | find mustInstanceOfFunctionalData_class(problem,interpretation,container); | ||
12172 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
12173 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); | ||
12174 | find mustExist(problem, interpretation, container); | ||
12175 | neg find mustExist(problem, interpretation, newObject); | ||
12176 | } | ||
12177 | pattern createObject_FAMTerminator_class( | ||
12178 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12179 | typeInterpretation:PartialComplexTypeInterpretation) | ||
12180 | { | ||
12181 | find interpretation(problem,interpretation); | ||
12182 | neg find hasElementInContainment(problem,interpretation); | ||
12183 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
12184 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
12185 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
12186 | find mayExist(problem, interpretation, newObject); | ||
12187 | neg find mustExist(problem, interpretation, newObject); | ||
12188 | } | ||
12189 | pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
12190 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12191 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
12192 | container:DefinedElement) | ||
12193 | { | ||
12194 | find interpretation(problem,interpretation); | ||
12195 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
12196 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
12197 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
12198 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
12199 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
12200 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
12201 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
12202 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
12203 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
12204 | find mustExist(problem, interpretation, container); | ||
12205 | neg find mustExist(problem, interpretation, newObject); | ||
12206 | } | ||
12207 | pattern createObject_FunctionalInput_class( | ||
12208 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12209 | typeInterpretation:PartialComplexTypeInterpretation) | ||
12210 | { | ||
12211 | find interpretation(problem,interpretation); | ||
12212 | neg find hasElementInContainment(problem,interpretation); | ||
12213 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
12214 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
12215 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
12216 | find mayExist(problem, interpretation, newObject); | ||
12217 | neg find mustExist(problem, interpretation, newObject); | ||
12218 | } | ||
12219 | pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( | ||
12220 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12221 | typeInterpretation:PartialComplexTypeInterpretation) | ||
12222 | { | ||
12223 | find interpretation(problem,interpretation); | ||
12224 | neg find hasElementInContainment(problem,interpretation); | ||
12225 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
12226 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); | ||
12227 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); | ||
12228 | find mayExist(problem, interpretation, newObject); | ||
12229 | neg find mustExist(problem, interpretation, newObject); | ||
12230 | } | ||
12231 | pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
12232 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12233 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
12234 | container:DefinedElement) | ||
12235 | { | ||
12236 | find interpretation(problem,interpretation); | ||
12237 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
12238 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
12239 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
12240 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
12241 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
12242 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
12243 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
12244 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
12245 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
12246 | find mustExist(problem, interpretation, container); | ||
12247 | neg find mustExist(problem, interpretation, newObject); | ||
12248 | } | ||
12249 | pattern createObject_FunctionalOutput_class( | ||
12250 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12251 | typeInterpretation:PartialComplexTypeInterpretation) | ||
12252 | { | ||
12253 | find interpretation(problem,interpretation); | ||
12254 | neg find hasElementInContainment(problem,interpretation); | ||
12255 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
12256 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
12257 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
12258 | find mayExist(problem, interpretation, newObject); | ||
12259 | neg find mustExist(problem, interpretation, newObject); | ||
12260 | } | ||
12261 | pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( | ||
12262 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12263 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
12264 | container:DefinedElement) | ||
12265 | { | ||
12266 | find interpretation(problem,interpretation); | ||
12267 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
12268 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
12269 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
12270 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); | ||
12271 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
12272 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); | ||
12273 | find mustInstanceOfFunctionalElement_class(problem,interpretation,container); | ||
12274 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
12275 | find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); | ||
12276 | find mustExist(problem, interpretation, container); | ||
12277 | neg find mustExist(problem, interpretation, newObject); | ||
12278 | } | ||
12279 | pattern createObject_FunctionalInterface_class( | ||
12280 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12281 | typeInterpretation:PartialComplexTypeInterpretation) | ||
12282 | { | ||
12283 | find interpretation(problem,interpretation); | ||
12284 | neg find hasElementInContainment(problem,interpretation); | ||
12285 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
12286 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
12287 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
12288 | find mayExist(problem, interpretation, newObject); | ||
12289 | neg find mustExist(problem, interpretation, newObject); | ||
12290 | } | ||
12291 | |||
12292 | ////////// | ||
12293 | // 4.2 Type refinement | ||
12294 | ////////// | ||
12295 | pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
12296 | find interpretation(problem,interpretation); | ||
12297 | PartialInterpretation.newElements(interpretation,element); | ||
12298 | find mayInstanceOfFunction_class(problem,interpretation,element); | ||
12299 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
12300 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12301 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12302 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
12303 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
12304 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12305 | } | ||
12306 | pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
12307 | find interpretation(problem,interpretation); | ||
12308 | PartialInterpretation.newElements(interpretation,element); | ||
12309 | find mayInstanceOfInformationLink_class(problem,interpretation,element); | ||
12310 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12311 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12312 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
12313 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
12314 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12315 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
12316 | } | ||
12317 | pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
12318 | find interpretation(problem,interpretation); | ||
12319 | PartialInterpretation.newElements(interpretation,element); | ||
12320 | find mayInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12321 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12322 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12323 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
12324 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
12325 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12326 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
12327 | } | ||
12328 | pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
12329 | find interpretation(problem,interpretation); | ||
12330 | PartialInterpretation.newElements(interpretation,element); | ||
12331 | find mayInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
12332 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12333 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12334 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
12335 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
12336 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
12337 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12338 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
12339 | } | ||
12340 | pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
12341 | find interpretation(problem,interpretation); | ||
12342 | PartialInterpretation.newElements(interpretation,element); | ||
12343 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
12344 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12345 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12346 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
12347 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
12348 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12349 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
12350 | } | ||
12351 | pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
12352 | find interpretation(problem,interpretation); | ||
12353 | PartialInterpretation.newElements(interpretation,element); | ||
12354 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
12355 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12356 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12357 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
12358 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
12359 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
12360 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12361 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
12362 | } | ||
12363 | pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
12364 | find interpretation(problem,interpretation); | ||
12365 | PartialInterpretation.newElements(interpretation,element); | ||
12366 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12367 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12368 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12369 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
12370 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
12371 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12372 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
12373 | } | ||
12374 | |||
12375 | ////////// | ||
12376 | // 4.3 Relation refinement | ||
12377 | ////////// | ||
12378 | pattern refineRelation_model_reference_FunctionalElement( | ||
12379 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12380 | relationIterpretation:PartialRelationInterpretation, | ||
12381 | from: DefinedElement, to: DefinedElement) | ||
12382 | { | ||
12383 | find interpretation(problem,interpretation); | ||
12384 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
12385 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
12386 | find mustExist(problem, interpretation, from); | ||
12387 | find mustExist(problem, interpretation, to); | ||
12388 | find mustInstanceOfFunctionalElement_class(problem,interpretation,from); | ||
12389 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); | ||
12390 | find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
12391 | neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
12392 | } | ||
12393 | pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( | ||
12394 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12395 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
12396 | from: DefinedElement, to: DefinedElement) | ||
12397 | { | ||
12398 | find interpretation(problem,interpretation); | ||
12399 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
12400 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
12401 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
12402 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); | ||
12403 | find mustExist(problem, interpretation, from); | ||
12404 | find mustExist(problem, interpretation, to); | ||
12405 | find mustInstanceOfFunctionalInput_class(problem,interpretation,from); | ||
12406 | find mustInstanceOfInformationLink_class(problem,interpretation,to); | ||
12407 | find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
12408 | neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
12409 | } | ||
12410 | pattern refineRelation_type_attribute_Function( | ||
12411 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12412 | relationIterpretation:PartialRelationInterpretation, | ||
12413 | from: DefinedElement, to: DefinedElement) | ||
12414 | { | ||
12415 | find interpretation(problem,interpretation); | ||
12416 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
12417 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
12418 | find mustExist(problem, interpretation, from); | ||
12419 | find mustExist(problem, interpretation, to); | ||
12420 | find mustInstanceOfFunction_class(problem,interpretation,from); | ||
12421 | find mustInstanceOfFunctionType_enum(problem,interpretation,to); | ||
12422 | find mayInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
12423 | neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
12424 | } | ||
12425 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
12426 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
12427 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
12428 | |||
12429 | ////////// | ||
12430 | // 0. Util | ||
12431 | ////////// | ||
12432 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12433 | PartialInterpretation.problem(interpretation,problem); | ||
12434 | } | ||
12435 | |||
12436 | ///////////////////////// | ||
12437 | // 0.1 Existence | ||
12438 | ///////////////////////// | ||
12439 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12440 | find interpretation(problem,interpretation); | ||
12441 | LogicProblem.elements(problem,element); | ||
12442 | } or { | ||
12443 | find interpretation(problem,interpretation); | ||
12444 | PartialInterpretation.newElements(interpretation,element); | ||
12445 | } | ||
12446 | |||
12447 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12448 | find mustExist(problem,interpretation,element); | ||
12449 | } or { | ||
12450 | find interpretation(problem,interpretation); | ||
12451 | neg find elementCloseWorld(element); | ||
12452 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12453 | } | ||
12454 | |||
12455 | private pattern elementCloseWorld(element:DefinedElement) { | ||
12456 | PartialInterpretation.openWorldElements(i,element); | ||
12457 | PartialInterpretation.maxNewElements(i,0); | ||
12458 | } or { | ||
12459 | Scope.targetTypeInterpretation(scope,interpretation); | ||
12460 | PartialTypeInterpratation.elements(interpretation,element); | ||
12461 | Scope.maxNewElements(scope,0); | ||
12462 | } | ||
12463 | |||
12464 | //////////////////////// | ||
12465 | // 0.2 Equivalence | ||
12466 | //////////////////////// | ||
12467 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
12468 | find mayExist(problem,interpretation,a); | ||
12469 | find mayExist(problem,interpretation,b); | ||
12470 | a == b; | ||
12471 | } | ||
12472 | |||
12473 | //////////////////////// | ||
12474 | // 0.3 Required Patterns by TypeIndexer | ||
12475 | //////////////////////// | ||
12476 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
12477 | find interpretation(problem,interpretation); | ||
12478 | LogicProblem.types(problem,type); | ||
12479 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
12480 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12481 | } | ||
12482 | |||
12483 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
12484 | find interpretation(problem,interpretation); | ||
12485 | LogicProblem.types(problem,type); | ||
12486 | TypeDefinition.elements(type,element); | ||
12487 | } or { | ||
12488 | find interpretation(problem,interpretation); | ||
12489 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
12490 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
12491 | } | ||
12492 | |||
12493 | private pattern isPrimitive(element: PrimitiveElement) { | ||
12494 | PrimitiveElement(element); | ||
12495 | } | ||
12496 | |||
12497 | ////////// | ||
12498 | // 1. Problem-Specific Base Indexers | ||
12499 | ////////// | ||
12500 | // 1.1 Type Indexers | ||
12501 | ////////// | ||
12502 | // 1.1.1 primitive Type Indexers | ||
12503 | ////////// | ||
12504 | |||
12505 | ////////// | ||
12506 | // 1.1.2 domain-specific Type Indexers | ||
12507 | ////////// | ||
12508 | /** | ||
12509 | * An element must be an instance of type "FunctionalElement class". | ||
12510 | */ | ||
12511 | private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12512 | Type.name(type,"FunctionalElement class"); | ||
12513 | find directInstanceOf(problem,interpretation,element,type); | ||
12514 | } | ||
12515 | private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12516 | find interpretation(problem,interpretation); | ||
12517 | PartialInterpretation.scopes(interpretation,scope); | ||
12518 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12519 | Scope.maxNewElements(scope,0); | ||
12520 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12521 | Type.name(type,"FunctionalElement class"); | ||
12522 | } | ||
12523 | |||
12524 | /** | ||
12525 | * An element may be an instance of type "FunctionalElement class". | ||
12526 | */ | ||
12527 | private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12528 | { | ||
12529 | find interpretation(problem,interpretation); | ||
12530 | PartialInterpretation.newElements(interpretation,element); | ||
12531 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12532 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12533 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
12534 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
12535 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
12536 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12537 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
12538 | neg find isPrimitive(element); | ||
12539 | } or { | ||
12540 | find interpretation(problem,interpretation); | ||
12541 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12542 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12543 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12544 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
12545 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
12546 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
12547 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12548 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
12549 | neg find isPrimitive(element); | ||
12550 | } or | ||
12551 | { find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } | ||
12552 | /** | ||
12553 | * An element must be an instance of type "FunctionalArchitectureModel class". | ||
12554 | */ | ||
12555 | private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12556 | Type.name(type,"FunctionalArchitectureModel class"); | ||
12557 | find directInstanceOf(problem,interpretation,element,type); | ||
12558 | } | ||
12559 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12560 | find interpretation(problem,interpretation); | ||
12561 | PartialInterpretation.scopes(interpretation,scope); | ||
12562 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12563 | Scope.maxNewElements(scope,0); | ||
12564 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12565 | Type.name(type,"FunctionalArchitectureModel class"); | ||
12566 | } | ||
12567 | |||
12568 | /** | ||
12569 | * An element may be an instance of type "FunctionalArchitectureModel class". | ||
12570 | */ | ||
12571 | private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12572 | { | ||
12573 | find interpretation(problem,interpretation); | ||
12574 | PartialInterpretation.newElements(interpretation,element); | ||
12575 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12576 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
12577 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12578 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
12579 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12580 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
12581 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
12582 | neg find isPrimitive(element); | ||
12583 | } or { | ||
12584 | find interpretation(problem,interpretation); | ||
12585 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12586 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12587 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
12588 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12589 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
12590 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12591 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
12592 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
12593 | neg find isPrimitive(element); | ||
12594 | } or | ||
12595 | { find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } | ||
12596 | /** | ||
12597 | * An element must be an instance of type "Function class". | ||
12598 | */ | ||
12599 | private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12600 | Type.name(type,"Function class"); | ||
12601 | find directInstanceOf(problem,interpretation,element,type); | ||
12602 | } | ||
12603 | private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12604 | find interpretation(problem,interpretation); | ||
12605 | PartialInterpretation.scopes(interpretation,scope); | ||
12606 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12607 | Scope.maxNewElements(scope,0); | ||
12608 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12609 | Type.name(type,"Function class"); | ||
12610 | } | ||
12611 | |||
12612 | /** | ||
12613 | * An element may be an instance of type "Function class". | ||
12614 | */ | ||
12615 | private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12616 | { | ||
12617 | find interpretation(problem,interpretation); | ||
12618 | PartialInterpretation.newElements(interpretation,element); | ||
12619 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12620 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12621 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
12622 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
12623 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12624 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
12625 | neg find isPrimitive(element); | ||
12626 | } or { | ||
12627 | find interpretation(problem,interpretation); | ||
12628 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12629 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12630 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12631 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
12632 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
12633 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12634 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
12635 | neg find isPrimitive(element); | ||
12636 | } or | ||
12637 | { find mustInstanceOfFunction_class(problem,interpretation,element); } | ||
12638 | /** | ||
12639 | * An element must be an instance of type "FAMTerminator class". | ||
12640 | */ | ||
12641 | private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12642 | Type.name(type,"FAMTerminator class"); | ||
12643 | find directInstanceOf(problem,interpretation,element,type); | ||
12644 | } | ||
12645 | private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12646 | find interpretation(problem,interpretation); | ||
12647 | PartialInterpretation.scopes(interpretation,scope); | ||
12648 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12649 | Scope.maxNewElements(scope,0); | ||
12650 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12651 | Type.name(type,"FAMTerminator class"); | ||
12652 | } | ||
12653 | |||
12654 | /** | ||
12655 | * An element may be an instance of type "FAMTerminator class". | ||
12656 | */ | ||
12657 | private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12658 | { | ||
12659 | find interpretation(problem,interpretation); | ||
12660 | PartialInterpretation.newElements(interpretation,element); | ||
12661 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
12662 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12663 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
12664 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
12665 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12666 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
12667 | neg find isPrimitive(element); | ||
12668 | } or { | ||
12669 | find interpretation(problem,interpretation); | ||
12670 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12671 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
12672 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12673 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
12674 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
12675 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12676 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
12677 | neg find isPrimitive(element); | ||
12678 | } or | ||
12679 | { find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } | ||
12680 | /** | ||
12681 | * An element must be an instance of type "InformationLink class". | ||
12682 | */ | ||
12683 | private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12684 | Type.name(type,"InformationLink class"); | ||
12685 | find directInstanceOf(problem,interpretation,element,type); | ||
12686 | } | ||
12687 | private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12688 | find interpretation(problem,interpretation); | ||
12689 | PartialInterpretation.scopes(interpretation,scope); | ||
12690 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12691 | Scope.maxNewElements(scope,0); | ||
12692 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12693 | Type.name(type,"InformationLink class"); | ||
12694 | } | ||
12695 | |||
12696 | /** | ||
12697 | * An element may be an instance of type "InformationLink class". | ||
12698 | */ | ||
12699 | private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12700 | { | ||
12701 | find interpretation(problem,interpretation); | ||
12702 | PartialInterpretation.newElements(interpretation,element); | ||
12703 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
12704 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12705 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
12706 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
12707 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12708 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
12709 | neg find isPrimitive(element); | ||
12710 | } or { | ||
12711 | find interpretation(problem,interpretation); | ||
12712 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12713 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
12714 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12715 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
12716 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
12717 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12718 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
12719 | neg find isPrimitive(element); | ||
12720 | } or | ||
12721 | { find mustInstanceOfInformationLink_class(problem,interpretation,element); } | ||
12722 | /** | ||
12723 | * An element must be an instance of type "FunctionalInterface class". | ||
12724 | */ | ||
12725 | private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12726 | Type.name(type,"FunctionalInterface class"); | ||
12727 | find directInstanceOf(problem,interpretation,element,type); | ||
12728 | } | ||
12729 | private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12730 | find interpretation(problem,interpretation); | ||
12731 | PartialInterpretation.scopes(interpretation,scope); | ||
12732 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12733 | Scope.maxNewElements(scope,0); | ||
12734 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12735 | Type.name(type,"FunctionalInterface class"); | ||
12736 | } | ||
12737 | |||
12738 | /** | ||
12739 | * An element may be an instance of type "FunctionalInterface class". | ||
12740 | */ | ||
12741 | private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12742 | { | ||
12743 | find interpretation(problem,interpretation); | ||
12744 | PartialInterpretation.newElements(interpretation,element); | ||
12745 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12746 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
12747 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12748 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
12749 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
12750 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
12751 | neg find isPrimitive(element); | ||
12752 | } or { | ||
12753 | find interpretation(problem,interpretation); | ||
12754 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12755 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12756 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
12757 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12758 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
12759 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
12760 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
12761 | neg find isPrimitive(element); | ||
12762 | } or | ||
12763 | { find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } | ||
12764 | /** | ||
12765 | * An element must be an instance of type "FunctionalInput class". | ||
12766 | */ | ||
12767 | private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12768 | Type.name(type,"FunctionalInput class"); | ||
12769 | find directInstanceOf(problem,interpretation,element,type); | ||
12770 | } | ||
12771 | private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12772 | find interpretation(problem,interpretation); | ||
12773 | PartialInterpretation.scopes(interpretation,scope); | ||
12774 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12775 | Scope.maxNewElements(scope,0); | ||
12776 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12777 | Type.name(type,"FunctionalInput class"); | ||
12778 | } | ||
12779 | |||
12780 | /** | ||
12781 | * An element may be an instance of type "FunctionalInput class". | ||
12782 | */ | ||
12783 | private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12784 | { | ||
12785 | find interpretation(problem,interpretation); | ||
12786 | PartialInterpretation.newElements(interpretation,element); | ||
12787 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
12788 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12789 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
12790 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12791 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
12792 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12793 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
12794 | neg find isPrimitive(element); | ||
12795 | } or { | ||
12796 | find interpretation(problem,interpretation); | ||
12797 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12798 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
12799 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12800 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
12801 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12802 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
12803 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12804 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
12805 | neg find isPrimitive(element); | ||
12806 | } or | ||
12807 | { find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } | ||
12808 | /** | ||
12809 | * An element must be an instance of type "FunctionalOutput class". | ||
12810 | */ | ||
12811 | private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12812 | Type.name(type,"FunctionalOutput class"); | ||
12813 | find directInstanceOf(problem,interpretation,element,type); | ||
12814 | } | ||
12815 | private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12816 | find interpretation(problem,interpretation); | ||
12817 | PartialInterpretation.scopes(interpretation,scope); | ||
12818 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12819 | Scope.maxNewElements(scope,0); | ||
12820 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12821 | Type.name(type,"FunctionalOutput class"); | ||
12822 | } | ||
12823 | |||
12824 | /** | ||
12825 | * An element may be an instance of type "FunctionalOutput class". | ||
12826 | */ | ||
12827 | private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12828 | { | ||
12829 | find interpretation(problem,interpretation); | ||
12830 | PartialInterpretation.newElements(interpretation,element); | ||
12831 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
12832 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
12833 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12834 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12835 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
12836 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12837 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
12838 | neg find isPrimitive(element); | ||
12839 | } or { | ||
12840 | find interpretation(problem,interpretation); | ||
12841 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12842 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
12843 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
12844 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12845 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12846 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
12847 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12848 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
12849 | neg find isPrimitive(element); | ||
12850 | } or | ||
12851 | { find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } | ||
12852 | /** | ||
12853 | * An element must be an instance of type "FunctionalData class". | ||
12854 | */ | ||
12855 | private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12856 | Type.name(type,"FunctionalData class"); | ||
12857 | find directInstanceOf(problem,interpretation,element,type); | ||
12858 | } | ||
12859 | private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12860 | find interpretation(problem,interpretation); | ||
12861 | PartialInterpretation.scopes(interpretation,scope); | ||
12862 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12863 | Scope.maxNewElements(scope,0); | ||
12864 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12865 | Type.name(type,"FunctionalData class"); | ||
12866 | } | ||
12867 | |||
12868 | /** | ||
12869 | * An element may be an instance of type "FunctionalData class". | ||
12870 | */ | ||
12871 | private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12872 | { | ||
12873 | find interpretation(problem,interpretation); | ||
12874 | PartialInterpretation.newElements(interpretation,element); | ||
12875 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
12876 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
12877 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12878 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
12879 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12880 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
12881 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12882 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
12883 | neg find isPrimitive(element); | ||
12884 | } or { | ||
12885 | find interpretation(problem,interpretation); | ||
12886 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12887 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
12888 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
12889 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12890 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
12891 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12892 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
12893 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12894 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
12895 | neg find isPrimitive(element); | ||
12896 | } or | ||
12897 | { find mustInstanceOfFunctionalData_class(problem,interpretation,element); } | ||
12898 | /** | ||
12899 | * An element must be an instance of type "FunctionType enum". | ||
12900 | */ | ||
12901 | private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12902 | Type.name(type,"FunctionType enum"); | ||
12903 | find directInstanceOf(problem,interpretation,element,type); | ||
12904 | } | ||
12905 | private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12906 | find interpretation(problem,interpretation); | ||
12907 | PartialInterpretation.scopes(interpretation,scope); | ||
12908 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12909 | Scope.maxNewElements(scope,0); | ||
12910 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12911 | Type.name(type,"FunctionType enum"); | ||
12912 | } | ||
12913 | |||
12914 | /** | ||
12915 | * An element may be an instance of type "FunctionType enum". | ||
12916 | */ | ||
12917 | private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12918 | { find mustInstanceOfFunctionType_enum(problem,interpretation,element); } | ||
12919 | /** | ||
12920 | * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
12921 | */ | ||
12922 | private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12923 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
12924 | find directInstanceOf(problem,interpretation,element,type); | ||
12925 | } | ||
12926 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12927 | find interpretation(problem,interpretation); | ||
12928 | PartialInterpretation.scopes(interpretation,scope); | ||
12929 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12930 | Scope.maxNewElements(scope,0); | ||
12931 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12932 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
12933 | } | ||
12934 | |||
12935 | /** | ||
12936 | * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
12937 | */ | ||
12938 | private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12939 | { find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } | ||
12940 | /** | ||
12941 | * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
12942 | */ | ||
12943 | private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12944 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
12945 | find directInstanceOf(problem,interpretation,element,type); | ||
12946 | } | ||
12947 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12948 | find interpretation(problem,interpretation); | ||
12949 | PartialInterpretation.scopes(interpretation,scope); | ||
12950 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12951 | Scope.maxNewElements(scope,0); | ||
12952 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12953 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
12954 | } | ||
12955 | |||
12956 | /** | ||
12957 | * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
12958 | */ | ||
12959 | private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12960 | { | ||
12961 | find interpretation(problem,interpretation); | ||
12962 | PartialInterpretation.newElements(interpretation,element); | ||
12963 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12964 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
12965 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12966 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
12967 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12968 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
12969 | neg find isPrimitive(element); | ||
12970 | } or { | ||
12971 | find interpretation(problem,interpretation); | ||
12972 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12973 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
12974 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
12975 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
12976 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
12977 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
12978 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
12979 | neg find isPrimitive(element); | ||
12980 | } or | ||
12981 | { find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } | ||
12982 | |||
12983 | ////////// | ||
12984 | // 1.2 Relation Declaration Indexers | ||
12985 | ////////// | ||
12986 | /** | ||
12987 | * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) | ||
12988 | */ | ||
12989 | private pattern mustInRelationinterface_reference_FunctionalElement( | ||
12990 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12991 | source: DefinedElement, target:DefinedElement) | ||
12992 | { | ||
12993 | find interpretation(problem,interpretation); | ||
12994 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
12995 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); | ||
12996 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
12997 | BinaryElementRelationLink.param1(link,source); | ||
12998 | BinaryElementRelationLink.param2(link,target); | ||
12999 | } | ||
13000 | /** | ||
13001 | * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) | ||
13002 | */ | ||
13003 | private pattern mayInRelationinterface_reference_FunctionalElement( | ||
13004 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13005 | source: DefinedElement, target:DefinedElement) | ||
13006 | { | ||
13007 | find interpretation(problem,interpretation); | ||
13008 | // The two endpoint of the link have to exist | ||
13009 | find mayExist(problem, interpretation, source); | ||
13010 | find mayExist(problem, interpretation, target); | ||
13011 | // Type consistency | ||
13012 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
13013 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
13014 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
13015 | // the upper bound of the multiplicity should be considered. | ||
13016 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); | ||
13017 | check(numberOfExistingReferences < 1); | ||
13018 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
13019 | // the upper bound of the opposite reference multiplicity should be considered. | ||
13020 | numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); | ||
13021 | check(numberOfExistingOppositeReferences < 1); | ||
13022 | // The reference is containment, then a new reference cannot be create if: | ||
13023 | // 1. Multiple parents | ||
13024 | neg find mustContains4(problem,interpretation,_,target); | ||
13025 | // 2. Circle in the containment hierarchy | ||
13026 | neg find mustTransitiveContains(source,target); | ||
13027 | } or { | ||
13028 | find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); | ||
13029 | } | ||
13030 | /** | ||
13031 | * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) | ||
13032 | */ | ||
13033 | private pattern mustInRelationmodel_reference_FunctionalElement( | ||
13034 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13035 | source: DefinedElement, target:DefinedElement) | ||
13036 | { | ||
13037 | find interpretation(problem,interpretation); | ||
13038 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
13039 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
13040 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
13041 | BinaryElementRelationLink.param1(link,source); | ||
13042 | BinaryElementRelationLink.param2(link,target); | ||
13043 | } | ||
13044 | /** | ||
13045 | * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target) | ||
13046 | */ | ||
13047 | private pattern mayInRelationmodel_reference_FunctionalElement( | ||
13048 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13049 | source: DefinedElement, target:DefinedElement) | ||
13050 | { | ||
13051 | find interpretation(problem,interpretation); | ||
13052 | // The two endpoint of the link have to exist | ||
13053 | find mayExist(problem, interpretation, source); | ||
13054 | find mayExist(problem, interpretation, target); | ||
13055 | // Type consistency | ||
13056 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
13057 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target); | ||
13058 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
13059 | // the upper bound of the multiplicity should be considered. | ||
13060 | numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_); | ||
13061 | check(numberOfExistingReferences < 1); | ||
13062 | } or { | ||
13063 | find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target); | ||
13064 | } | ||
13065 | /** | ||
13066 | * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) | ||
13067 | */ | ||
13068 | private pattern mustInRelationparent_reference_FunctionalElement( | ||
13069 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13070 | source: DefinedElement, target:DefinedElement) | ||
13071 | { | ||
13072 | find interpretation(problem,interpretation); | ||
13073 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
13074 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); | ||
13075 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
13076 | BinaryElementRelationLink.param1(link,source); | ||
13077 | BinaryElementRelationLink.param2(link,target); | ||
13078 | } | ||
13079 | /** | ||
13080 | * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) | ||
13081 | */ | ||
13082 | private pattern mayInRelationparent_reference_FunctionalElement( | ||
13083 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13084 | source: DefinedElement, target:DefinedElement) | ||
13085 | { | ||
13086 | find interpretation(problem,interpretation); | ||
13087 | // The two endpoint of the link have to exist | ||
13088 | find mayExist(problem, interpretation, source); | ||
13089 | find mayExist(problem, interpretation, target); | ||
13090 | // Type consistency | ||
13091 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
13092 | find mayInstanceOfFunction_class(problem,interpretation,target); | ||
13093 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
13094 | // the upper bound of the multiplicity should be considered. | ||
13095 | numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); | ||
13096 | check(numberOfExistingReferences < 1); | ||
13097 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
13098 | // 1. Multiple parents | ||
13099 | neg find mustContains4(problem,interpretation,source,_); | ||
13100 | // 2. Circle in the containment hierarchy | ||
13101 | neg find mustTransitiveContains(source,target); | ||
13102 | } or { | ||
13103 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); | ||
13104 | } | ||
13105 | /** | ||
13106 | * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) | ||
13107 | */ | ||
13108 | private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( | ||
13109 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13110 | source: DefinedElement, target:DefinedElement) | ||
13111 | { | ||
13112 | find interpretation(problem,interpretation); | ||
13113 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
13114 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
13115 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
13116 | BinaryElementRelationLink.param1(link,source); | ||
13117 | BinaryElementRelationLink.param2(link,target); | ||
13118 | } | ||
13119 | /** | ||
13120 | * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) | ||
13121 | */ | ||
13122 | private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( | ||
13123 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13124 | source: DefinedElement, target:DefinedElement) | ||
13125 | { | ||
13126 | find interpretation(problem,interpretation); | ||
13127 | // The two endpoint of the link have to exist | ||
13128 | find mayExist(problem, interpretation, source); | ||
13129 | find mayExist(problem, interpretation, target); | ||
13130 | // Type consistency | ||
13131 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); | ||
13132 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
13133 | // The reference is containment, then a new reference cannot be create if: | ||
13134 | // 1. Multiple parents | ||
13135 | neg find mustContains4(problem,interpretation,_,target); | ||
13136 | // 2. Circle in the containment hierarchy | ||
13137 | neg find mustTransitiveContains(source,target); | ||
13138 | } or { | ||
13139 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); | ||
13140 | } | ||
13141 | /** | ||
13142 | * Matcher for detecting tuples t where []subElements reference Function(source,target) | ||
13143 | */ | ||
13144 | private pattern mustInRelationsubElements_reference_Function( | ||
13145 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13146 | source: DefinedElement, target:DefinedElement) | ||
13147 | { | ||
13148 | find interpretation(problem,interpretation); | ||
13149 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
13150 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); | ||
13151 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
13152 | BinaryElementRelationLink.param1(link,source); | ||
13153 | BinaryElementRelationLink.param2(link,target); | ||
13154 | } | ||
13155 | /** | ||
13156 | * Matcher for detecting tuples t where <>subElements reference Function(source,target) | ||
13157 | */ | ||
13158 | private pattern mayInRelationsubElements_reference_Function( | ||
13159 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13160 | source: DefinedElement, target:DefinedElement) | ||
13161 | { | ||
13162 | find interpretation(problem,interpretation); | ||
13163 | // The two endpoint of the link have to exist | ||
13164 | find mayExist(problem, interpretation, source); | ||
13165 | find mayExist(problem, interpretation, target); | ||
13166 | // Type consistency | ||
13167 | find mayInstanceOfFunction_class(problem,interpretation,source); | ||
13168 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
13169 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
13170 | // the upper bound of the opposite reference multiplicity should be considered. | ||
13171 | numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); | ||
13172 | check(numberOfExistingOppositeReferences < 1); | ||
13173 | // The reference is containment, then a new reference cannot be create if: | ||
13174 | // 1. Multiple parents | ||
13175 | neg find mustContains4(problem,interpretation,_,target); | ||
13176 | // 2. Circle in the containment hierarchy | ||
13177 | neg find mustTransitiveContains(source,target); | ||
13178 | } or { | ||
13179 | find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); | ||
13180 | } | ||
13181 | /** | ||
13182 | * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) | ||
13183 | */ | ||
13184 | private pattern mustInRelationdata_reference_FAMTerminator( | ||
13185 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13186 | source: DefinedElement, target:DefinedElement) | ||
13187 | { | ||
13188 | find interpretation(problem,interpretation); | ||
13189 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
13190 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); | ||
13191 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
13192 | BinaryElementRelationLink.param1(link,source); | ||
13193 | BinaryElementRelationLink.param2(link,target); | ||
13194 | } | ||
13195 | /** | ||
13196 | * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) | ||
13197 | */ | ||
13198 | private pattern mayInRelationdata_reference_FAMTerminator( | ||
13199 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13200 | source: DefinedElement, target:DefinedElement) | ||
13201 | { | ||
13202 | find interpretation(problem,interpretation); | ||
13203 | // The two endpoint of the link have to exist | ||
13204 | find mayExist(problem, interpretation, source); | ||
13205 | find mayExist(problem, interpretation, target); | ||
13206 | // Type consistency | ||
13207 | find mayInstanceOfFAMTerminator_class(problem,interpretation,source); | ||
13208 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
13209 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
13210 | // the upper bound of the multiplicity should be considered. | ||
13211 | numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); | ||
13212 | check(numberOfExistingReferences < 1); | ||
13213 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
13214 | // the upper bound of the opposite reference multiplicity should be considered. | ||
13215 | numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); | ||
13216 | check(numberOfExistingOppositeReferences < 1); | ||
13217 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
13218 | // 1. Multiple parents | ||
13219 | neg find mustContains4(problem,interpretation,source,_); | ||
13220 | // 2. Circle in the containment hierarchy | ||
13221 | neg find mustTransitiveContains(source,target); | ||
13222 | } or { | ||
13223 | find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); | ||
13224 | } | ||
13225 | /** | ||
13226 | * Matcher for detecting tuples t where []from reference InformationLink(source,target) | ||
13227 | */ | ||
13228 | private pattern mustInRelationfrom_reference_InformationLink( | ||
13229 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13230 | source: DefinedElement, target:DefinedElement) | ||
13231 | { | ||
13232 | find interpretation(problem,interpretation); | ||
13233 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
13234 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); | ||
13235 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
13236 | BinaryElementRelationLink.param1(link,source); | ||
13237 | BinaryElementRelationLink.param2(link,target); | ||
13238 | } | ||
13239 | /** | ||
13240 | * Matcher for detecting tuples t where <>from reference InformationLink(source,target) | ||
13241 | */ | ||
13242 | private pattern mayInRelationfrom_reference_InformationLink( | ||
13243 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13244 | source: DefinedElement, target:DefinedElement) | ||
13245 | { | ||
13246 | find interpretation(problem,interpretation); | ||
13247 | // The two endpoint of the link have to exist | ||
13248 | find mayExist(problem, interpretation, source); | ||
13249 | find mayExist(problem, interpretation, target); | ||
13250 | // Type consistency | ||
13251 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
13252 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); | ||
13253 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
13254 | // the upper bound of the multiplicity should be considered. | ||
13255 | numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); | ||
13256 | check(numberOfExistingReferences < 1); | ||
13257 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
13258 | // 1. Multiple parents | ||
13259 | neg find mustContains4(problem,interpretation,source,_); | ||
13260 | // 2. Circle in the containment hierarchy | ||
13261 | neg find mustTransitiveContains(source,target); | ||
13262 | } or { | ||
13263 | find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); | ||
13264 | } | ||
13265 | /** | ||
13266 | * Matcher for detecting tuples t where []to reference InformationLink(source,target) | ||
13267 | */ | ||
13268 | private pattern mustInRelationto_reference_InformationLink( | ||
13269 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13270 | source: DefinedElement, target:DefinedElement) | ||
13271 | { | ||
13272 | find interpretation(problem,interpretation); | ||
13273 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
13274 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
13275 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
13276 | BinaryElementRelationLink.param1(link,source); | ||
13277 | BinaryElementRelationLink.param2(link,target); | ||
13278 | } | ||
13279 | /** | ||
13280 | * Matcher for detecting tuples t where <>to reference InformationLink(source,target) | ||
13281 | */ | ||
13282 | private pattern mayInRelationto_reference_InformationLink( | ||
13283 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13284 | source: DefinedElement, target:DefinedElement) | ||
13285 | { | ||
13286 | find interpretation(problem,interpretation); | ||
13287 | // The two endpoint of the link have to exist | ||
13288 | find mayExist(problem, interpretation, source); | ||
13289 | find mayExist(problem, interpretation, target); | ||
13290 | // Type consistency | ||
13291 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
13292 | find mayInstanceOfFunctionalInput_class(problem,interpretation,target); | ||
13293 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
13294 | // the upper bound of the multiplicity should be considered. | ||
13295 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); | ||
13296 | check(numberOfExistingReferences < 1); | ||
13297 | } or { | ||
13298 | find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); | ||
13299 | } | ||
13300 | /** | ||
13301 | * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) | ||
13302 | */ | ||
13303 | private pattern mustInRelationdata_reference_FunctionalInterface( | ||
13304 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13305 | source: DefinedElement, target:DefinedElement) | ||
13306 | { | ||
13307 | find interpretation(problem,interpretation); | ||
13308 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
13309 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); | ||
13310 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
13311 | BinaryElementRelationLink.param1(link,source); | ||
13312 | BinaryElementRelationLink.param2(link,target); | ||
13313 | } | ||
13314 | /** | ||
13315 | * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) | ||
13316 | */ | ||
13317 | private pattern mayInRelationdata_reference_FunctionalInterface( | ||
13318 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13319 | source: DefinedElement, target:DefinedElement) | ||
13320 | { | ||
13321 | find interpretation(problem,interpretation); | ||
13322 | // The two endpoint of the link have to exist | ||
13323 | find mayExist(problem, interpretation, source); | ||
13324 | find mayExist(problem, interpretation, target); | ||
13325 | // Type consistency | ||
13326 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
13327 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
13328 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
13329 | // the upper bound of the opposite reference multiplicity should be considered. | ||
13330 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); | ||
13331 | check(numberOfExistingOppositeReferences < 1); | ||
13332 | // The reference is containment, then a new reference cannot be create if: | ||
13333 | // 1. Multiple parents | ||
13334 | neg find mustContains4(problem,interpretation,_,target); | ||
13335 | // 2. Circle in the containment hierarchy | ||
13336 | neg find mustTransitiveContains(source,target); | ||
13337 | } or { | ||
13338 | find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); | ||
13339 | } | ||
13340 | /** | ||
13341 | * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) | ||
13342 | */ | ||
13343 | private pattern mustInRelationelement_reference_FunctionalInterface( | ||
13344 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13345 | source: DefinedElement, target:DefinedElement) | ||
13346 | { | ||
13347 | find interpretation(problem,interpretation); | ||
13348 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
13349 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); | ||
13350 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
13351 | BinaryElementRelationLink.param1(link,source); | ||
13352 | BinaryElementRelationLink.param2(link,target); | ||
13353 | } | ||
13354 | /** | ||
13355 | * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) | ||
13356 | */ | ||
13357 | private pattern mayInRelationelement_reference_FunctionalInterface( | ||
13358 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13359 | source: DefinedElement, target:DefinedElement) | ||
13360 | { | ||
13361 | find interpretation(problem,interpretation); | ||
13362 | // The two endpoint of the link have to exist | ||
13363 | find mayExist(problem, interpretation, source); | ||
13364 | find mayExist(problem, interpretation, target); | ||
13365 | // Type consistency | ||
13366 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
13367 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
13368 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
13369 | // the upper bound of the multiplicity should be considered. | ||
13370 | numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); | ||
13371 | check(numberOfExistingReferences < 1); | ||
13372 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
13373 | // the upper bound of the opposite reference multiplicity should be considered. | ||
13374 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); | ||
13375 | check(numberOfExistingOppositeReferences < 1); | ||
13376 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
13377 | // 1. Multiple parents | ||
13378 | neg find mustContains4(problem,interpretation,source,_); | ||
13379 | // 2. Circle in the containment hierarchy | ||
13380 | neg find mustTransitiveContains(source,target); | ||
13381 | } or { | ||
13382 | find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); | ||
13383 | } | ||
13384 | /** | ||
13385 | * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) | ||
13386 | */ | ||
13387 | private pattern mustInRelationIncomingLinks_reference_FunctionalInput( | ||
13388 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13389 | source: DefinedElement, target:DefinedElement) | ||
13390 | { | ||
13391 | find interpretation(problem,interpretation); | ||
13392 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
13393 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
13394 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
13395 | BinaryElementRelationLink.param1(link,source); | ||
13396 | BinaryElementRelationLink.param2(link,target); | ||
13397 | } | ||
13398 | /** | ||
13399 | * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) | ||
13400 | */ | ||
13401 | private pattern mayInRelationIncomingLinks_reference_FunctionalInput( | ||
13402 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13403 | source: DefinedElement, target:DefinedElement) | ||
13404 | { | ||
13405 | find interpretation(problem,interpretation); | ||
13406 | // The two endpoint of the link have to exist | ||
13407 | find mayExist(problem, interpretation, source); | ||
13408 | find mayExist(problem, interpretation, target); | ||
13409 | // Type consistency | ||
13410 | find mayInstanceOfFunctionalInput_class(problem,interpretation,source); | ||
13411 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
13412 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
13413 | // the upper bound of the opposite reference multiplicity should be considered. | ||
13414 | numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); | ||
13415 | check(numberOfExistingOppositeReferences < 1); | ||
13416 | } or { | ||
13417 | find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); | ||
13418 | } | ||
13419 | /** | ||
13420 | * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) | ||
13421 | */ | ||
13422 | private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( | ||
13423 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13424 | source: DefinedElement, target:DefinedElement) | ||
13425 | { | ||
13426 | find interpretation(problem,interpretation); | ||
13427 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
13428 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); | ||
13429 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
13430 | BinaryElementRelationLink.param1(link,source); | ||
13431 | BinaryElementRelationLink.param2(link,target); | ||
13432 | } | ||
13433 | /** | ||
13434 | * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) | ||
13435 | */ | ||
13436 | private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( | ||
13437 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13438 | source: DefinedElement, target:DefinedElement) | ||
13439 | { | ||
13440 | find interpretation(problem,interpretation); | ||
13441 | // The two endpoint of the link have to exist | ||
13442 | find mayExist(problem, interpretation, source); | ||
13443 | find mayExist(problem, interpretation, target); | ||
13444 | // Type consistency | ||
13445 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); | ||
13446 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
13447 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
13448 | // the upper bound of the opposite reference multiplicity should be considered. | ||
13449 | numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); | ||
13450 | check(numberOfExistingOppositeReferences < 1); | ||
13451 | // The reference is containment, then a new reference cannot be create if: | ||
13452 | // 1. Multiple parents | ||
13453 | neg find mustContains4(problem,interpretation,_,target); | ||
13454 | // 2. Circle in the containment hierarchy | ||
13455 | neg find mustTransitiveContains(source,target); | ||
13456 | } or { | ||
13457 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); | ||
13458 | } | ||
13459 | /** | ||
13460 | * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) | ||
13461 | */ | ||
13462 | private pattern mustInRelationterminator_reference_FunctionalData( | ||
13463 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13464 | source: DefinedElement, target:DefinedElement) | ||
13465 | { | ||
13466 | find interpretation(problem,interpretation); | ||
13467 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
13468 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); | ||
13469 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
13470 | BinaryElementRelationLink.param1(link,source); | ||
13471 | BinaryElementRelationLink.param2(link,target); | ||
13472 | } | ||
13473 | /** | ||
13474 | * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) | ||
13475 | */ | ||
13476 | private pattern mayInRelationterminator_reference_FunctionalData( | ||
13477 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13478 | source: DefinedElement, target:DefinedElement) | ||
13479 | { | ||
13480 | find interpretation(problem,interpretation); | ||
13481 | // The two endpoint of the link have to exist | ||
13482 | find mayExist(problem, interpretation, source); | ||
13483 | find mayExist(problem, interpretation, target); | ||
13484 | // Type consistency | ||
13485 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
13486 | find mayInstanceOfFAMTerminator_class(problem,interpretation,target); | ||
13487 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
13488 | // the upper bound of the multiplicity should be considered. | ||
13489 | numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); | ||
13490 | check(numberOfExistingReferences < 1); | ||
13491 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
13492 | // the upper bound of the opposite reference multiplicity should be considered. | ||
13493 | numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); | ||
13494 | check(numberOfExistingOppositeReferences < 1); | ||
13495 | // The reference is containment, then a new reference cannot be create if: | ||
13496 | // 1. Multiple parents | ||
13497 | neg find mustContains4(problem,interpretation,_,target); | ||
13498 | // 2. Circle in the containment hierarchy | ||
13499 | neg find mustTransitiveContains(source,target); | ||
13500 | } or { | ||
13501 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); | ||
13502 | } | ||
13503 | /** | ||
13504 | * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) | ||
13505 | */ | ||
13506 | private pattern mustInRelationinterface_reference_FunctionalData( | ||
13507 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13508 | source: DefinedElement, target:DefinedElement) | ||
13509 | { | ||
13510 | find interpretation(problem,interpretation); | ||
13511 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
13512 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); | ||
13513 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
13514 | BinaryElementRelationLink.param1(link,source); | ||
13515 | BinaryElementRelationLink.param2(link,target); | ||
13516 | } | ||
13517 | /** | ||
13518 | * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) | ||
13519 | */ | ||
13520 | private pattern mayInRelationinterface_reference_FunctionalData( | ||
13521 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13522 | source: DefinedElement, target:DefinedElement) | ||
13523 | { | ||
13524 | find interpretation(problem,interpretation); | ||
13525 | // The two endpoint of the link have to exist | ||
13526 | find mayExist(problem, interpretation, source); | ||
13527 | find mayExist(problem, interpretation, target); | ||
13528 | // Type consistency | ||
13529 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
13530 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
13531 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
13532 | // the upper bound of the multiplicity should be considered. | ||
13533 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); | ||
13534 | check(numberOfExistingReferences < 1); | ||
13535 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
13536 | // 1. Multiple parents | ||
13537 | neg find mustContains4(problem,interpretation,source,_); | ||
13538 | // 2. Circle in the containment hierarchy | ||
13539 | neg find mustTransitiveContains(source,target); | ||
13540 | } or { | ||
13541 | find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); | ||
13542 | } | ||
13543 | /** | ||
13544 | * Matcher for detecting tuples t where []type attribute Function(source,target) | ||
13545 | */ | ||
13546 | private pattern mustInRelationtype_attribute_Function( | ||
13547 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13548 | source: DefinedElement, target:DefinedElement) | ||
13549 | { | ||
13550 | find interpretation(problem,interpretation); | ||
13551 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
13552 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
13553 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
13554 | BinaryElementRelationLink.param1(link,source); | ||
13555 | BinaryElementRelationLink.param2(link,target); | ||
13556 | } | ||
13557 | /** | ||
13558 | * Matcher for detecting tuples t where <>type attribute Function(source,target) | ||
13559 | */ | ||
13560 | private pattern mayInRelationtype_attribute_Function( | ||
13561 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13562 | source: DefinedElement, target:DefinedElement) | ||
13563 | { | ||
13564 | find interpretation(problem,interpretation); | ||
13565 | // The two endpoint of the link have to exist | ||
13566 | find mayExist(problem, interpretation, source); | ||
13567 | find mayExist(problem, interpretation, target); | ||
13568 | // Type consistency | ||
13569 | find mayInstanceOfFunction_class(problem,interpretation,source); | ||
13570 | find mayInstanceOfFunctionType_enum(problem,interpretation,target); | ||
13571 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
13572 | // the upper bound of the multiplicity should be considered. | ||
13573 | numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_); | ||
13574 | check(numberOfExistingReferences < 1); | ||
13575 | } or { | ||
13576 | find mustInRelationtype_attribute_Function(problem,interpretation,source,target); | ||
13577 | } | ||
13578 | |||
13579 | ////////// | ||
13580 | // 1.3 Relation Definition Indexers | ||
13581 | ////////// | ||
13582 | |||
13583 | ////////// | ||
13584 | // 1.4 Containment Indexer | ||
13585 | ////////// | ||
13586 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
13587 | find mustContains4(_,_,source,target); | ||
13588 | } | ||
13589 | |||
13590 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
13591 | source: DefinedElement, target: DefinedElement) | ||
13592 | { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or | ||
13593 | |||
13594 | { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or | ||
13595 | |||
13596 | { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or | ||
13597 | |||
13598 | { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or | ||
13599 | |||
13600 | { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or | ||
13601 | |||
13602 | { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } | ||
13603 | |||
13604 | private pattern mustTransitiveContains(source,target) { | ||
13605 | find mustContains2+(source,target); | ||
13606 | } | ||
13607 | |||
13608 | ////////// | ||
13609 | // 2. Invalidation Indexers | ||
13610 | ////////// | ||
13611 | // 2.1 Invalidated by WF Queries | ||
13612 | ////////// | ||
13613 | |||
13614 | ////////// | ||
13615 | // 3. Unfinishedness Indexers | ||
13616 | ////////// | ||
13617 | // 3.1 Unfinishedness Measured by Multiplicity | ||
13618 | ////////// | ||
13619 | pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
13620 | find interpretation(problem,interpretation); | ||
13621 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
13622 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
13623 | find mustInstanceOfFunctionalElement_class(problem,interpretation,object); | ||
13624 | numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_); | ||
13625 | check(numberOfExistingReferences < 1); | ||
13626 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
13627 | } | ||
13628 | pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
13629 | find interpretation(problem,interpretation); | ||
13630 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
13631 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
13632 | find mustInstanceOfInformationLink_class(problem,interpretation,object); | ||
13633 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); | ||
13634 | check(numberOfExistingReferences < 1); | ||
13635 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
13636 | } | ||
13637 | pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
13638 | find interpretation(problem,interpretation); | ||
13639 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
13640 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
13641 | find mustInstanceOfFunction_class(problem,interpretation,object); | ||
13642 | numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_); | ||
13643 | check(numberOfExistingReferences < 1); | ||
13644 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
13645 | } | ||
13646 | |||
13647 | ////////// | ||
13648 | // 3.2 Unfinishedness Measured by WF Queries | ||
13649 | ////////// | ||
13650 | |||
13651 | ////////// | ||
13652 | // 4. Refinement Indexers | ||
13653 | ////////// | ||
13654 | // 4.1 Object constructors | ||
13655 | ////////// | ||
13656 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
13657 | { | ||
13658 | find interpretation(problem,interpretation); | ||
13659 | find mustInstanceOfFAMTerminator_class(problem,interpretation,root); | ||
13660 | find mustExist(problem, interpretation, root); | ||
13661 | }or{ | ||
13662 | find interpretation(problem,interpretation); | ||
13663 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); | ||
13664 | find mustExist(problem, interpretation, root); | ||
13665 | }or{ | ||
13666 | find interpretation(problem,interpretation); | ||
13667 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); | ||
13668 | find mustExist(problem, interpretation, root); | ||
13669 | }or{ | ||
13670 | find interpretation(problem,interpretation); | ||
13671 | find mustInstanceOfFunction_class(problem,interpretation,root); | ||
13672 | find mustExist(problem, interpretation, root); | ||
13673 | }or{ | ||
13674 | find interpretation(problem,interpretation); | ||
13675 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); | ||
13676 | find mustExist(problem, interpretation, root); | ||
13677 | }or{ | ||
13678 | find interpretation(problem,interpretation); | ||
13679 | find mustInstanceOfFunctionalElement_class(problem,interpretation,root); | ||
13680 | find mustExist(problem, interpretation, root); | ||
13681 | }or{ | ||
13682 | find interpretation(problem,interpretation); | ||
13683 | find mustInstanceOfInformationLink_class(problem,interpretation,root); | ||
13684 | find mustExist(problem, interpretation, root); | ||
13685 | }or{ | ||
13686 | find interpretation(problem,interpretation); | ||
13687 | find mustInstanceOfFunctionalInput_class(problem,interpretation,root); | ||
13688 | find mustExist(problem, interpretation, root); | ||
13689 | }or{ | ||
13690 | find interpretation(problem,interpretation); | ||
13691 | find mustInstanceOfFunctionalData_class(problem,interpretation,root); | ||
13692 | find mustExist(problem, interpretation, root); | ||
13693 | }or{ | ||
13694 | find interpretation(problem,interpretation); | ||
13695 | find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); | ||
13696 | find mustExist(problem, interpretation, root); | ||
13697 | }or{ | ||
13698 | find interpretation(problem,interpretation); | ||
13699 | find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); | ||
13700 | find mustExist(problem, interpretation, root); | ||
13701 | } | ||
13702 | pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
13703 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13704 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
13705 | container:DefinedElement) | ||
13706 | { | ||
13707 | find interpretation(problem,interpretation); | ||
13708 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
13709 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
13710 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
13711 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
13712 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
13713 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
13714 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
13715 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
13716 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
13717 | find mustExist(problem, interpretation, container); | ||
13718 | neg find mustExist(problem, interpretation, newObject); | ||
13719 | } | ||
13720 | pattern createObject_FunctionalInput_class( | ||
13721 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13722 | typeInterpretation:PartialComplexTypeInterpretation) | ||
13723 | { | ||
13724 | find interpretation(problem,interpretation); | ||
13725 | neg find hasElementInContainment(problem,interpretation); | ||
13726 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
13727 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
13728 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
13729 | find mayExist(problem, interpretation, newObject); | ||
13730 | neg find mustExist(problem, interpretation, newObject); | ||
13731 | } | ||
13732 | pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
13733 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13734 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
13735 | container:DefinedElement) | ||
13736 | { | ||
13737 | find interpretation(problem,interpretation); | ||
13738 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
13739 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
13740 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
13741 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
13742 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
13743 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
13744 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
13745 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
13746 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
13747 | find mustExist(problem, interpretation, container); | ||
13748 | neg find mustExist(problem, interpretation, newObject); | ||
13749 | } | ||
13750 | pattern createObject_FunctionalOutput_class( | ||
13751 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13752 | typeInterpretation:PartialComplexTypeInterpretation) | ||
13753 | { | ||
13754 | find interpretation(problem,interpretation); | ||
13755 | neg find hasElementInContainment(problem,interpretation); | ||
13756 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
13757 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
13758 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
13759 | find mayExist(problem, interpretation, newObject); | ||
13760 | neg find mustExist(problem, interpretation, newObject); | ||
13761 | } | ||
13762 | pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( | ||
13763 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13764 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
13765 | container:DefinedElement) | ||
13766 | { | ||
13767 | find interpretation(problem,interpretation); | ||
13768 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
13769 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
13770 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
13771 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); | ||
13772 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
13773 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); | ||
13774 | find mustInstanceOfFunctionalData_class(problem,interpretation,container); | ||
13775 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
13776 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); | ||
13777 | find mustExist(problem, interpretation, container); | ||
13778 | neg find mustExist(problem, interpretation, newObject); | ||
13779 | } | ||
13780 | pattern createObject_FAMTerminator_class( | ||
13781 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13782 | typeInterpretation:PartialComplexTypeInterpretation) | ||
13783 | { | ||
13784 | find interpretation(problem,interpretation); | ||
13785 | neg find hasElementInContainment(problem,interpretation); | ||
13786 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
13787 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
13788 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
13789 | find mayExist(problem, interpretation, newObject); | ||
13790 | neg find mustExist(problem, interpretation, newObject); | ||
13791 | } | ||
13792 | pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( | ||
13793 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13794 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
13795 | container:DefinedElement) | ||
13796 | { | ||
13797 | find interpretation(problem,interpretation); | ||
13798 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
13799 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
13800 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
13801 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); | ||
13802 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
13803 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); | ||
13804 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); | ||
13805 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
13806 | find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); | ||
13807 | find mustExist(problem, interpretation, container); | ||
13808 | neg find mustExist(problem, interpretation, newObject); | ||
13809 | } | ||
13810 | pattern createObject_InformationLink_class( | ||
13811 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13812 | typeInterpretation:PartialComplexTypeInterpretation) | ||
13813 | { | ||
13814 | find interpretation(problem,interpretation); | ||
13815 | neg find hasElementInContainment(problem,interpretation); | ||
13816 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
13817 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
13818 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
13819 | find mayExist(problem, interpretation, newObject); | ||
13820 | neg find mustExist(problem, interpretation, newObject); | ||
13821 | } | ||
13822 | pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( | ||
13823 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13824 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
13825 | container:DefinedElement) | ||
13826 | { | ||
13827 | find interpretation(problem,interpretation); | ||
13828 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
13829 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
13830 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
13831 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
13832 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); | ||
13833 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
13834 | find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); | ||
13835 | find mustExist(problem, interpretation, container); | ||
13836 | neg find mustExist(problem, interpretation, newObject); | ||
13837 | } | ||
13838 | pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( | ||
13839 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13840 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
13841 | container:DefinedElement) | ||
13842 | { | ||
13843 | find interpretation(problem,interpretation); | ||
13844 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
13845 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
13846 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
13847 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); | ||
13848 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
13849 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); | ||
13850 | find mustInstanceOfFunction_class(problem,interpretation,container); | ||
13851 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
13852 | find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); | ||
13853 | find mustExist(problem, interpretation, container); | ||
13854 | neg find mustExist(problem, interpretation, newObject); | ||
13855 | } | ||
13856 | pattern createObject_Function_class( | ||
13857 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13858 | typeInterpretation:PartialComplexTypeInterpretation) | ||
13859 | { | ||
13860 | find interpretation(problem,interpretation); | ||
13861 | neg find hasElementInContainment(problem,interpretation); | ||
13862 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
13863 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
13864 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
13865 | find mayExist(problem, interpretation, newObject); | ||
13866 | neg find mustExist(problem, interpretation, newObject); | ||
13867 | } | ||
13868 | pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( | ||
13869 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13870 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
13871 | container:DefinedElement) | ||
13872 | { | ||
13873 | find interpretation(problem,interpretation); | ||
13874 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
13875 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
13876 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
13877 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); | ||
13878 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
13879 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); | ||
13880 | find mustInstanceOfFunctionalElement_class(problem,interpretation,container); | ||
13881 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
13882 | find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); | ||
13883 | find mustExist(problem, interpretation, container); | ||
13884 | neg find mustExist(problem, interpretation, newObject); | ||
13885 | } | ||
13886 | pattern createObject_FunctionalInterface_class( | ||
13887 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13888 | typeInterpretation:PartialComplexTypeInterpretation) | ||
13889 | { | ||
13890 | find interpretation(problem,interpretation); | ||
13891 | neg find hasElementInContainment(problem,interpretation); | ||
13892 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
13893 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
13894 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
13895 | find mayExist(problem, interpretation, newObject); | ||
13896 | neg find mustExist(problem, interpretation, newObject); | ||
13897 | } | ||
13898 | pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( | ||
13899 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13900 | typeInterpretation:PartialComplexTypeInterpretation) | ||
13901 | { | ||
13902 | find interpretation(problem,interpretation); | ||
13903 | neg find hasElementInContainment(problem,interpretation); | ||
13904 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
13905 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); | ||
13906 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); | ||
13907 | find mayExist(problem, interpretation, newObject); | ||
13908 | neg find mustExist(problem, interpretation, newObject); | ||
13909 | } | ||
13910 | |||
13911 | ////////// | ||
13912 | // 4.2 Type refinement | ||
13913 | ////////// | ||
13914 | pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
13915 | find interpretation(problem,interpretation); | ||
13916 | PartialInterpretation.newElements(interpretation,element); | ||
13917 | find mayInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
13918 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
13919 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
13920 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
13921 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
13922 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
13923 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
13924 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
13925 | } | ||
13926 | pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
13927 | find interpretation(problem,interpretation); | ||
13928 | PartialInterpretation.newElements(interpretation,element); | ||
13929 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
13930 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
13931 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
13932 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
13933 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
13934 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
13935 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
13936 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
13937 | } | ||
13938 | pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
13939 | find interpretation(problem,interpretation); | ||
13940 | PartialInterpretation.newElements(interpretation,element); | ||
13941 | find mayInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
13942 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
13943 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
13944 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
13945 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
13946 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
13947 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
13948 | } | ||
13949 | pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
13950 | find interpretation(problem,interpretation); | ||
13951 | PartialInterpretation.newElements(interpretation,element); | ||
13952 | find mayInstanceOfInformationLink_class(problem,interpretation,element); | ||
13953 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
13954 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
13955 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
13956 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
13957 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
13958 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
13959 | } | ||
13960 | pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
13961 | find interpretation(problem,interpretation); | ||
13962 | PartialInterpretation.newElements(interpretation,element); | ||
13963 | find mayInstanceOfFunction_class(problem,interpretation,element); | ||
13964 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
13965 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
13966 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
13967 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
13968 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
13969 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
13970 | } | ||
13971 | pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
13972 | find interpretation(problem,interpretation); | ||
13973 | PartialInterpretation.newElements(interpretation,element); | ||
13974 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
13975 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
13976 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
13977 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
13978 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
13979 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
13980 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
13981 | } | ||
13982 | pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
13983 | find interpretation(problem,interpretation); | ||
13984 | PartialInterpretation.newElements(interpretation,element); | ||
13985 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
13986 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
13987 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
13988 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
13989 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
13990 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
13991 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
13992 | } | ||
13993 | |||
13994 | ////////// | ||
13995 | // 4.3 Relation refinement | ||
13996 | ////////// | ||
13997 | pattern refineRelation_model_reference_FunctionalElement( | ||
13998 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13999 | relationIterpretation:PartialRelationInterpretation, | ||
14000 | from: DefinedElement, to: DefinedElement) | ||
14001 | { | ||
14002 | find interpretation(problem,interpretation); | ||
14003 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
14004 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
14005 | find mustExist(problem, interpretation, from); | ||
14006 | find mustExist(problem, interpretation, to); | ||
14007 | find mustInstanceOfFunctionalElement_class(problem,interpretation,from); | ||
14008 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); | ||
14009 | find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
14010 | neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
14011 | } | ||
14012 | pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( | ||
14013 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14014 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
14015 | from: DefinedElement, to: DefinedElement) | ||
14016 | { | ||
14017 | find interpretation(problem,interpretation); | ||
14018 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
14019 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
14020 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
14021 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); | ||
14022 | find mustExist(problem, interpretation, from); | ||
14023 | find mustExist(problem, interpretation, to); | ||
14024 | find mustInstanceOfFunctionalInput_class(problem,interpretation,from); | ||
14025 | find mustInstanceOfInformationLink_class(problem,interpretation,to); | ||
14026 | find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
14027 | neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
14028 | } | ||
14029 | pattern refineRelation_type_attribute_Function( | ||
14030 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14031 | relationIterpretation:PartialRelationInterpretation, | ||
14032 | from: DefinedElement, to: DefinedElement) | ||
14033 | { | ||
14034 | find interpretation(problem,interpretation); | ||
14035 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
14036 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
14037 | find mustExist(problem, interpretation, from); | ||
14038 | find mustExist(problem, interpretation, to); | ||
14039 | find mustInstanceOfFunction_class(problem,interpretation,from); | ||
14040 | find mustInstanceOfFunctionType_enum(problem,interpretation,to); | ||
14041 | find mayInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
14042 | neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
14043 | } | ||
14044 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
14045 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
14046 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
14047 | |||
14048 | ////////// | ||
14049 | // 0. Util | ||
14050 | ////////// | ||
14051 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
14052 | PartialInterpretation.problem(interpretation,problem); | ||
14053 | } | ||
14054 | |||
14055 | ///////////////////////// | ||
14056 | // 0.1 Existence | ||
14057 | ///////////////////////// | ||
14058 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14059 | find interpretation(problem,interpretation); | ||
14060 | LogicProblem.elements(problem,element); | ||
14061 | } or { | ||
14062 | find interpretation(problem,interpretation); | ||
14063 | PartialInterpretation.newElements(interpretation,element); | ||
14064 | } | ||
14065 | |||
14066 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14067 | find mustExist(problem,interpretation,element); | ||
14068 | } or { | ||
14069 | find interpretation(problem,interpretation); | ||
14070 | neg find elementCloseWorld(element); | ||
14071 | PartialInterpretation.openWorldElements(interpretation,element); | ||
14072 | } | ||
14073 | |||
14074 | private pattern elementCloseWorld(element:DefinedElement) { | ||
14075 | PartialInterpretation.openWorldElements(i,element); | ||
14076 | PartialInterpretation.maxNewElements(i,0); | ||
14077 | } or { | ||
14078 | Scope.targetTypeInterpretation(scope,interpretation); | ||
14079 | PartialTypeInterpratation.elements(interpretation,element); | ||
14080 | Scope.maxNewElements(scope,0); | ||
14081 | } | ||
14082 | |||
14083 | //////////////////////// | ||
14084 | // 0.2 Equivalence | ||
14085 | //////////////////////// | ||
14086 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
14087 | find mayExist(problem,interpretation,a); | ||
14088 | find mayExist(problem,interpretation,b); | ||
14089 | a == b; | ||
14090 | } | ||
14091 | |||
14092 | //////////////////////// | ||
14093 | // 0.3 Required Patterns by TypeIndexer | ||
14094 | //////////////////////// | ||
14095 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
14096 | find interpretation(problem,interpretation); | ||
14097 | LogicProblem.types(problem,type); | ||
14098 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14099 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
14100 | } | ||
14101 | |||
14102 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
14103 | find interpretation(problem,interpretation); | ||
14104 | LogicProblem.types(problem,type); | ||
14105 | TypeDefinition.elements(type,element); | ||
14106 | } or { | ||
14107 | find interpretation(problem,interpretation); | ||
14108 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
14109 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
14110 | } | ||
14111 | |||
14112 | private pattern isPrimitive(element: PrimitiveElement) { | ||
14113 | PrimitiveElement(element); | ||
14114 | } | ||
14115 | |||
14116 | ////////// | ||
14117 | // 1. Problem-Specific Base Indexers | ||
14118 | ////////// | ||
14119 | // 1.1 Type Indexers | ||
14120 | ////////// | ||
14121 | // 1.1.1 primitive Type Indexers | ||
14122 | ////////// | ||
14123 | |||
14124 | ////////// | ||
14125 | // 1.1.2 domain-specific Type Indexers | ||
14126 | ////////// | ||
14127 | /** | ||
14128 | * An element must be an instance of type "FunctionalElement class". | ||
14129 | */ | ||
14130 | private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14131 | Type.name(type,"FunctionalElement class"); | ||
14132 | find directInstanceOf(problem,interpretation,element,type); | ||
14133 | } | ||
14134 | private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
14135 | find interpretation(problem,interpretation); | ||
14136 | PartialInterpretation.scopes(interpretation,scope); | ||
14137 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
14138 | Scope.maxNewElements(scope,0); | ||
14139 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
14140 | Type.name(type,"FunctionalElement class"); | ||
14141 | } | ||
14142 | |||
14143 | /** | ||
14144 | * An element may be an instance of type "FunctionalElement class". | ||
14145 | */ | ||
14146 | private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
14147 | { | ||
14148 | find interpretation(problem,interpretation); | ||
14149 | PartialInterpretation.newElements(interpretation,element); | ||
14150 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
14151 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
14152 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
14153 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
14154 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
14155 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
14156 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
14157 | neg find isPrimitive(element); | ||
14158 | } or { | ||
14159 | find interpretation(problem,interpretation); | ||
14160 | PartialInterpretation.openWorldElements(interpretation,element); | ||
14161 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
14162 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
14163 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
14164 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
14165 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
14166 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
14167 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
14168 | neg find isPrimitive(element); | ||
14169 | } or | ||
14170 | { find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } | ||
14171 | /** | ||
14172 | * An element must be an instance of type "FunctionalArchitectureModel class". | ||
14173 | */ | ||
14174 | private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14175 | Type.name(type,"FunctionalArchitectureModel class"); | ||
14176 | find directInstanceOf(problem,interpretation,element,type); | ||
14177 | } | ||
14178 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
14179 | find interpretation(problem,interpretation); | ||
14180 | PartialInterpretation.scopes(interpretation,scope); | ||
14181 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
14182 | Scope.maxNewElements(scope,0); | ||
14183 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
14184 | Type.name(type,"FunctionalArchitectureModel class"); | ||
14185 | } | ||
14186 | |||
14187 | /** | ||
14188 | * An element may be an instance of type "FunctionalArchitectureModel class". | ||
14189 | */ | ||
14190 | private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
14191 | { | ||
14192 | find interpretation(problem,interpretation); | ||
14193 | PartialInterpretation.newElements(interpretation,element); | ||
14194 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
14195 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
14196 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
14197 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
14198 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
14199 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
14200 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
14201 | neg find isPrimitive(element); | ||
14202 | } or { | ||
14203 | find interpretation(problem,interpretation); | ||
14204 | PartialInterpretation.openWorldElements(interpretation,element); | ||
14205 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
14206 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
14207 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
14208 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
14209 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
14210 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
14211 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
14212 | neg find isPrimitive(element); | ||
14213 | } or | ||
14214 | { find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } | ||
14215 | /** | ||
14216 | * An element must be an instance of type "Function class". | ||
14217 | */ | ||
14218 | private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14219 | Type.name(type,"Function class"); | ||
14220 | find directInstanceOf(problem,interpretation,element,type); | ||
14221 | } | ||
14222 | private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
14223 | find interpretation(problem,interpretation); | ||
14224 | PartialInterpretation.scopes(interpretation,scope); | ||
14225 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
14226 | Scope.maxNewElements(scope,0); | ||
14227 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
14228 | Type.name(type,"Function class"); | ||
14229 | } | ||
14230 | |||
14231 | /** | ||
14232 | * An element may be an instance of type "Function class". | ||
14233 | */ | ||
14234 | private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
14235 | { | ||
14236 | find interpretation(problem,interpretation); | ||
14237 | PartialInterpretation.newElements(interpretation,element); | ||
14238 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
14239 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
14240 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
14241 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
14242 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
14243 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
14244 | neg find isPrimitive(element); | ||
14245 | } or { | ||
14246 | find interpretation(problem,interpretation); | ||
14247 | PartialInterpretation.openWorldElements(interpretation,element); | ||
14248 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
14249 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
14250 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
14251 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
14252 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
14253 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
14254 | neg find isPrimitive(element); | ||
14255 | } or | ||
14256 | { find mustInstanceOfFunction_class(problem,interpretation,element); } | ||
14257 | /** | ||
14258 | * An element must be an instance of type "FAMTerminator class". | ||
14259 | */ | ||
14260 | private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14261 | Type.name(type,"FAMTerminator class"); | ||
14262 | find directInstanceOf(problem,interpretation,element,type); | ||
14263 | } | ||
14264 | private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
14265 | find interpretation(problem,interpretation); | ||
14266 | PartialInterpretation.scopes(interpretation,scope); | ||
14267 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
14268 | Scope.maxNewElements(scope,0); | ||
14269 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
14270 | Type.name(type,"FAMTerminator class"); | ||
14271 | } | ||
14272 | |||
14273 | /** | ||
14274 | * An element may be an instance of type "FAMTerminator class". | ||
14275 | */ | ||
14276 | private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
14277 | { | ||
14278 | find interpretation(problem,interpretation); | ||
14279 | PartialInterpretation.newElements(interpretation,element); | ||
14280 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
14281 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
14282 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
14283 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
14284 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
14285 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
14286 | neg find isPrimitive(element); | ||
14287 | } or { | ||
14288 | find interpretation(problem,interpretation); | ||
14289 | PartialInterpretation.openWorldElements(interpretation,element); | ||
14290 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
14291 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
14292 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
14293 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
14294 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
14295 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
14296 | neg find isPrimitive(element); | ||
14297 | } or | ||
14298 | { find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } | ||
14299 | /** | ||
14300 | * An element must be an instance of type "InformationLink class". | ||
14301 | */ | ||
14302 | private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14303 | Type.name(type,"InformationLink class"); | ||
14304 | find directInstanceOf(problem,interpretation,element,type); | ||
14305 | } | ||
14306 | private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
14307 | find interpretation(problem,interpretation); | ||
14308 | PartialInterpretation.scopes(interpretation,scope); | ||
14309 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
14310 | Scope.maxNewElements(scope,0); | ||
14311 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
14312 | Type.name(type,"InformationLink class"); | ||
14313 | } | ||
14314 | |||
14315 | /** | ||
14316 | * An element may be an instance of type "InformationLink class". | ||
14317 | */ | ||
14318 | private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
14319 | { | ||
14320 | find interpretation(problem,interpretation); | ||
14321 | PartialInterpretation.newElements(interpretation,element); | ||
14322 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
14323 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
14324 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
14325 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
14326 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
14327 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
14328 | neg find isPrimitive(element); | ||
14329 | } or { | ||
14330 | find interpretation(problem,interpretation); | ||
14331 | PartialInterpretation.openWorldElements(interpretation,element); | ||
14332 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
14333 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
14334 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
14335 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
14336 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
14337 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
14338 | neg find isPrimitive(element); | ||
14339 | } or | ||
14340 | { find mustInstanceOfInformationLink_class(problem,interpretation,element); } | ||
14341 | /** | ||
14342 | * An element must be an instance of type "FunctionalInterface class". | ||
14343 | */ | ||
14344 | private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14345 | Type.name(type,"FunctionalInterface class"); | ||
14346 | find directInstanceOf(problem,interpretation,element,type); | ||
14347 | } | ||
14348 | private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
14349 | find interpretation(problem,interpretation); | ||
14350 | PartialInterpretation.scopes(interpretation,scope); | ||
14351 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
14352 | Scope.maxNewElements(scope,0); | ||
14353 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
14354 | Type.name(type,"FunctionalInterface class"); | ||
14355 | } | ||
14356 | |||
14357 | /** | ||
14358 | * An element may be an instance of type "FunctionalInterface class". | ||
14359 | */ | ||
14360 | private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
14361 | { | ||
14362 | find interpretation(problem,interpretation); | ||
14363 | PartialInterpretation.newElements(interpretation,element); | ||
14364 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
14365 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
14366 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
14367 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
14368 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
14369 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
14370 | neg find isPrimitive(element); | ||
14371 | } or { | ||
14372 | find interpretation(problem,interpretation); | ||
14373 | PartialInterpretation.openWorldElements(interpretation,element); | ||
14374 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
14375 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
14376 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
14377 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
14378 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
14379 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
14380 | neg find isPrimitive(element); | ||
14381 | } or | ||
14382 | { find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } | ||
14383 | /** | ||
14384 | * An element must be an instance of type "FunctionalInput class". | ||
14385 | */ | ||
14386 | private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14387 | Type.name(type,"FunctionalInput class"); | ||
14388 | find directInstanceOf(problem,interpretation,element,type); | ||
14389 | } | ||
14390 | private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
14391 | find interpretation(problem,interpretation); | ||
14392 | PartialInterpretation.scopes(interpretation,scope); | ||
14393 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
14394 | Scope.maxNewElements(scope,0); | ||
14395 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
14396 | Type.name(type,"FunctionalInput class"); | ||
14397 | } | ||
14398 | |||
14399 | /** | ||
14400 | * An element may be an instance of type "FunctionalInput class". | ||
14401 | */ | ||
14402 | private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
14403 | { | ||
14404 | find interpretation(problem,interpretation); | ||
14405 | PartialInterpretation.newElements(interpretation,element); | ||
14406 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
14407 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
14408 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
14409 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
14410 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
14411 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
14412 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
14413 | neg find isPrimitive(element); | ||
14414 | } or { | ||
14415 | find interpretation(problem,interpretation); | ||
14416 | PartialInterpretation.openWorldElements(interpretation,element); | ||
14417 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
14418 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
14419 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
14420 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
14421 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
14422 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
14423 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
14424 | neg find isPrimitive(element); | ||
14425 | } or | ||
14426 | { find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } | ||
14427 | /** | ||
14428 | * An element must be an instance of type "FunctionalOutput class". | ||
14429 | */ | ||
14430 | private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14431 | Type.name(type,"FunctionalOutput class"); | ||
14432 | find directInstanceOf(problem,interpretation,element,type); | ||
14433 | } | ||
14434 | private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
14435 | find interpretation(problem,interpretation); | ||
14436 | PartialInterpretation.scopes(interpretation,scope); | ||
14437 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
14438 | Scope.maxNewElements(scope,0); | ||
14439 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
14440 | Type.name(type,"FunctionalOutput class"); | ||
14441 | } | ||
14442 | |||
14443 | /** | ||
14444 | * An element may be an instance of type "FunctionalOutput class". | ||
14445 | */ | ||
14446 | private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
14447 | { | ||
14448 | find interpretation(problem,interpretation); | ||
14449 | PartialInterpretation.newElements(interpretation,element); | ||
14450 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
14451 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
14452 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
14453 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
14454 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
14455 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
14456 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
14457 | neg find isPrimitive(element); | ||
14458 | } or { | ||
14459 | find interpretation(problem,interpretation); | ||
14460 | PartialInterpretation.openWorldElements(interpretation,element); | ||
14461 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
14462 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
14463 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
14464 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
14465 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
14466 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
14467 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
14468 | neg find isPrimitive(element); | ||
14469 | } or | ||
14470 | { find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } | ||
14471 | /** | ||
14472 | * An element must be an instance of type "FunctionalData class". | ||
14473 | */ | ||
14474 | private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14475 | Type.name(type,"FunctionalData class"); | ||
14476 | find directInstanceOf(problem,interpretation,element,type); | ||
14477 | } | ||
14478 | private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
14479 | find interpretation(problem,interpretation); | ||
14480 | PartialInterpretation.scopes(interpretation,scope); | ||
14481 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
14482 | Scope.maxNewElements(scope,0); | ||
14483 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
14484 | Type.name(type,"FunctionalData class"); | ||
14485 | } | ||
14486 | |||
14487 | /** | ||
14488 | * An element may be an instance of type "FunctionalData class". | ||
14489 | */ | ||
14490 | private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
14491 | { | ||
14492 | find interpretation(problem,interpretation); | ||
14493 | PartialInterpretation.newElements(interpretation,element); | ||
14494 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
14495 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
14496 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
14497 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
14498 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
14499 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
14500 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
14501 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
14502 | neg find isPrimitive(element); | ||
14503 | } or { | ||
14504 | find interpretation(problem,interpretation); | ||
14505 | PartialInterpretation.openWorldElements(interpretation,element); | ||
14506 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
14507 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
14508 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
14509 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
14510 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
14511 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
14512 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
14513 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
14514 | neg find isPrimitive(element); | ||
14515 | } or | ||
14516 | { find mustInstanceOfFunctionalData_class(problem,interpretation,element); } | ||
14517 | /** | ||
14518 | * An element must be an instance of type "FunctionType enum". | ||
14519 | */ | ||
14520 | private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14521 | Type.name(type,"FunctionType enum"); | ||
14522 | find directInstanceOf(problem,interpretation,element,type); | ||
14523 | } | ||
14524 | private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
14525 | find interpretation(problem,interpretation); | ||
14526 | PartialInterpretation.scopes(interpretation,scope); | ||
14527 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
14528 | Scope.maxNewElements(scope,0); | ||
14529 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
14530 | Type.name(type,"FunctionType enum"); | ||
14531 | } | ||
14532 | |||
14533 | /** | ||
14534 | * An element may be an instance of type "FunctionType enum". | ||
14535 | */ | ||
14536 | private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
14537 | { find mustInstanceOfFunctionType_enum(problem,interpretation,element); } | ||
14538 | /** | ||
14539 | * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
14540 | */ | ||
14541 | private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14542 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
14543 | find directInstanceOf(problem,interpretation,element,type); | ||
14544 | } | ||
14545 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
14546 | find interpretation(problem,interpretation); | ||
14547 | PartialInterpretation.scopes(interpretation,scope); | ||
14548 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
14549 | Scope.maxNewElements(scope,0); | ||
14550 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
14551 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
14552 | } | ||
14553 | |||
14554 | /** | ||
14555 | * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
14556 | */ | ||
14557 | private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
14558 | { find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } | ||
14559 | /** | ||
14560 | * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
14561 | */ | ||
14562 | private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14563 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
14564 | find directInstanceOf(problem,interpretation,element,type); | ||
14565 | } | ||
14566 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
14567 | find interpretation(problem,interpretation); | ||
14568 | PartialInterpretation.scopes(interpretation,scope); | ||
14569 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
14570 | Scope.maxNewElements(scope,0); | ||
14571 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
14572 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
14573 | } | ||
14574 | |||
14575 | /** | ||
14576 | * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
14577 | */ | ||
14578 | private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
14579 | { | ||
14580 | find interpretation(problem,interpretation); | ||
14581 | PartialInterpretation.newElements(interpretation,element); | ||
14582 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
14583 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
14584 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
14585 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
14586 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
14587 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
14588 | neg find isPrimitive(element); | ||
14589 | } or { | ||
14590 | find interpretation(problem,interpretation); | ||
14591 | PartialInterpretation.openWorldElements(interpretation,element); | ||
14592 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
14593 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
14594 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
14595 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
14596 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
14597 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
14598 | neg find isPrimitive(element); | ||
14599 | } or | ||
14600 | { find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } | ||
14601 | |||
14602 | ////////// | ||
14603 | // 1.2 Relation Declaration Indexers | ||
14604 | ////////// | ||
14605 | /** | ||
14606 | * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) | ||
14607 | */ | ||
14608 | private pattern mustInRelationinterface_reference_FunctionalElement( | ||
14609 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14610 | source: DefinedElement, target:DefinedElement) | ||
14611 | { | ||
14612 | find interpretation(problem,interpretation); | ||
14613 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
14614 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); | ||
14615 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
14616 | BinaryElementRelationLink.param1(link,source); | ||
14617 | BinaryElementRelationLink.param2(link,target); | ||
14618 | } | ||
14619 | /** | ||
14620 | * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) | ||
14621 | */ | ||
14622 | private pattern mayInRelationinterface_reference_FunctionalElement( | ||
14623 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14624 | source: DefinedElement, target:DefinedElement) | ||
14625 | { | ||
14626 | find interpretation(problem,interpretation); | ||
14627 | // The two endpoint of the link have to exist | ||
14628 | find mayExist(problem, interpretation, source); | ||
14629 | find mayExist(problem, interpretation, target); | ||
14630 | // Type consistency | ||
14631 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
14632 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
14633 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
14634 | // the upper bound of the multiplicity should be considered. | ||
14635 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); | ||
14636 | check(numberOfExistingReferences < 1); | ||
14637 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
14638 | // the upper bound of the opposite reference multiplicity should be considered. | ||
14639 | numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); | ||
14640 | check(numberOfExistingOppositeReferences < 1); | ||
14641 | // The reference is containment, then a new reference cannot be create if: | ||
14642 | // 1. Multiple parents | ||
14643 | neg find mustContains4(problem,interpretation,_,target); | ||
14644 | // 2. Circle in the containment hierarchy | ||
14645 | neg find mustTransitiveContains(source,target); | ||
14646 | } or { | ||
14647 | find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); | ||
14648 | } | ||
14649 | /** | ||
14650 | * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) | ||
14651 | */ | ||
14652 | private pattern mustInRelationmodel_reference_FunctionalElement( | ||
14653 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14654 | source: DefinedElement, target:DefinedElement) | ||
14655 | { | ||
14656 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); | ||
14657 | } | ||
14658 | /** | ||
14659 | * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) | ||
14660 | */ | ||
14661 | private pattern mayInRelationmodel_reference_FunctionalElement( | ||
14662 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14663 | source: DefinedElement, target:DefinedElement) | ||
14664 | { | ||
14665 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); | ||
14666 | } | ||
14667 | /** | ||
14668 | * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) | ||
14669 | */ | ||
14670 | private pattern mustInRelationparent_reference_FunctionalElement( | ||
14671 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14672 | source: DefinedElement, target:DefinedElement) | ||
14673 | { | ||
14674 | find interpretation(problem,interpretation); | ||
14675 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
14676 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); | ||
14677 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
14678 | BinaryElementRelationLink.param1(link,source); | ||
14679 | BinaryElementRelationLink.param2(link,target); | ||
14680 | } | ||
14681 | /** | ||
14682 | * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) | ||
14683 | */ | ||
14684 | private pattern mayInRelationparent_reference_FunctionalElement( | ||
14685 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14686 | source: DefinedElement, target:DefinedElement) | ||
14687 | { | ||
14688 | find interpretation(problem,interpretation); | ||
14689 | // The two endpoint of the link have to exist | ||
14690 | find mayExist(problem, interpretation, source); | ||
14691 | find mayExist(problem, interpretation, target); | ||
14692 | // Type consistency | ||
14693 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
14694 | find mayInstanceOfFunction_class(problem,interpretation,target); | ||
14695 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
14696 | // the upper bound of the multiplicity should be considered. | ||
14697 | numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); | ||
14698 | check(numberOfExistingReferences < 1); | ||
14699 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
14700 | // 1. Multiple parents | ||
14701 | neg find mustContains4(problem,interpretation,source,_); | ||
14702 | // 2. Circle in the containment hierarchy | ||
14703 | neg find mustTransitiveContains(source,target); | ||
14704 | } or { | ||
14705 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); | ||
14706 | } | ||
14707 | /** | ||
14708 | * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) | ||
14709 | */ | ||
14710 | private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( | ||
14711 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14712 | source: DefinedElement, target:DefinedElement) | ||
14713 | { | ||
14714 | find interpretation(problem,interpretation); | ||
14715 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
14716 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
14717 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
14718 | BinaryElementRelationLink.param1(link,source); | ||
14719 | BinaryElementRelationLink.param2(link,target); | ||
14720 | } | ||
14721 | /** | ||
14722 | * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) | ||
14723 | */ | ||
14724 | private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( | ||
14725 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14726 | source: DefinedElement, target:DefinedElement) | ||
14727 | { | ||
14728 | find interpretation(problem,interpretation); | ||
14729 | // The two endpoint of the link have to exist | ||
14730 | find mayExist(problem, interpretation, source); | ||
14731 | find mayExist(problem, interpretation, target); | ||
14732 | // Type consistency | ||
14733 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); | ||
14734 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
14735 | // The reference is containment, then a new reference cannot be create if: | ||
14736 | // 1. Multiple parents | ||
14737 | neg find mustContains4(problem,interpretation,_,target); | ||
14738 | // 2. Circle in the containment hierarchy | ||
14739 | neg find mustTransitiveContains(source,target); | ||
14740 | } or { | ||
14741 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); | ||
14742 | } | ||
14743 | /** | ||
14744 | * Matcher for detecting tuples t where []subElements reference Function(source,target) | ||
14745 | */ | ||
14746 | private pattern mustInRelationsubElements_reference_Function( | ||
14747 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14748 | source: DefinedElement, target:DefinedElement) | ||
14749 | { | ||
14750 | find interpretation(problem,interpretation); | ||
14751 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
14752 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); | ||
14753 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
14754 | BinaryElementRelationLink.param1(link,source); | ||
14755 | BinaryElementRelationLink.param2(link,target); | ||
14756 | } | ||
14757 | /** | ||
14758 | * Matcher for detecting tuples t where <>subElements reference Function(source,target) | ||
14759 | */ | ||
14760 | private pattern mayInRelationsubElements_reference_Function( | ||
14761 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14762 | source: DefinedElement, target:DefinedElement) | ||
14763 | { | ||
14764 | find interpretation(problem,interpretation); | ||
14765 | // The two endpoint of the link have to exist | ||
14766 | find mayExist(problem, interpretation, source); | ||
14767 | find mayExist(problem, interpretation, target); | ||
14768 | // Type consistency | ||
14769 | find mayInstanceOfFunction_class(problem,interpretation,source); | ||
14770 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
14771 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
14772 | // the upper bound of the opposite reference multiplicity should be considered. | ||
14773 | numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); | ||
14774 | check(numberOfExistingOppositeReferences < 1); | ||
14775 | // The reference is containment, then a new reference cannot be create if: | ||
14776 | // 1. Multiple parents | ||
14777 | neg find mustContains4(problem,interpretation,_,target); | ||
14778 | // 2. Circle in the containment hierarchy | ||
14779 | neg find mustTransitiveContains(source,target); | ||
14780 | } or { | ||
14781 | find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); | ||
14782 | } | ||
14783 | /** | ||
14784 | * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) | ||
14785 | */ | ||
14786 | private pattern mustInRelationdata_reference_FAMTerminator( | ||
14787 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14788 | source: DefinedElement, target:DefinedElement) | ||
14789 | { | ||
14790 | find interpretation(problem,interpretation); | ||
14791 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
14792 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); | ||
14793 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
14794 | BinaryElementRelationLink.param1(link,source); | ||
14795 | BinaryElementRelationLink.param2(link,target); | ||
14796 | } | ||
14797 | /** | ||
14798 | * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) | ||
14799 | */ | ||
14800 | private pattern mayInRelationdata_reference_FAMTerminator( | ||
14801 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14802 | source: DefinedElement, target:DefinedElement) | ||
14803 | { | ||
14804 | find interpretation(problem,interpretation); | ||
14805 | // The two endpoint of the link have to exist | ||
14806 | find mayExist(problem, interpretation, source); | ||
14807 | find mayExist(problem, interpretation, target); | ||
14808 | // Type consistency | ||
14809 | find mayInstanceOfFAMTerminator_class(problem,interpretation,source); | ||
14810 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
14811 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
14812 | // the upper bound of the multiplicity should be considered. | ||
14813 | numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); | ||
14814 | check(numberOfExistingReferences < 1); | ||
14815 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
14816 | // the upper bound of the opposite reference multiplicity should be considered. | ||
14817 | numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); | ||
14818 | check(numberOfExistingOppositeReferences < 1); | ||
14819 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
14820 | // 1. Multiple parents | ||
14821 | neg find mustContains4(problem,interpretation,source,_); | ||
14822 | // 2. Circle in the containment hierarchy | ||
14823 | neg find mustTransitiveContains(source,target); | ||
14824 | } or { | ||
14825 | find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); | ||
14826 | } | ||
14827 | /** | ||
14828 | * Matcher for detecting tuples t where []from reference InformationLink(source,target) | ||
14829 | */ | ||
14830 | private pattern mustInRelationfrom_reference_InformationLink( | ||
14831 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14832 | source: DefinedElement, target:DefinedElement) | ||
14833 | { | ||
14834 | find interpretation(problem,interpretation); | ||
14835 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
14836 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); | ||
14837 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
14838 | BinaryElementRelationLink.param1(link,source); | ||
14839 | BinaryElementRelationLink.param2(link,target); | ||
14840 | } | ||
14841 | /** | ||
14842 | * Matcher for detecting tuples t where <>from reference InformationLink(source,target) | ||
14843 | */ | ||
14844 | private pattern mayInRelationfrom_reference_InformationLink( | ||
14845 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14846 | source: DefinedElement, target:DefinedElement) | ||
14847 | { | ||
14848 | find interpretation(problem,interpretation); | ||
14849 | // The two endpoint of the link have to exist | ||
14850 | find mayExist(problem, interpretation, source); | ||
14851 | find mayExist(problem, interpretation, target); | ||
14852 | // Type consistency | ||
14853 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
14854 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); | ||
14855 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
14856 | // the upper bound of the multiplicity should be considered. | ||
14857 | numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); | ||
14858 | check(numberOfExistingReferences < 1); | ||
14859 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
14860 | // 1. Multiple parents | ||
14861 | neg find mustContains4(problem,interpretation,source,_); | ||
14862 | // 2. Circle in the containment hierarchy | ||
14863 | neg find mustTransitiveContains(source,target); | ||
14864 | } or { | ||
14865 | find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); | ||
14866 | } | ||
14867 | /** | ||
14868 | * Matcher for detecting tuples t where []to reference InformationLink(source,target) | ||
14869 | */ | ||
14870 | private pattern mustInRelationto_reference_InformationLink( | ||
14871 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14872 | source: DefinedElement, target:DefinedElement) | ||
14873 | { | ||
14874 | find interpretation(problem,interpretation); | ||
14875 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
14876 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
14877 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
14878 | BinaryElementRelationLink.param1(link,source); | ||
14879 | BinaryElementRelationLink.param2(link,target); | ||
14880 | } | ||
14881 | /** | ||
14882 | * Matcher for detecting tuples t where <>to reference InformationLink(source,target) | ||
14883 | */ | ||
14884 | private pattern mayInRelationto_reference_InformationLink( | ||
14885 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14886 | source: DefinedElement, target:DefinedElement) | ||
14887 | { | ||
14888 | find interpretation(problem,interpretation); | ||
14889 | // The two endpoint of the link have to exist | ||
14890 | find mayExist(problem, interpretation, source); | ||
14891 | find mayExist(problem, interpretation, target); | ||
14892 | // Type consistency | ||
14893 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
14894 | find mayInstanceOfFunctionalInput_class(problem,interpretation,target); | ||
14895 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
14896 | // the upper bound of the multiplicity should be considered. | ||
14897 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); | ||
14898 | check(numberOfExistingReferences < 1); | ||
14899 | } or { | ||
14900 | find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); | ||
14901 | } | ||
14902 | /** | ||
14903 | * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) | ||
14904 | */ | ||
14905 | private pattern mustInRelationdata_reference_FunctionalInterface( | ||
14906 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14907 | source: DefinedElement, target:DefinedElement) | ||
14908 | { | ||
14909 | find interpretation(problem,interpretation); | ||
14910 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
14911 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); | ||
14912 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
14913 | BinaryElementRelationLink.param1(link,source); | ||
14914 | BinaryElementRelationLink.param2(link,target); | ||
14915 | } | ||
14916 | /** | ||
14917 | * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) | ||
14918 | */ | ||
14919 | private pattern mayInRelationdata_reference_FunctionalInterface( | ||
14920 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14921 | source: DefinedElement, target:DefinedElement) | ||
14922 | { | ||
14923 | find interpretation(problem,interpretation); | ||
14924 | // The two endpoint of the link have to exist | ||
14925 | find mayExist(problem, interpretation, source); | ||
14926 | find mayExist(problem, interpretation, target); | ||
14927 | // Type consistency | ||
14928 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
14929 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
14930 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
14931 | // the upper bound of the opposite reference multiplicity should be considered. | ||
14932 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); | ||
14933 | check(numberOfExistingOppositeReferences < 1); | ||
14934 | // The reference is containment, then a new reference cannot be create if: | ||
14935 | // 1. Multiple parents | ||
14936 | neg find mustContains4(problem,interpretation,_,target); | ||
14937 | // 2. Circle in the containment hierarchy | ||
14938 | neg find mustTransitiveContains(source,target); | ||
14939 | } or { | ||
14940 | find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); | ||
14941 | } | ||
14942 | /** | ||
14943 | * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) | ||
14944 | */ | ||
14945 | private pattern mustInRelationelement_reference_FunctionalInterface( | ||
14946 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14947 | source: DefinedElement, target:DefinedElement) | ||
14948 | { | ||
14949 | find interpretation(problem,interpretation); | ||
14950 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
14951 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); | ||
14952 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
14953 | BinaryElementRelationLink.param1(link,source); | ||
14954 | BinaryElementRelationLink.param2(link,target); | ||
14955 | } | ||
14956 | /** | ||
14957 | * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) | ||
14958 | */ | ||
14959 | private pattern mayInRelationelement_reference_FunctionalInterface( | ||
14960 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14961 | source: DefinedElement, target:DefinedElement) | ||
14962 | { | ||
14963 | find interpretation(problem,interpretation); | ||
14964 | // The two endpoint of the link have to exist | ||
14965 | find mayExist(problem, interpretation, source); | ||
14966 | find mayExist(problem, interpretation, target); | ||
14967 | // Type consistency | ||
14968 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
14969 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
14970 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
14971 | // the upper bound of the multiplicity should be considered. | ||
14972 | numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); | ||
14973 | check(numberOfExistingReferences < 1); | ||
14974 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
14975 | // the upper bound of the opposite reference multiplicity should be considered. | ||
14976 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); | ||
14977 | check(numberOfExistingOppositeReferences < 1); | ||
14978 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
14979 | // 1. Multiple parents | ||
14980 | neg find mustContains4(problem,interpretation,source,_); | ||
14981 | // 2. Circle in the containment hierarchy | ||
14982 | neg find mustTransitiveContains(source,target); | ||
14983 | } or { | ||
14984 | find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); | ||
14985 | } | ||
14986 | /** | ||
14987 | * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) | ||
14988 | */ | ||
14989 | private pattern mustInRelationIncomingLinks_reference_FunctionalInput( | ||
14990 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14991 | source: DefinedElement, target:DefinedElement) | ||
14992 | { | ||
14993 | find interpretation(problem,interpretation); | ||
14994 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
14995 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
14996 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
14997 | BinaryElementRelationLink.param1(link,source); | ||
14998 | BinaryElementRelationLink.param2(link,target); | ||
14999 | } | ||
15000 | /** | ||
15001 | * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) | ||
15002 | */ | ||
15003 | private pattern mayInRelationIncomingLinks_reference_FunctionalInput( | ||
15004 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15005 | source: DefinedElement, target:DefinedElement) | ||
15006 | { | ||
15007 | find interpretation(problem,interpretation); | ||
15008 | // The two endpoint of the link have to exist | ||
15009 | find mayExist(problem, interpretation, source); | ||
15010 | find mayExist(problem, interpretation, target); | ||
15011 | // Type consistency | ||
15012 | find mayInstanceOfFunctionalInput_class(problem,interpretation,source); | ||
15013 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
15014 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
15015 | // the upper bound of the opposite reference multiplicity should be considered. | ||
15016 | numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); | ||
15017 | check(numberOfExistingOppositeReferences < 1); | ||
15018 | } or { | ||
15019 | find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); | ||
15020 | } | ||
15021 | /** | ||
15022 | * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) | ||
15023 | */ | ||
15024 | private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( | ||
15025 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15026 | source: DefinedElement, target:DefinedElement) | ||
15027 | { | ||
15028 | find interpretation(problem,interpretation); | ||
15029 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
15030 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); | ||
15031 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
15032 | BinaryElementRelationLink.param1(link,source); | ||
15033 | BinaryElementRelationLink.param2(link,target); | ||
15034 | } | ||
15035 | /** | ||
15036 | * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) | ||
15037 | */ | ||
15038 | private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( | ||
15039 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15040 | source: DefinedElement, target:DefinedElement) | ||
15041 | { | ||
15042 | find interpretation(problem,interpretation); | ||
15043 | // The two endpoint of the link have to exist | ||
15044 | find mayExist(problem, interpretation, source); | ||
15045 | find mayExist(problem, interpretation, target); | ||
15046 | // Type consistency | ||
15047 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); | ||
15048 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
15049 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
15050 | // the upper bound of the opposite reference multiplicity should be considered. | ||
15051 | numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); | ||
15052 | check(numberOfExistingOppositeReferences < 1); | ||
15053 | // The reference is containment, then a new reference cannot be create if: | ||
15054 | // 1. Multiple parents | ||
15055 | neg find mustContains4(problem,interpretation,_,target); | ||
15056 | // 2. Circle in the containment hierarchy | ||
15057 | neg find mustTransitiveContains(source,target); | ||
15058 | } or { | ||
15059 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); | ||
15060 | } | ||
15061 | /** | ||
15062 | * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) | ||
15063 | */ | ||
15064 | private pattern mustInRelationterminator_reference_FunctionalData( | ||
15065 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15066 | source: DefinedElement, target:DefinedElement) | ||
15067 | { | ||
15068 | find interpretation(problem,interpretation); | ||
15069 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
15070 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); | ||
15071 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
15072 | BinaryElementRelationLink.param1(link,source); | ||
15073 | BinaryElementRelationLink.param2(link,target); | ||
15074 | } | ||
15075 | /** | ||
15076 | * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) | ||
15077 | */ | ||
15078 | private pattern mayInRelationterminator_reference_FunctionalData( | ||
15079 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15080 | source: DefinedElement, target:DefinedElement) | ||
15081 | { | ||
15082 | find interpretation(problem,interpretation); | ||
15083 | // The two endpoint of the link have to exist | ||
15084 | find mayExist(problem, interpretation, source); | ||
15085 | find mayExist(problem, interpretation, target); | ||
15086 | // Type consistency | ||
15087 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
15088 | find mayInstanceOfFAMTerminator_class(problem,interpretation,target); | ||
15089 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
15090 | // the upper bound of the multiplicity should be considered. | ||
15091 | numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); | ||
15092 | check(numberOfExistingReferences < 1); | ||
15093 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
15094 | // the upper bound of the opposite reference multiplicity should be considered. | ||
15095 | numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); | ||
15096 | check(numberOfExistingOppositeReferences < 1); | ||
15097 | // The reference is containment, then a new reference cannot be create if: | ||
15098 | // 1. Multiple parents | ||
15099 | neg find mustContains4(problem,interpretation,_,target); | ||
15100 | // 2. Circle in the containment hierarchy | ||
15101 | neg find mustTransitiveContains(source,target); | ||
15102 | } or { | ||
15103 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); | ||
15104 | } | ||
15105 | /** | ||
15106 | * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) | ||
15107 | */ | ||
15108 | private pattern mustInRelationinterface_reference_FunctionalData( | ||
15109 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15110 | source: DefinedElement, target:DefinedElement) | ||
15111 | { | ||
15112 | find interpretation(problem,interpretation); | ||
15113 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
15114 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); | ||
15115 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
15116 | BinaryElementRelationLink.param1(link,source); | ||
15117 | BinaryElementRelationLink.param2(link,target); | ||
15118 | } | ||
15119 | /** | ||
15120 | * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) | ||
15121 | */ | ||
15122 | private pattern mayInRelationinterface_reference_FunctionalData( | ||
15123 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15124 | source: DefinedElement, target:DefinedElement) | ||
15125 | { | ||
15126 | find interpretation(problem,interpretation); | ||
15127 | // The two endpoint of the link have to exist | ||
15128 | find mayExist(problem, interpretation, source); | ||
15129 | find mayExist(problem, interpretation, target); | ||
15130 | // Type consistency | ||
15131 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
15132 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
15133 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
15134 | // the upper bound of the multiplicity should be considered. | ||
15135 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); | ||
15136 | check(numberOfExistingReferences < 1); | ||
15137 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
15138 | // 1. Multiple parents | ||
15139 | neg find mustContains4(problem,interpretation,source,_); | ||
15140 | // 2. Circle in the containment hierarchy | ||
15141 | neg find mustTransitiveContains(source,target); | ||
15142 | } or { | ||
15143 | find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); | ||
15144 | } | ||
15145 | /** | ||
15146 | * Matcher for detecting tuples t where []type attribute Function(source,target) | ||
15147 | */ | ||
15148 | private pattern mustInRelationtype_attribute_Function( | ||
15149 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15150 | source: DefinedElement, target:DefinedElement) | ||
15151 | { | ||
15152 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); | ||
15153 | } | ||
15154 | /** | ||
15155 | * Matcher for detecting tuples t where []type attribute Function(source,target) | ||
15156 | */ | ||
15157 | private pattern mayInRelationtype_attribute_Function( | ||
15158 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15159 | source: DefinedElement, target:DefinedElement) | ||
15160 | { | ||
15161 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); | ||
15162 | } | ||
15163 | |||
15164 | ////////// | ||
15165 | // 1.3 Relation Definition Indexers | ||
15166 | ////////// | ||
15167 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam terminatorAndInformation | ||
15168 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( | ||
15169 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15170 | var_T, var_I) | ||
15171 | { | ||
15172 | find interpretation(problem,interpretation); | ||
15173 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
15174 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
15175 | // T is exported | ||
15176 | // I is exported | ||
15177 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
15178 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); | ||
15179 | find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); | ||
15180 | var_virtual0 == var_I; | ||
15181 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
15182 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); | ||
15183 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
15184 | var_virtual1 == var_T; | ||
15185 | }or{ | ||
15186 | find interpretation(problem,interpretation); | ||
15187 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
15188 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
15189 | // T is exported | ||
15190 | // I is exported | ||
15191 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
15192 | find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); | ||
15193 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); | ||
15194 | var_virtual0 == var_In; | ||
15195 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); | ||
15196 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); | ||
15197 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
15198 | var_virtual1 == var_T; | ||
15199 | } | ||
15200 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( | ||
15201 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15202 | var_T, var_I) | ||
15203 | { | ||
15204 | find interpretation(problem,interpretation); | ||
15205 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
15206 | find mayInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
15207 | // T is exported | ||
15208 | // I is exported | ||
15209 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
15210 | find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); | ||
15211 | find mayInstanceOfInformationLink_class(problem,interpretation,var_virtual0); | ||
15212 | find mayEquivalent(problem, interpretation, var_virtual0, var_I); | ||
15213 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
15214 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); | ||
15215 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
15216 | find mayEquivalent(problem, interpretation, var_virtual1, var_T); | ||
15217 | }or{ | ||
15218 | find interpretation(problem,interpretation); | ||
15219 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
15220 | find mayInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
15221 | // T is exported | ||
15222 | // I is exported | ||
15223 | find mayInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
15224 | find mayInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); | ||
15225 | find mayInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); | ||
15226 | find mayEquivalent(problem, interpretation, var_virtual0, var_In); | ||
15227 | find mayInstanceOfFunctionalInput_class(problem,interpretation,var_In); | ||
15228 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); | ||
15229 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
15230 | find mayEquivalent(problem, interpretation, var_virtual1, var_T); | ||
15231 | } | ||
15232 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( | ||
15233 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15234 | var_T, var_I) | ||
15235 | { | ||
15236 | find interpretation(problem,interpretation); | ||
15237 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
15238 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
15239 | // T is exported | ||
15240 | // I is exported | ||
15241 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
15242 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); | ||
15243 | find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); | ||
15244 | var_virtual0 == var_I; | ||
15245 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
15246 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); | ||
15247 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
15248 | var_virtual1 == var_T; | ||
15249 | }or{ | ||
15250 | find interpretation(problem,interpretation); | ||
15251 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
15252 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
15253 | // T is exported | ||
15254 | // I is exported | ||
15255 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
15256 | find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); | ||
15257 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); | ||
15258 | var_virtual0 == var_In; | ||
15259 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); | ||
15260 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); | ||
15261 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
15262 | var_virtual1 == var_T; | ||
15263 | } | ||
15264 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam type | ||
15265 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( | ||
15266 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15267 | var_This, var_Target) | ||
15268 | { | ||
15269 | find interpretation(problem,interpretation); | ||
15270 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
15271 | // type constraint is enforced by construction | ||
15272 | // This is exported | ||
15273 | // Target is exported | ||
15274 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
15275 | var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); | ||
15276 | var_Target == var_virtual0; | ||
15277 | }or{ | ||
15278 | find interpretation(problem,interpretation); | ||
15279 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
15280 | // type constraint is enforced by construction | ||
15281 | // This is exported | ||
15282 | // Target is exported | ||
15283 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
15284 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
15285 | var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); | ||
15286 | var_Target == var_virtual0; | ||
15287 | }or{ | ||
15288 | find interpretation(problem,interpretation); | ||
15289 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
15290 | // type constraint is enforced by construction | ||
15291 | // This is exported | ||
15292 | // Target is exported | ||
15293 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); | ||
15294 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
15295 | var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); | ||
15296 | var_Target == var_virtual0; | ||
15297 | } | ||
15298 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( | ||
15299 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15300 | var_This, var_Target) | ||
15301 | { | ||
15302 | find interpretation(problem,interpretation); | ||
15303 | find mayInstanceOfFunction_class(problem,interpretation,var_This); | ||
15304 | // type constraint is enforced by construction | ||
15305 | // This is exported | ||
15306 | // Target is exported | ||
15307 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
15308 | var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); | ||
15309 | find mayEquivalent(problem, interpretation, var_Target, var_virtual0); | ||
15310 | }or{ | ||
15311 | find interpretation(problem,interpretation); | ||
15312 | find mayInstanceOfFunction_class(problem,interpretation,var_This); | ||
15313 | // type constraint is enforced by construction | ||
15314 | // This is exported | ||
15315 | // Target is exported | ||
15316 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
15317 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
15318 | var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); | ||
15319 | find mayEquivalent(problem, interpretation, var_Target, var_virtual0); | ||
15320 | }or{ | ||
15321 | find interpretation(problem,interpretation); | ||
15322 | find mayInstanceOfFunction_class(problem,interpretation,var_This); | ||
15323 | // type constraint is enforced by construction | ||
15324 | // This is exported | ||
15325 | // Target is exported | ||
15326 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); | ||
15327 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
15328 | var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); | ||
15329 | find mayEquivalent(problem, interpretation, var_Target, var_virtual0); | ||
15330 | } | ||
15331 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( | ||
15332 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15333 | var_This, var_Target) | ||
15334 | { | ||
15335 | find interpretation(problem,interpretation); | ||
15336 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
15337 | // type constraint is enforced by construction | ||
15338 | // This is exported | ||
15339 | // Target is exported | ||
15340 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
15341 | var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); | ||
15342 | var_Target == var_virtual0; | ||
15343 | }or{ | ||
15344 | find interpretation(problem,interpretation); | ||
15345 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
15346 | // type constraint is enforced by construction | ||
15347 | // This is exported | ||
15348 | // Target is exported | ||
15349 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
15350 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
15351 | var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); | ||
15352 | var_Target == var_virtual0; | ||
15353 | }or{ | ||
15354 | find interpretation(problem,interpretation); | ||
15355 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
15356 | // type constraint is enforced by construction | ||
15357 | // This is exported | ||
15358 | // Target is exported | ||
15359 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); | ||
15360 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
15361 | var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); | ||
15362 | var_Target == var_virtual0; | ||
15363 | } | ||
15364 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam rootElements | ||
15365 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( | ||
15366 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15367 | var_Model, var_Root) | ||
15368 | { | ||
15369 | find interpretation(problem,interpretation); | ||
15370 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
15371 | find mustInstanceOfFunction_class(problem,interpretation,var_Root); | ||
15372 | // Model is exported | ||
15373 | // Root is exported | ||
15374 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
15375 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); | ||
15376 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); | ||
15377 | var_virtual0 == var_Root; | ||
15378 | } | ||
15379 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( | ||
15380 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15381 | var_Model, var_Root) | ||
15382 | { | ||
15383 | find interpretation(problem,interpretation); | ||
15384 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
15385 | find mayInstanceOfFunction_class(problem,interpretation,var_Root); | ||
15386 | // Model is exported | ||
15387 | // Root is exported | ||
15388 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
15389 | find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); | ||
15390 | find mayInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); | ||
15391 | find mayEquivalent(problem, interpretation, var_virtual0, var_Root); | ||
15392 | } | ||
15393 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( | ||
15394 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15395 | var_Model, var_Root) | ||
15396 | { | ||
15397 | find interpretation(problem,interpretation); | ||
15398 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
15399 | find mustInstanceOfFunction_class(problem,interpretation,var_Root); | ||
15400 | // Model is exported | ||
15401 | // Root is exported | ||
15402 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
15403 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); | ||
15404 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); | ||
15405 | var_virtual0 == var_Root; | ||
15406 | } | ||
15407 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam parent | ||
15408 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( | ||
15409 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15410 | var_Func, var_Par) | ||
15411 | { | ||
15412 | find interpretation(problem,interpretation); | ||
15413 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
15414 | find mustInstanceOfFunction_class(problem,interpretation,var_Par); | ||
15415 | // Func is exported | ||
15416 | // Par is exported | ||
15417 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
15418 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); | ||
15419 | find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); | ||
15420 | var_virtual0 == var_Par; | ||
15421 | } | ||
15422 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( | ||
15423 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15424 | var_Func, var_Par) | ||
15425 | { | ||
15426 | find interpretation(problem,interpretation); | ||
15427 | find mayInstanceOfFunction_class(problem,interpretation,var_Func); | ||
15428 | find mayInstanceOfFunction_class(problem,interpretation,var_Par); | ||
15429 | // Func is exported | ||
15430 | // Par is exported | ||
15431 | find mayInstanceOfFunction_class(problem,interpretation,var_Func); | ||
15432 | find mayInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); | ||
15433 | find mayInstanceOfFunction_class(problem,interpretation,var_virtual0); | ||
15434 | find mayEquivalent(problem, interpretation, var_virtual0, var_Par); | ||
15435 | } | ||
15436 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( | ||
15437 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15438 | var_Func, var_Par) | ||
15439 | { | ||
15440 | find interpretation(problem,interpretation); | ||
15441 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
15442 | find mustInstanceOfFunction_class(problem,interpretation,var_Par); | ||
15443 | // Func is exported | ||
15444 | // Par is exported | ||
15445 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
15446 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); | ||
15447 | find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); | ||
15448 | var_virtual0 == var_Par; | ||
15449 | } | ||
15450 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam model | ||
15451 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( | ||
15452 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15453 | var_This, var_Target) | ||
15454 | { | ||
15455 | find interpretation(problem,interpretation); | ||
15456 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
15457 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
15458 | // This is exported | ||
15459 | // Target is exported | ||
15460 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
15461 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
15462 | } | ||
15463 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( | ||
15464 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15465 | var_This, var_Target) | ||
15466 | { | ||
15467 | find interpretation(problem,interpretation); | ||
15468 | find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
15469 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
15470 | // This is exported | ||
15471 | // Target is exported | ||
15472 | find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
15473 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
15474 | } | ||
15475 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( | ||
15476 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15477 | var_This, var_Target) | ||
15478 | { | ||
15479 | find interpretation(problem,interpretation); | ||
15480 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
15481 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
15482 | // This is exported | ||
15483 | // Target is exported | ||
15484 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
15485 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
15486 | } | ||
15487 | |||
15488 | ////////// | ||
15489 | // 1.4 Containment Indexer | ||
15490 | ////////// | ||
15491 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
15492 | find mustContains4(_,_,source,target); | ||
15493 | } | ||
15494 | |||
15495 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
15496 | source: DefinedElement, target: DefinedElement) | ||
15497 | { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or | ||
15498 | |||
15499 | { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or | ||
15500 | |||
15501 | { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or | ||
15502 | |||
15503 | { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or | ||
15504 | |||
15505 | { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or | ||
15506 | |||
15507 | { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } | ||
15508 | |||
15509 | private pattern mustTransitiveContains(source,target) { | ||
15510 | find mustContains2+(source,target); | ||
15511 | } | ||
15512 | |||
15513 | ////////// | ||
15514 | // 2. Invalidation Indexers | ||
15515 | ////////// | ||
15516 | // 2.1 Invalidated by WF Queries | ||
15517 | ////////// | ||
15518 | |||
15519 | ////////// | ||
15520 | // 3. Unfinishedness Indexers | ||
15521 | ////////// | ||
15522 | // 3.1 Unfinishedness Measured by Multiplicity | ||
15523 | ////////// | ||
15524 | pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
15525 | find interpretation(problem,interpretation); | ||
15526 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
15527 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
15528 | find mustInstanceOfInformationLink_class(problem,interpretation,object); | ||
15529 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); | ||
15530 | check(numberOfExistingReferences < 1); | ||
15531 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
15532 | } | ||
15533 | |||
15534 | ////////// | ||
15535 | // 3.2 Unfinishedness Measured by WF Queries | ||
15536 | ////////// | ||
15537 | |||
15538 | ////////// | ||
15539 | // 4. Refinement Indexers | ||
15540 | ////////// | ||
15541 | // 4.1 Object constructors | ||
15542 | ////////// | ||
15543 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
15544 | { | ||
15545 | find interpretation(problem,interpretation); | ||
15546 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); | ||
15547 | find mustExist(problem, interpretation, root); | ||
15548 | }or{ | ||
15549 | find interpretation(problem,interpretation); | ||
15550 | find mustInstanceOfFunctionalElement_class(problem,interpretation,root); | ||
15551 | find mustExist(problem, interpretation, root); | ||
15552 | }or{ | ||
15553 | find interpretation(problem,interpretation); | ||
15554 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); | ||
15555 | find mustExist(problem, interpretation, root); | ||
15556 | }or{ | ||
15557 | find interpretation(problem,interpretation); | ||
15558 | find mustInstanceOfFAMTerminator_class(problem,interpretation,root); | ||
15559 | find mustExist(problem, interpretation, root); | ||
15560 | }or{ | ||
15561 | find interpretation(problem,interpretation); | ||
15562 | find mustInstanceOfFunctionalInput_class(problem,interpretation,root); | ||
15563 | find mustExist(problem, interpretation, root); | ||
15564 | }or{ | ||
15565 | find interpretation(problem,interpretation); | ||
15566 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); | ||
15567 | find mustExist(problem, interpretation, root); | ||
15568 | }or{ | ||
15569 | find interpretation(problem,interpretation); | ||
15570 | find mustInstanceOfInformationLink_class(problem,interpretation,root); | ||
15571 | find mustExist(problem, interpretation, root); | ||
15572 | }or{ | ||
15573 | find interpretation(problem,interpretation); | ||
15574 | find mustInstanceOfFunction_class(problem,interpretation,root); | ||
15575 | find mustExist(problem, interpretation, root); | ||
15576 | }or{ | ||
15577 | find interpretation(problem,interpretation); | ||
15578 | find mustInstanceOfFunctionalData_class(problem,interpretation,root); | ||
15579 | find mustExist(problem, interpretation, root); | ||
15580 | }or{ | ||
15581 | find interpretation(problem,interpretation); | ||
15582 | find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); | ||
15583 | find mustExist(problem, interpretation, root); | ||
15584 | }or{ | ||
15585 | find interpretation(problem,interpretation); | ||
15586 | find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); | ||
15587 | find mustExist(problem, interpretation, root); | ||
15588 | } | ||
15589 | pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( | ||
15590 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15591 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
15592 | container:DefinedElement) | ||
15593 | { | ||
15594 | find interpretation(problem,interpretation); | ||
15595 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
15596 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
15597 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
15598 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); | ||
15599 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
15600 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); | ||
15601 | find mustInstanceOfFunctionalData_class(problem,interpretation,container); | ||
15602 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
15603 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); | ||
15604 | find mustExist(problem, interpretation, container); | ||
15605 | neg find mustExist(problem, interpretation, newObject); | ||
15606 | } | ||
15607 | pattern createObject_FAMTerminator_class( | ||
15608 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15609 | typeInterpretation:PartialComplexTypeInterpretation) | ||
15610 | { | ||
15611 | find interpretation(problem,interpretation); | ||
15612 | neg find hasElementInContainment(problem,interpretation); | ||
15613 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
15614 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
15615 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
15616 | find mayExist(problem, interpretation, newObject); | ||
15617 | neg find mustExist(problem, interpretation, newObject); | ||
15618 | } | ||
15619 | pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
15620 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15621 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
15622 | container:DefinedElement) | ||
15623 | { | ||
15624 | find interpretation(problem,interpretation); | ||
15625 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
15626 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
15627 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
15628 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
15629 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
15630 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
15631 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
15632 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
15633 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
15634 | find mustExist(problem, interpretation, container); | ||
15635 | neg find mustExist(problem, interpretation, newObject); | ||
15636 | } | ||
15637 | pattern createObject_FunctionalInput_class( | ||
15638 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15639 | typeInterpretation:PartialComplexTypeInterpretation) | ||
15640 | { | ||
15641 | find interpretation(problem,interpretation); | ||
15642 | neg find hasElementInContainment(problem,interpretation); | ||
15643 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
15644 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
15645 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
15646 | find mayExist(problem, interpretation, newObject); | ||
15647 | neg find mustExist(problem, interpretation, newObject); | ||
15648 | } | ||
15649 | pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
15650 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15651 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
15652 | container:DefinedElement) | ||
15653 | { | ||
15654 | find interpretation(problem,interpretation); | ||
15655 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
15656 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
15657 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
15658 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
15659 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
15660 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
15661 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
15662 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
15663 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
15664 | find mustExist(problem, interpretation, container); | ||
15665 | neg find mustExist(problem, interpretation, newObject); | ||
15666 | } | ||
15667 | pattern createObject_FunctionalOutput_class( | ||
15668 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15669 | typeInterpretation:PartialComplexTypeInterpretation) | ||
15670 | { | ||
15671 | find interpretation(problem,interpretation); | ||
15672 | neg find hasElementInContainment(problem,interpretation); | ||
15673 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
15674 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
15675 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
15676 | find mayExist(problem, interpretation, newObject); | ||
15677 | neg find mustExist(problem, interpretation, newObject); | ||
15678 | } | ||
15679 | pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( | ||
15680 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15681 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
15682 | container:DefinedElement) | ||
15683 | { | ||
15684 | find interpretation(problem,interpretation); | ||
15685 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
15686 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
15687 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
15688 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); | ||
15689 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
15690 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); | ||
15691 | find mustInstanceOfFunctionalElement_class(problem,interpretation,container); | ||
15692 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
15693 | find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); | ||
15694 | find mustExist(problem, interpretation, container); | ||
15695 | neg find mustExist(problem, interpretation, newObject); | ||
15696 | } | ||
15697 | pattern createObject_FunctionalInterface_class( | ||
15698 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15699 | typeInterpretation:PartialComplexTypeInterpretation) | ||
15700 | { | ||
15701 | find interpretation(problem,interpretation); | ||
15702 | neg find hasElementInContainment(problem,interpretation); | ||
15703 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
15704 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
15705 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
15706 | find mayExist(problem, interpretation, newObject); | ||
15707 | neg find mustExist(problem, interpretation, newObject); | ||
15708 | } | ||
15709 | pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( | ||
15710 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15711 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
15712 | container:DefinedElement) | ||
15713 | { | ||
15714 | find interpretation(problem,interpretation); | ||
15715 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
15716 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
15717 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
15718 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
15719 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); | ||
15720 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
15721 | find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); | ||
15722 | find mustExist(problem, interpretation, container); | ||
15723 | neg find mustExist(problem, interpretation, newObject); | ||
15724 | } | ||
15725 | pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( | ||
15726 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15727 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
15728 | container:DefinedElement) | ||
15729 | { | ||
15730 | find interpretation(problem,interpretation); | ||
15731 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
15732 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
15733 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
15734 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); | ||
15735 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
15736 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); | ||
15737 | find mustInstanceOfFunction_class(problem,interpretation,container); | ||
15738 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
15739 | find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); | ||
15740 | find mustExist(problem, interpretation, container); | ||
15741 | neg find mustExist(problem, interpretation, newObject); | ||
15742 | } | ||
15743 | pattern createObject_Function_class( | ||
15744 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15745 | typeInterpretation:PartialComplexTypeInterpretation) | ||
15746 | { | ||
15747 | find interpretation(problem,interpretation); | ||
15748 | neg find hasElementInContainment(problem,interpretation); | ||
15749 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
15750 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
15751 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
15752 | find mayExist(problem, interpretation, newObject); | ||
15753 | neg find mustExist(problem, interpretation, newObject); | ||
15754 | } | ||
15755 | pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( | ||
15756 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15757 | typeInterpretation:PartialComplexTypeInterpretation) | ||
15758 | { | ||
15759 | find interpretation(problem,interpretation); | ||
15760 | neg find hasElementInContainment(problem,interpretation); | ||
15761 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
15762 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); | ||
15763 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); | ||
15764 | find mayExist(problem, interpretation, newObject); | ||
15765 | neg find mustExist(problem, interpretation, newObject); | ||
15766 | } | ||
15767 | pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( | ||
15768 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15769 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
15770 | container:DefinedElement) | ||
15771 | { | ||
15772 | find interpretation(problem,interpretation); | ||
15773 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
15774 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
15775 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
15776 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); | ||
15777 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
15778 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); | ||
15779 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); | ||
15780 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
15781 | find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); | ||
15782 | find mustExist(problem, interpretation, container); | ||
15783 | neg find mustExist(problem, interpretation, newObject); | ||
15784 | } | ||
15785 | pattern createObject_InformationLink_class( | ||
15786 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15787 | typeInterpretation:PartialComplexTypeInterpretation) | ||
15788 | { | ||
15789 | find interpretation(problem,interpretation); | ||
15790 | neg find hasElementInContainment(problem,interpretation); | ||
15791 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
15792 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
15793 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
15794 | find mayExist(problem, interpretation, newObject); | ||
15795 | neg find mustExist(problem, interpretation, newObject); | ||
15796 | } | ||
15797 | |||
15798 | ////////// | ||
15799 | // 4.2 Type refinement | ||
15800 | ////////// | ||
15801 | pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
15802 | find interpretation(problem,interpretation); | ||
15803 | PartialInterpretation.newElements(interpretation,element); | ||
15804 | find mayInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
15805 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
15806 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
15807 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
15808 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
15809 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
15810 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
15811 | } | ||
15812 | pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
15813 | find interpretation(problem,interpretation); | ||
15814 | PartialInterpretation.newElements(interpretation,element); | ||
15815 | find mayInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
15816 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
15817 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
15818 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
15819 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
15820 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
15821 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
15822 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
15823 | } | ||
15824 | pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
15825 | find interpretation(problem,interpretation); | ||
15826 | PartialInterpretation.newElements(interpretation,element); | ||
15827 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
15828 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
15829 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
15830 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
15831 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
15832 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
15833 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
15834 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
15835 | } | ||
15836 | pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
15837 | find interpretation(problem,interpretation); | ||
15838 | PartialInterpretation.newElements(interpretation,element); | ||
15839 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
15840 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
15841 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
15842 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
15843 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
15844 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
15845 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
15846 | } | ||
15847 | pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
15848 | find interpretation(problem,interpretation); | ||
15849 | PartialInterpretation.newElements(interpretation,element); | ||
15850 | find mayInstanceOfFunction_class(problem,interpretation,element); | ||
15851 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
15852 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
15853 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
15854 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
15855 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
15856 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
15857 | } | ||
15858 | pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
15859 | find interpretation(problem,interpretation); | ||
15860 | PartialInterpretation.newElements(interpretation,element); | ||
15861 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
15862 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
15863 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
15864 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
15865 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
15866 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
15867 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
15868 | } | ||
15869 | pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
15870 | find interpretation(problem,interpretation); | ||
15871 | PartialInterpretation.newElements(interpretation,element); | ||
15872 | find mayInstanceOfInformationLink_class(problem,interpretation,element); | ||
15873 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
15874 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
15875 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
15876 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
15877 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
15878 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
15879 | } | ||
15880 | |||
15881 | ////////// | ||
15882 | // 4.3 Relation refinement | ||
15883 | ////////// | ||
15884 | pattern refineRelation_model_reference_FunctionalElement( | ||
15885 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15886 | relationIterpretation:PartialRelationInterpretation, | ||
15887 | from: DefinedElement, to: DefinedElement) | ||
15888 | { | ||
15889 | find interpretation(problem,interpretation); | ||
15890 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
15891 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
15892 | find mustExist(problem, interpretation, from); | ||
15893 | find mustExist(problem, interpretation, to); | ||
15894 | find mustInstanceOfFunctionalElement_class(problem,interpretation,from); | ||
15895 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); | ||
15896 | find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
15897 | neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
15898 | } | ||
15899 | pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( | ||
15900 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15901 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
15902 | from: DefinedElement, to: DefinedElement) | ||
15903 | { | ||
15904 | find interpretation(problem,interpretation); | ||
15905 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
15906 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
15907 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
15908 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); | ||
15909 | find mustExist(problem, interpretation, from); | ||
15910 | find mustExist(problem, interpretation, to); | ||
15911 | find mustInstanceOfFunctionalInput_class(problem,interpretation,from); | ||
15912 | find mustInstanceOfInformationLink_class(problem,interpretation,to); | ||
15913 | find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
15914 | neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
15915 | } | ||
15916 | pattern refineRelation_type_attribute_Function( | ||
15917 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15918 | relationIterpretation:PartialRelationInterpretation, | ||
15919 | from: DefinedElement, to: DefinedElement) | ||
15920 | { | ||
15921 | find interpretation(problem,interpretation); | ||
15922 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
15923 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
15924 | find mustExist(problem, interpretation, from); | ||
15925 | find mustExist(problem, interpretation, to); | ||
15926 | find mustInstanceOfFunction_class(problem,interpretation,from); | ||
15927 | find mustInstanceOfFunctionType_enum(problem,interpretation,to); | ||
15928 | find mayInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
15929 | neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
15930 | } | ||
15931 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
15932 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
15933 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
15934 | |||
15935 | ////////// | ||
15936 | // 0. Util | ||
15937 | ////////// | ||
15938 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15939 | PartialInterpretation.problem(interpretation,problem); | ||
15940 | } | ||
15941 | |||
15942 | ///////////////////////// | ||
15943 | // 0.1 Existence | ||
15944 | ///////////////////////// | ||
15945 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15946 | find interpretation(problem,interpretation); | ||
15947 | LogicProblem.elements(problem,element); | ||
15948 | } or { | ||
15949 | find interpretation(problem,interpretation); | ||
15950 | PartialInterpretation.newElements(interpretation,element); | ||
15951 | } | ||
15952 | |||
15953 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15954 | find mustExist(problem,interpretation,element); | ||
15955 | } or { | ||
15956 | find interpretation(problem,interpretation); | ||
15957 | neg find elementCloseWorld(element); | ||
15958 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15959 | } | ||
15960 | |||
15961 | private pattern elementCloseWorld(element:DefinedElement) { | ||
15962 | PartialInterpretation.openWorldElements(i,element); | ||
15963 | PartialInterpretation.maxNewElements(i,0); | ||
15964 | } or { | ||
15965 | Scope.targetTypeInterpretation(scope,interpretation); | ||
15966 | PartialTypeInterpratation.elements(interpretation,element); | ||
15967 | Scope.maxNewElements(scope,0); | ||
15968 | } | ||
15969 | |||
15970 | //////////////////////// | ||
15971 | // 0.2 Equivalence | ||
15972 | //////////////////////// | ||
15973 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
15974 | find mayExist(problem,interpretation,a); | ||
15975 | find mayExist(problem,interpretation,b); | ||
15976 | a == b; | ||
15977 | } | ||
15978 | |||
15979 | //////////////////////// | ||
15980 | // 0.3 Required Patterns by TypeIndexer | ||
15981 | //////////////////////// | ||
15982 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
15983 | find interpretation(problem,interpretation); | ||
15984 | LogicProblem.types(problem,type); | ||
15985 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
15986 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15987 | } | ||
15988 | |||
15989 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
15990 | find interpretation(problem,interpretation); | ||
15991 | LogicProblem.types(problem,type); | ||
15992 | TypeDefinition.elements(type,element); | ||
15993 | } or { | ||
15994 | find interpretation(problem,interpretation); | ||
15995 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
15996 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
15997 | } | ||
15998 | |||
15999 | private pattern isPrimitive(element: PrimitiveElement) { | ||
16000 | PrimitiveElement(element); | ||
16001 | } | ||
16002 | |||
16003 | ////////// | ||
16004 | // 1. Problem-Specific Base Indexers | ||
16005 | ////////// | ||
16006 | // 1.1 Type Indexers | ||
16007 | ////////// | ||
16008 | // 1.1.1 primitive Type Indexers | ||
16009 | ////////// | ||
16010 | |||
16011 | ////////// | ||
16012 | // 1.1.2 domain-specific Type Indexers | ||
16013 | ////////// | ||
16014 | /** | ||
16015 | * An element must be an instance of type "FunctionalElement class". | ||
16016 | */ | ||
16017 | private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
16018 | Type.name(type,"FunctionalElement class"); | ||
16019 | find directInstanceOf(problem,interpretation,element,type); | ||
16020 | } | ||
16021 | private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
16022 | find interpretation(problem,interpretation); | ||
16023 | PartialInterpretation.scopes(interpretation,scope); | ||
16024 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
16025 | Scope.maxNewElements(scope,0); | ||
16026 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
16027 | Type.name(type,"FunctionalElement class"); | ||
16028 | } | ||
16029 | |||
16030 | /** | ||
16031 | * An element may be an instance of type "FunctionalElement class". | ||
16032 | */ | ||
16033 | private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
16034 | { | ||
16035 | find interpretation(problem,interpretation); | ||
16036 | PartialInterpretation.newElements(interpretation,element); | ||
16037 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
16038 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
16039 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
16040 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
16041 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
16042 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
16043 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
16044 | neg find isPrimitive(element); | ||
16045 | } or { | ||
16046 | find interpretation(problem,interpretation); | ||
16047 | PartialInterpretation.openWorldElements(interpretation,element); | ||
16048 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
16049 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
16050 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
16051 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
16052 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
16053 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
16054 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
16055 | neg find isPrimitive(element); | ||
16056 | } or | ||
16057 | { find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } | ||
16058 | /** | ||
16059 | * An element must be an instance of type "FunctionalArchitectureModel class". | ||
16060 | */ | ||
16061 | private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
16062 | Type.name(type,"FunctionalArchitectureModel class"); | ||
16063 | find directInstanceOf(problem,interpretation,element,type); | ||
16064 | } | ||
16065 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
16066 | find interpretation(problem,interpretation); | ||
16067 | PartialInterpretation.scopes(interpretation,scope); | ||
16068 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
16069 | Scope.maxNewElements(scope,0); | ||
16070 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
16071 | Type.name(type,"FunctionalArchitectureModel class"); | ||
16072 | } | ||
16073 | |||
16074 | /** | ||
16075 | * An element may be an instance of type "FunctionalArchitectureModel class". | ||
16076 | */ | ||
16077 | private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
16078 | { | ||
16079 | find interpretation(problem,interpretation); | ||
16080 | PartialInterpretation.newElements(interpretation,element); | ||
16081 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
16082 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
16083 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
16084 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
16085 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
16086 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
16087 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
16088 | neg find isPrimitive(element); | ||
16089 | } or { | ||
16090 | find interpretation(problem,interpretation); | ||
16091 | PartialInterpretation.openWorldElements(interpretation,element); | ||
16092 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
16093 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
16094 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
16095 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
16096 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
16097 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
16098 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
16099 | neg find isPrimitive(element); | ||
16100 | } or | ||
16101 | { find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } | ||
16102 | /** | ||
16103 | * An element must be an instance of type "Function class". | ||
16104 | */ | ||
16105 | private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
16106 | Type.name(type,"Function class"); | ||
16107 | find directInstanceOf(problem,interpretation,element,type); | ||
16108 | } | ||
16109 | private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
16110 | find interpretation(problem,interpretation); | ||
16111 | PartialInterpretation.scopes(interpretation,scope); | ||
16112 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
16113 | Scope.maxNewElements(scope,0); | ||
16114 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
16115 | Type.name(type,"Function class"); | ||
16116 | } | ||
16117 | |||
16118 | /** | ||
16119 | * An element may be an instance of type "Function class". | ||
16120 | */ | ||
16121 | private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
16122 | { | ||
16123 | find interpretation(problem,interpretation); | ||
16124 | PartialInterpretation.newElements(interpretation,element); | ||
16125 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
16126 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
16127 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
16128 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
16129 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
16130 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
16131 | neg find isPrimitive(element); | ||
16132 | } or { | ||
16133 | find interpretation(problem,interpretation); | ||
16134 | PartialInterpretation.openWorldElements(interpretation,element); | ||
16135 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
16136 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
16137 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
16138 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
16139 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
16140 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
16141 | neg find isPrimitive(element); | ||
16142 | } or | ||
16143 | { find mustInstanceOfFunction_class(problem,interpretation,element); } | ||
16144 | /** | ||
16145 | * An element must be an instance of type "FAMTerminator class". | ||
16146 | */ | ||
16147 | private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
16148 | Type.name(type,"FAMTerminator class"); | ||
16149 | find directInstanceOf(problem,interpretation,element,type); | ||
16150 | } | ||
16151 | private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
16152 | find interpretation(problem,interpretation); | ||
16153 | PartialInterpretation.scopes(interpretation,scope); | ||
16154 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
16155 | Scope.maxNewElements(scope,0); | ||
16156 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
16157 | Type.name(type,"FAMTerminator class"); | ||
16158 | } | ||
16159 | |||
16160 | /** | ||
16161 | * An element may be an instance of type "FAMTerminator class". | ||
16162 | */ | ||
16163 | private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
16164 | { | ||
16165 | find interpretation(problem,interpretation); | ||
16166 | PartialInterpretation.newElements(interpretation,element); | ||
16167 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
16168 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
16169 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
16170 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
16171 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
16172 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
16173 | neg find isPrimitive(element); | ||
16174 | } or { | ||
16175 | find interpretation(problem,interpretation); | ||
16176 | PartialInterpretation.openWorldElements(interpretation,element); | ||
16177 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
16178 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
16179 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
16180 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
16181 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
16182 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
16183 | neg find isPrimitive(element); | ||
16184 | } or | ||
16185 | { find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } | ||
16186 | /** | ||
16187 | * An element must be an instance of type "InformationLink class". | ||
16188 | */ | ||
16189 | private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
16190 | Type.name(type,"InformationLink class"); | ||
16191 | find directInstanceOf(problem,interpretation,element,type); | ||
16192 | } | ||
16193 | private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
16194 | find interpretation(problem,interpretation); | ||
16195 | PartialInterpretation.scopes(interpretation,scope); | ||
16196 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
16197 | Scope.maxNewElements(scope,0); | ||
16198 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
16199 | Type.name(type,"InformationLink class"); | ||
16200 | } | ||
16201 | |||
16202 | /** | ||
16203 | * An element may be an instance of type "InformationLink class". | ||
16204 | */ | ||
16205 | private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
16206 | { | ||
16207 | find interpretation(problem,interpretation); | ||
16208 | PartialInterpretation.newElements(interpretation,element); | ||
16209 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
16210 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
16211 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
16212 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
16213 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
16214 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
16215 | neg find isPrimitive(element); | ||
16216 | } or { | ||
16217 | find interpretation(problem,interpretation); | ||
16218 | PartialInterpretation.openWorldElements(interpretation,element); | ||
16219 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
16220 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
16221 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
16222 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
16223 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
16224 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
16225 | neg find isPrimitive(element); | ||
16226 | } or | ||
16227 | { find mustInstanceOfInformationLink_class(problem,interpretation,element); } | ||
16228 | /** | ||
16229 | * An element must be an instance of type "FunctionalInterface class". | ||
16230 | */ | ||
16231 | private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
16232 | Type.name(type,"FunctionalInterface class"); | ||
16233 | find directInstanceOf(problem,interpretation,element,type); | ||
16234 | } | ||
16235 | private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
16236 | find interpretation(problem,interpretation); | ||
16237 | PartialInterpretation.scopes(interpretation,scope); | ||
16238 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
16239 | Scope.maxNewElements(scope,0); | ||
16240 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
16241 | Type.name(type,"FunctionalInterface class"); | ||
16242 | } | ||
16243 | |||
16244 | /** | ||
16245 | * An element may be an instance of type "FunctionalInterface class". | ||
16246 | */ | ||
16247 | private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
16248 | { | ||
16249 | find interpretation(problem,interpretation); | ||
16250 | PartialInterpretation.newElements(interpretation,element); | ||
16251 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
16252 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
16253 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
16254 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
16255 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
16256 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
16257 | neg find isPrimitive(element); | ||
16258 | } or { | ||
16259 | find interpretation(problem,interpretation); | ||
16260 | PartialInterpretation.openWorldElements(interpretation,element); | ||
16261 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
16262 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
16263 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
16264 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
16265 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
16266 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
16267 | neg find isPrimitive(element); | ||
16268 | } or | ||
16269 | { find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } | ||
16270 | /** | ||
16271 | * An element must be an instance of type "FunctionalInput class". | ||
16272 | */ | ||
16273 | private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
16274 | Type.name(type,"FunctionalInput class"); | ||
16275 | find directInstanceOf(problem,interpretation,element,type); | ||
16276 | } | ||
16277 | private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
16278 | find interpretation(problem,interpretation); | ||
16279 | PartialInterpretation.scopes(interpretation,scope); | ||
16280 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
16281 | Scope.maxNewElements(scope,0); | ||
16282 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
16283 | Type.name(type,"FunctionalInput class"); | ||
16284 | } | ||
16285 | |||
16286 | /** | ||
16287 | * An element may be an instance of type "FunctionalInput class". | ||
16288 | */ | ||
16289 | private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
16290 | { | ||
16291 | find interpretation(problem,interpretation); | ||
16292 | PartialInterpretation.newElements(interpretation,element); | ||
16293 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
16294 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
16295 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
16296 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
16297 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
16298 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
16299 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
16300 | neg find isPrimitive(element); | ||
16301 | } or { | ||
16302 | find interpretation(problem,interpretation); | ||
16303 | PartialInterpretation.openWorldElements(interpretation,element); | ||
16304 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
16305 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
16306 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
16307 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
16308 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
16309 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
16310 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
16311 | neg find isPrimitive(element); | ||
16312 | } or | ||
16313 | { find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } | ||
16314 | /** | ||
16315 | * An element must be an instance of type "FunctionalOutput class". | ||
16316 | */ | ||
16317 | private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
16318 | Type.name(type,"FunctionalOutput class"); | ||
16319 | find directInstanceOf(problem,interpretation,element,type); | ||
16320 | } | ||
16321 | private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
16322 | find interpretation(problem,interpretation); | ||
16323 | PartialInterpretation.scopes(interpretation,scope); | ||
16324 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
16325 | Scope.maxNewElements(scope,0); | ||
16326 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
16327 | Type.name(type,"FunctionalOutput class"); | ||
16328 | } | ||
16329 | |||
16330 | /** | ||
16331 | * An element may be an instance of type "FunctionalOutput class". | ||
16332 | */ | ||
16333 | private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
16334 | { | ||
16335 | find interpretation(problem,interpretation); | ||
16336 | PartialInterpretation.newElements(interpretation,element); | ||
16337 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
16338 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
16339 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
16340 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
16341 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
16342 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
16343 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
16344 | neg find isPrimitive(element); | ||
16345 | } or { | ||
16346 | find interpretation(problem,interpretation); | ||
16347 | PartialInterpretation.openWorldElements(interpretation,element); | ||
16348 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
16349 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
16350 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
16351 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
16352 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
16353 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
16354 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
16355 | neg find isPrimitive(element); | ||
16356 | } or | ||
16357 | { find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } | ||
16358 | /** | ||
16359 | * An element must be an instance of type "FunctionalData class". | ||
16360 | */ | ||
16361 | private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
16362 | Type.name(type,"FunctionalData class"); | ||
16363 | find directInstanceOf(problem,interpretation,element,type); | ||
16364 | } | ||
16365 | private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
16366 | find interpretation(problem,interpretation); | ||
16367 | PartialInterpretation.scopes(interpretation,scope); | ||
16368 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
16369 | Scope.maxNewElements(scope,0); | ||
16370 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
16371 | Type.name(type,"FunctionalData class"); | ||
16372 | } | ||
16373 | |||
16374 | /** | ||
16375 | * An element may be an instance of type "FunctionalData class". | ||
16376 | */ | ||
16377 | private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
16378 | { | ||
16379 | find interpretation(problem,interpretation); | ||
16380 | PartialInterpretation.newElements(interpretation,element); | ||
16381 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
16382 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
16383 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
16384 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
16385 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
16386 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
16387 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
16388 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
16389 | neg find isPrimitive(element); | ||
16390 | } or { | ||
16391 | find interpretation(problem,interpretation); | ||
16392 | PartialInterpretation.openWorldElements(interpretation,element); | ||
16393 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
16394 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
16395 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
16396 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
16397 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
16398 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
16399 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
16400 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
16401 | neg find isPrimitive(element); | ||
16402 | } or | ||
16403 | { find mustInstanceOfFunctionalData_class(problem,interpretation,element); } | ||
16404 | /** | ||
16405 | * An element must be an instance of type "FunctionType enum". | ||
16406 | */ | ||
16407 | private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
16408 | Type.name(type,"FunctionType enum"); | ||
16409 | find directInstanceOf(problem,interpretation,element,type); | ||
16410 | } | ||
16411 | private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
16412 | find interpretation(problem,interpretation); | ||
16413 | PartialInterpretation.scopes(interpretation,scope); | ||
16414 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
16415 | Scope.maxNewElements(scope,0); | ||
16416 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
16417 | Type.name(type,"FunctionType enum"); | ||
16418 | } | ||
16419 | |||
16420 | /** | ||
16421 | * An element may be an instance of type "FunctionType enum". | ||
16422 | */ | ||
16423 | private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
16424 | { find mustInstanceOfFunctionType_enum(problem,interpretation,element); } | ||
16425 | /** | ||
16426 | * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
16427 | */ | ||
16428 | private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
16429 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
16430 | find directInstanceOf(problem,interpretation,element,type); | ||
16431 | } | ||
16432 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
16433 | find interpretation(problem,interpretation); | ||
16434 | PartialInterpretation.scopes(interpretation,scope); | ||
16435 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
16436 | Scope.maxNewElements(scope,0); | ||
16437 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
16438 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
16439 | } | ||
16440 | |||
16441 | /** | ||
16442 | * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
16443 | */ | ||
16444 | private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
16445 | { find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } | ||
16446 | /** | ||
16447 | * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
16448 | */ | ||
16449 | private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
16450 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
16451 | find directInstanceOf(problem,interpretation,element,type); | ||
16452 | } | ||
16453 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
16454 | find interpretation(problem,interpretation); | ||
16455 | PartialInterpretation.scopes(interpretation,scope); | ||
16456 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
16457 | Scope.maxNewElements(scope,0); | ||
16458 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
16459 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
16460 | } | ||
16461 | |||
16462 | /** | ||
16463 | * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
16464 | */ | ||
16465 | private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
16466 | { | ||
16467 | find interpretation(problem,interpretation); | ||
16468 | PartialInterpretation.newElements(interpretation,element); | ||
16469 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
16470 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
16471 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
16472 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
16473 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
16474 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
16475 | neg find isPrimitive(element); | ||
16476 | } or { | ||
16477 | find interpretation(problem,interpretation); | ||
16478 | PartialInterpretation.openWorldElements(interpretation,element); | ||
16479 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
16480 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
16481 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
16482 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
16483 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
16484 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
16485 | neg find isPrimitive(element); | ||
16486 | } or | ||
16487 | { find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } | ||
16488 | |||
16489 | ////////// | ||
16490 | // 1.2 Relation Declaration Indexers | ||
16491 | ////////// | ||
16492 | /** | ||
16493 | * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) | ||
16494 | */ | ||
16495 | private pattern mustInRelationinterface_reference_FunctionalElement( | ||
16496 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16497 | source: DefinedElement, target:DefinedElement) | ||
16498 | { | ||
16499 | find interpretation(problem,interpretation); | ||
16500 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
16501 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); | ||
16502 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
16503 | BinaryElementRelationLink.param1(link,source); | ||
16504 | BinaryElementRelationLink.param2(link,target); | ||
16505 | } | ||
16506 | /** | ||
16507 | * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) | ||
16508 | */ | ||
16509 | private pattern mayInRelationinterface_reference_FunctionalElement( | ||
16510 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16511 | source: DefinedElement, target:DefinedElement) | ||
16512 | { | ||
16513 | find interpretation(problem,interpretation); | ||
16514 | // The two endpoint of the link have to exist | ||
16515 | find mayExist(problem, interpretation, source); | ||
16516 | find mayExist(problem, interpretation, target); | ||
16517 | // Type consistency | ||
16518 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
16519 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
16520 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
16521 | // the upper bound of the multiplicity should be considered. | ||
16522 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); | ||
16523 | check(numberOfExistingReferences < 1); | ||
16524 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
16525 | // the upper bound of the opposite reference multiplicity should be considered. | ||
16526 | numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); | ||
16527 | check(numberOfExistingOppositeReferences < 1); | ||
16528 | // The reference is containment, then a new reference cannot be create if: | ||
16529 | // 1. Multiple parents | ||
16530 | neg find mustContains4(problem,interpretation,_,target); | ||
16531 | // 2. Circle in the containment hierarchy | ||
16532 | neg find mustTransitiveContains(source,target); | ||
16533 | } or { | ||
16534 | find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); | ||
16535 | } | ||
16536 | /** | ||
16537 | * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) | ||
16538 | */ | ||
16539 | private pattern mustInRelationmodel_reference_FunctionalElement( | ||
16540 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16541 | source: DefinedElement, target:DefinedElement) | ||
16542 | { | ||
16543 | find interpretation(problem,interpretation); | ||
16544 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
16545 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
16546 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
16547 | BinaryElementRelationLink.param1(link,source); | ||
16548 | BinaryElementRelationLink.param2(link,target); | ||
16549 | } | ||
16550 | /** | ||
16551 | * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target) | ||
16552 | */ | ||
16553 | private pattern mayInRelationmodel_reference_FunctionalElement( | ||
16554 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16555 | source: DefinedElement, target:DefinedElement) | ||
16556 | { | ||
16557 | find interpretation(problem,interpretation); | ||
16558 | // The two endpoint of the link have to exist | ||
16559 | find mayExist(problem, interpretation, source); | ||
16560 | find mayExist(problem, interpretation, target); | ||
16561 | // Type consistency | ||
16562 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
16563 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target); | ||
16564 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
16565 | // the upper bound of the multiplicity should be considered. | ||
16566 | numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_); | ||
16567 | check(numberOfExistingReferences < 1); | ||
16568 | } or { | ||
16569 | find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target); | ||
16570 | } | ||
16571 | /** | ||
16572 | * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) | ||
16573 | */ | ||
16574 | private pattern mustInRelationparent_reference_FunctionalElement( | ||
16575 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16576 | source: DefinedElement, target:DefinedElement) | ||
16577 | { | ||
16578 | find interpretation(problem,interpretation); | ||
16579 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
16580 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); | ||
16581 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
16582 | BinaryElementRelationLink.param1(link,source); | ||
16583 | BinaryElementRelationLink.param2(link,target); | ||
16584 | } | ||
16585 | /** | ||
16586 | * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) | ||
16587 | */ | ||
16588 | private pattern mayInRelationparent_reference_FunctionalElement( | ||
16589 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16590 | source: DefinedElement, target:DefinedElement) | ||
16591 | { | ||
16592 | find interpretation(problem,interpretation); | ||
16593 | // The two endpoint of the link have to exist | ||
16594 | find mayExist(problem, interpretation, source); | ||
16595 | find mayExist(problem, interpretation, target); | ||
16596 | // Type consistency | ||
16597 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
16598 | find mayInstanceOfFunction_class(problem,interpretation,target); | ||
16599 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
16600 | // the upper bound of the multiplicity should be considered. | ||
16601 | numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); | ||
16602 | check(numberOfExistingReferences < 1); | ||
16603 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
16604 | // 1. Multiple parents | ||
16605 | neg find mustContains4(problem,interpretation,source,_); | ||
16606 | // 2. Circle in the containment hierarchy | ||
16607 | neg find mustTransitiveContains(source,target); | ||
16608 | } or { | ||
16609 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); | ||
16610 | } | ||
16611 | /** | ||
16612 | * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) | ||
16613 | */ | ||
16614 | private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( | ||
16615 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16616 | source: DefinedElement, target:DefinedElement) | ||
16617 | { | ||
16618 | find interpretation(problem,interpretation); | ||
16619 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
16620 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
16621 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
16622 | BinaryElementRelationLink.param1(link,source); | ||
16623 | BinaryElementRelationLink.param2(link,target); | ||
16624 | } | ||
16625 | /** | ||
16626 | * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) | ||
16627 | */ | ||
16628 | private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( | ||
16629 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16630 | source: DefinedElement, target:DefinedElement) | ||
16631 | { | ||
16632 | find interpretation(problem,interpretation); | ||
16633 | // The two endpoint of the link have to exist | ||
16634 | find mayExist(problem, interpretation, source); | ||
16635 | find mayExist(problem, interpretation, target); | ||
16636 | // Type consistency | ||
16637 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); | ||
16638 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
16639 | // The reference is containment, then a new reference cannot be create if: | ||
16640 | // 1. Multiple parents | ||
16641 | neg find mustContains4(problem,interpretation,_,target); | ||
16642 | // 2. Circle in the containment hierarchy | ||
16643 | neg find mustTransitiveContains(source,target); | ||
16644 | } or { | ||
16645 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); | ||
16646 | } | ||
16647 | /** | ||
16648 | * Matcher for detecting tuples t where []subElements reference Function(source,target) | ||
16649 | */ | ||
16650 | private pattern mustInRelationsubElements_reference_Function( | ||
16651 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16652 | source: DefinedElement, target:DefinedElement) | ||
16653 | { | ||
16654 | find interpretation(problem,interpretation); | ||
16655 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
16656 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); | ||
16657 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
16658 | BinaryElementRelationLink.param1(link,source); | ||
16659 | BinaryElementRelationLink.param2(link,target); | ||
16660 | } | ||
16661 | /** | ||
16662 | * Matcher for detecting tuples t where <>subElements reference Function(source,target) | ||
16663 | */ | ||
16664 | private pattern mayInRelationsubElements_reference_Function( | ||
16665 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16666 | source: DefinedElement, target:DefinedElement) | ||
16667 | { | ||
16668 | find interpretation(problem,interpretation); | ||
16669 | // The two endpoint of the link have to exist | ||
16670 | find mayExist(problem, interpretation, source); | ||
16671 | find mayExist(problem, interpretation, target); | ||
16672 | // Type consistency | ||
16673 | find mayInstanceOfFunction_class(problem,interpretation,source); | ||
16674 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
16675 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
16676 | // the upper bound of the opposite reference multiplicity should be considered. | ||
16677 | numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); | ||
16678 | check(numberOfExistingOppositeReferences < 1); | ||
16679 | // The reference is containment, then a new reference cannot be create if: | ||
16680 | // 1. Multiple parents | ||
16681 | neg find mustContains4(problem,interpretation,_,target); | ||
16682 | // 2. Circle in the containment hierarchy | ||
16683 | neg find mustTransitiveContains(source,target); | ||
16684 | } or { | ||
16685 | find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); | ||
16686 | } | ||
16687 | /** | ||
16688 | * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) | ||
16689 | */ | ||
16690 | private pattern mustInRelationdata_reference_FAMTerminator( | ||
16691 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16692 | source: DefinedElement, target:DefinedElement) | ||
16693 | { | ||
16694 | find interpretation(problem,interpretation); | ||
16695 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
16696 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); | ||
16697 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
16698 | BinaryElementRelationLink.param1(link,source); | ||
16699 | BinaryElementRelationLink.param2(link,target); | ||
16700 | } | ||
16701 | /** | ||
16702 | * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) | ||
16703 | */ | ||
16704 | private pattern mayInRelationdata_reference_FAMTerminator( | ||
16705 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16706 | source: DefinedElement, target:DefinedElement) | ||
16707 | { | ||
16708 | find interpretation(problem,interpretation); | ||
16709 | // The two endpoint of the link have to exist | ||
16710 | find mayExist(problem, interpretation, source); | ||
16711 | find mayExist(problem, interpretation, target); | ||
16712 | // Type consistency | ||
16713 | find mayInstanceOfFAMTerminator_class(problem,interpretation,source); | ||
16714 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
16715 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
16716 | // the upper bound of the multiplicity should be considered. | ||
16717 | numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); | ||
16718 | check(numberOfExistingReferences < 1); | ||
16719 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
16720 | // the upper bound of the opposite reference multiplicity should be considered. | ||
16721 | numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); | ||
16722 | check(numberOfExistingOppositeReferences < 1); | ||
16723 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
16724 | // 1. Multiple parents | ||
16725 | neg find mustContains4(problem,interpretation,source,_); | ||
16726 | // 2. Circle in the containment hierarchy | ||
16727 | neg find mustTransitiveContains(source,target); | ||
16728 | } or { | ||
16729 | find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); | ||
16730 | } | ||
16731 | /** | ||
16732 | * Matcher for detecting tuples t where []from reference InformationLink(source,target) | ||
16733 | */ | ||
16734 | private pattern mustInRelationfrom_reference_InformationLink( | ||
16735 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16736 | source: DefinedElement, target:DefinedElement) | ||
16737 | { | ||
16738 | find interpretation(problem,interpretation); | ||
16739 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
16740 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); | ||
16741 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
16742 | BinaryElementRelationLink.param1(link,source); | ||
16743 | BinaryElementRelationLink.param2(link,target); | ||
16744 | } | ||
16745 | /** | ||
16746 | * Matcher for detecting tuples t where <>from reference InformationLink(source,target) | ||
16747 | */ | ||
16748 | private pattern mayInRelationfrom_reference_InformationLink( | ||
16749 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16750 | source: DefinedElement, target:DefinedElement) | ||
16751 | { | ||
16752 | find interpretation(problem,interpretation); | ||
16753 | // The two endpoint of the link have to exist | ||
16754 | find mayExist(problem, interpretation, source); | ||
16755 | find mayExist(problem, interpretation, target); | ||
16756 | // Type consistency | ||
16757 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
16758 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); | ||
16759 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
16760 | // the upper bound of the multiplicity should be considered. | ||
16761 | numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); | ||
16762 | check(numberOfExistingReferences < 1); | ||
16763 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
16764 | // 1. Multiple parents | ||
16765 | neg find mustContains4(problem,interpretation,source,_); | ||
16766 | // 2. Circle in the containment hierarchy | ||
16767 | neg find mustTransitiveContains(source,target); | ||
16768 | } or { | ||
16769 | find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); | ||
16770 | } | ||
16771 | /** | ||
16772 | * Matcher for detecting tuples t where []to reference InformationLink(source,target) | ||
16773 | */ | ||
16774 | private pattern mustInRelationto_reference_InformationLink( | ||
16775 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16776 | source: DefinedElement, target:DefinedElement) | ||
16777 | { | ||
16778 | find interpretation(problem,interpretation); | ||
16779 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
16780 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
16781 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
16782 | BinaryElementRelationLink.param1(link,source); | ||
16783 | BinaryElementRelationLink.param2(link,target); | ||
16784 | } | ||
16785 | /** | ||
16786 | * Matcher for detecting tuples t where <>to reference InformationLink(source,target) | ||
16787 | */ | ||
16788 | private pattern mayInRelationto_reference_InformationLink( | ||
16789 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16790 | source: DefinedElement, target:DefinedElement) | ||
16791 | { | ||
16792 | find interpretation(problem,interpretation); | ||
16793 | // The two endpoint of the link have to exist | ||
16794 | find mayExist(problem, interpretation, source); | ||
16795 | find mayExist(problem, interpretation, target); | ||
16796 | // Type consistency | ||
16797 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
16798 | find mayInstanceOfFunctionalInput_class(problem,interpretation,target); | ||
16799 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
16800 | // the upper bound of the multiplicity should be considered. | ||
16801 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); | ||
16802 | check(numberOfExistingReferences < 1); | ||
16803 | } or { | ||
16804 | find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); | ||
16805 | } | ||
16806 | /** | ||
16807 | * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) | ||
16808 | */ | ||
16809 | private pattern mustInRelationdata_reference_FunctionalInterface( | ||
16810 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16811 | source: DefinedElement, target:DefinedElement) | ||
16812 | { | ||
16813 | find interpretation(problem,interpretation); | ||
16814 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
16815 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); | ||
16816 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
16817 | BinaryElementRelationLink.param1(link,source); | ||
16818 | BinaryElementRelationLink.param2(link,target); | ||
16819 | } | ||
16820 | /** | ||
16821 | * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) | ||
16822 | */ | ||
16823 | private pattern mayInRelationdata_reference_FunctionalInterface( | ||
16824 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16825 | source: DefinedElement, target:DefinedElement) | ||
16826 | { | ||
16827 | find interpretation(problem,interpretation); | ||
16828 | // The two endpoint of the link have to exist | ||
16829 | find mayExist(problem, interpretation, source); | ||
16830 | find mayExist(problem, interpretation, target); | ||
16831 | // Type consistency | ||
16832 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
16833 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
16834 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
16835 | // the upper bound of the opposite reference multiplicity should be considered. | ||
16836 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); | ||
16837 | check(numberOfExistingOppositeReferences < 1); | ||
16838 | // The reference is containment, then a new reference cannot be create if: | ||
16839 | // 1. Multiple parents | ||
16840 | neg find mustContains4(problem,interpretation,_,target); | ||
16841 | // 2. Circle in the containment hierarchy | ||
16842 | neg find mustTransitiveContains(source,target); | ||
16843 | } or { | ||
16844 | find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); | ||
16845 | } | ||
16846 | /** | ||
16847 | * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) | ||
16848 | */ | ||
16849 | private pattern mustInRelationelement_reference_FunctionalInterface( | ||
16850 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16851 | source: DefinedElement, target:DefinedElement) | ||
16852 | { | ||
16853 | find interpretation(problem,interpretation); | ||
16854 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
16855 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); | ||
16856 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
16857 | BinaryElementRelationLink.param1(link,source); | ||
16858 | BinaryElementRelationLink.param2(link,target); | ||
16859 | } | ||
16860 | /** | ||
16861 | * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) | ||
16862 | */ | ||
16863 | private pattern mayInRelationelement_reference_FunctionalInterface( | ||
16864 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16865 | source: DefinedElement, target:DefinedElement) | ||
16866 | { | ||
16867 | find interpretation(problem,interpretation); | ||
16868 | // The two endpoint of the link have to exist | ||
16869 | find mayExist(problem, interpretation, source); | ||
16870 | find mayExist(problem, interpretation, target); | ||
16871 | // Type consistency | ||
16872 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
16873 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
16874 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
16875 | // the upper bound of the multiplicity should be considered. | ||
16876 | numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); | ||
16877 | check(numberOfExistingReferences < 1); | ||
16878 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
16879 | // the upper bound of the opposite reference multiplicity should be considered. | ||
16880 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); | ||
16881 | check(numberOfExistingOppositeReferences < 1); | ||
16882 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
16883 | // 1. Multiple parents | ||
16884 | neg find mustContains4(problem,interpretation,source,_); | ||
16885 | // 2. Circle in the containment hierarchy | ||
16886 | neg find mustTransitiveContains(source,target); | ||
16887 | } or { | ||
16888 | find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); | ||
16889 | } | ||
16890 | /** | ||
16891 | * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) | ||
16892 | */ | ||
16893 | private pattern mustInRelationIncomingLinks_reference_FunctionalInput( | ||
16894 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16895 | source: DefinedElement, target:DefinedElement) | ||
16896 | { | ||
16897 | find interpretation(problem,interpretation); | ||
16898 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
16899 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
16900 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
16901 | BinaryElementRelationLink.param1(link,source); | ||
16902 | BinaryElementRelationLink.param2(link,target); | ||
16903 | } | ||
16904 | /** | ||
16905 | * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) | ||
16906 | */ | ||
16907 | private pattern mayInRelationIncomingLinks_reference_FunctionalInput( | ||
16908 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16909 | source: DefinedElement, target:DefinedElement) | ||
16910 | { | ||
16911 | find interpretation(problem,interpretation); | ||
16912 | // The two endpoint of the link have to exist | ||
16913 | find mayExist(problem, interpretation, source); | ||
16914 | find mayExist(problem, interpretation, target); | ||
16915 | // Type consistency | ||
16916 | find mayInstanceOfFunctionalInput_class(problem,interpretation,source); | ||
16917 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
16918 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
16919 | // the upper bound of the opposite reference multiplicity should be considered. | ||
16920 | numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); | ||
16921 | check(numberOfExistingOppositeReferences < 1); | ||
16922 | } or { | ||
16923 | find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); | ||
16924 | } | ||
16925 | /** | ||
16926 | * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) | ||
16927 | */ | ||
16928 | private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( | ||
16929 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16930 | source: DefinedElement, target:DefinedElement) | ||
16931 | { | ||
16932 | find interpretation(problem,interpretation); | ||
16933 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
16934 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); | ||
16935 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
16936 | BinaryElementRelationLink.param1(link,source); | ||
16937 | BinaryElementRelationLink.param2(link,target); | ||
16938 | } | ||
16939 | /** | ||
16940 | * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) | ||
16941 | */ | ||
16942 | private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( | ||
16943 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16944 | source: DefinedElement, target:DefinedElement) | ||
16945 | { | ||
16946 | find interpretation(problem,interpretation); | ||
16947 | // The two endpoint of the link have to exist | ||
16948 | find mayExist(problem, interpretation, source); | ||
16949 | find mayExist(problem, interpretation, target); | ||
16950 | // Type consistency | ||
16951 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); | ||
16952 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
16953 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
16954 | // the upper bound of the opposite reference multiplicity should be considered. | ||
16955 | numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); | ||
16956 | check(numberOfExistingOppositeReferences < 1); | ||
16957 | // The reference is containment, then a new reference cannot be create if: | ||
16958 | // 1. Multiple parents | ||
16959 | neg find mustContains4(problem,interpretation,_,target); | ||
16960 | // 2. Circle in the containment hierarchy | ||
16961 | neg find mustTransitiveContains(source,target); | ||
16962 | } or { | ||
16963 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); | ||
16964 | } | ||
16965 | /** | ||
16966 | * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) | ||
16967 | */ | ||
16968 | private pattern mustInRelationterminator_reference_FunctionalData( | ||
16969 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16970 | source: DefinedElement, target:DefinedElement) | ||
16971 | { | ||
16972 | find interpretation(problem,interpretation); | ||
16973 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
16974 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); | ||
16975 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
16976 | BinaryElementRelationLink.param1(link,source); | ||
16977 | BinaryElementRelationLink.param2(link,target); | ||
16978 | } | ||
16979 | /** | ||
16980 | * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) | ||
16981 | */ | ||
16982 | private pattern mayInRelationterminator_reference_FunctionalData( | ||
16983 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16984 | source: DefinedElement, target:DefinedElement) | ||
16985 | { | ||
16986 | find interpretation(problem,interpretation); | ||
16987 | // The two endpoint of the link have to exist | ||
16988 | find mayExist(problem, interpretation, source); | ||
16989 | find mayExist(problem, interpretation, target); | ||
16990 | // Type consistency | ||
16991 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
16992 | find mayInstanceOfFAMTerminator_class(problem,interpretation,target); | ||
16993 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
16994 | // the upper bound of the multiplicity should be considered. | ||
16995 | numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); | ||
16996 | check(numberOfExistingReferences < 1); | ||
16997 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
16998 | // the upper bound of the opposite reference multiplicity should be considered. | ||
16999 | numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); | ||
17000 | check(numberOfExistingOppositeReferences < 1); | ||
17001 | // The reference is containment, then a new reference cannot be create if: | ||
17002 | // 1. Multiple parents | ||
17003 | neg find mustContains4(problem,interpretation,_,target); | ||
17004 | // 2. Circle in the containment hierarchy | ||
17005 | neg find mustTransitiveContains(source,target); | ||
17006 | } or { | ||
17007 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); | ||
17008 | } | ||
17009 | /** | ||
17010 | * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) | ||
17011 | */ | ||
17012 | private pattern mustInRelationinterface_reference_FunctionalData( | ||
17013 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17014 | source: DefinedElement, target:DefinedElement) | ||
17015 | { | ||
17016 | find interpretation(problem,interpretation); | ||
17017 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
17018 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); | ||
17019 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
17020 | BinaryElementRelationLink.param1(link,source); | ||
17021 | BinaryElementRelationLink.param2(link,target); | ||
17022 | } | ||
17023 | /** | ||
17024 | * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) | ||
17025 | */ | ||
17026 | private pattern mayInRelationinterface_reference_FunctionalData( | ||
17027 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17028 | source: DefinedElement, target:DefinedElement) | ||
17029 | { | ||
17030 | find interpretation(problem,interpretation); | ||
17031 | // The two endpoint of the link have to exist | ||
17032 | find mayExist(problem, interpretation, source); | ||
17033 | find mayExist(problem, interpretation, target); | ||
17034 | // Type consistency | ||
17035 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
17036 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
17037 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
17038 | // the upper bound of the multiplicity should be considered. | ||
17039 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); | ||
17040 | check(numberOfExistingReferences < 1); | ||
17041 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
17042 | // 1. Multiple parents | ||
17043 | neg find mustContains4(problem,interpretation,source,_); | ||
17044 | // 2. Circle in the containment hierarchy | ||
17045 | neg find mustTransitiveContains(source,target); | ||
17046 | } or { | ||
17047 | find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); | ||
17048 | } | ||
17049 | /** | ||
17050 | * Matcher for detecting tuples t where []type attribute Function(source,target) | ||
17051 | */ | ||
17052 | private pattern mustInRelationtype_attribute_Function( | ||
17053 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17054 | source: DefinedElement, target:DefinedElement) | ||
17055 | { | ||
17056 | find interpretation(problem,interpretation); | ||
17057 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
17058 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
17059 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
17060 | BinaryElementRelationLink.param1(link,source); | ||
17061 | BinaryElementRelationLink.param2(link,target); | ||
17062 | } | ||
17063 | /** | ||
17064 | * Matcher for detecting tuples t where <>type attribute Function(source,target) | ||
17065 | */ | ||
17066 | private pattern mayInRelationtype_attribute_Function( | ||
17067 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17068 | source: DefinedElement, target:DefinedElement) | ||
17069 | { | ||
17070 | find interpretation(problem,interpretation); | ||
17071 | // The two endpoint of the link have to exist | ||
17072 | find mayExist(problem, interpretation, source); | ||
17073 | find mayExist(problem, interpretation, target); | ||
17074 | // Type consistency | ||
17075 | find mayInstanceOfFunction_class(problem,interpretation,source); | ||
17076 | find mayInstanceOfFunctionType_enum(problem,interpretation,target); | ||
17077 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
17078 | // the upper bound of the multiplicity should be considered. | ||
17079 | numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_); | ||
17080 | check(numberOfExistingReferences < 1); | ||
17081 | } or { | ||
17082 | find mustInRelationtype_attribute_Function(problem,interpretation,source,target); | ||
17083 | } | ||
17084 | |||
17085 | ////////// | ||
17086 | // 1.3 Relation Definition Indexers | ||
17087 | ////////// | ||
17088 | |||
17089 | ////////// | ||
17090 | // 1.4 Containment Indexer | ||
17091 | ////////// | ||
17092 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
17093 | find mustContains4(_,_,source,target); | ||
17094 | } | ||
17095 | |||
17096 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17097 | source: DefinedElement, target: DefinedElement) | ||
17098 | { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or | ||
17099 | |||
17100 | { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or | ||
17101 | |||
17102 | { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or | ||
17103 | |||
17104 | { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or | ||
17105 | |||
17106 | { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or | ||
17107 | |||
17108 | { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } | ||
17109 | |||
17110 | private pattern mustTransitiveContains(source,target) { | ||
17111 | find mustContains2+(source,target); | ||
17112 | } | ||
17113 | |||
17114 | ////////// | ||
17115 | // 2. Invalidation Indexers | ||
17116 | ////////// | ||
17117 | // 2.1 Invalidated by WF Queries | ||
17118 | ////////// | ||
17119 | |||
17120 | ////////// | ||
17121 | // 3. Unfinishedness Indexers | ||
17122 | ////////// | ||
17123 | // 3.1 Unfinishedness Measured by Multiplicity | ||
17124 | ////////// | ||
17125 | pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
17126 | find interpretation(problem,interpretation); | ||
17127 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
17128 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
17129 | find mustInstanceOfFunctionalElement_class(problem,interpretation,object); | ||
17130 | numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_); | ||
17131 | check(numberOfExistingReferences < 1); | ||
17132 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
17133 | } | ||
17134 | pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
17135 | find interpretation(problem,interpretation); | ||
17136 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
17137 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
17138 | find mustInstanceOfInformationLink_class(problem,interpretation,object); | ||
17139 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); | ||
17140 | check(numberOfExistingReferences < 1); | ||
17141 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
17142 | } | ||
17143 | pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
17144 | find interpretation(problem,interpretation); | ||
17145 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
17146 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
17147 | find mustInstanceOfFunction_class(problem,interpretation,object); | ||
17148 | numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_); | ||
17149 | check(numberOfExistingReferences < 1); | ||
17150 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
17151 | } | ||
17152 | |||
17153 | ////////// | ||
17154 | // 3.2 Unfinishedness Measured by WF Queries | ||
17155 | ////////// | ||
17156 | |||
17157 | ////////// | ||
17158 | // 4. Refinement Indexers | ||
17159 | ////////// | ||
17160 | // 4.1 Object constructors | ||
17161 | ////////// | ||
17162 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
17163 | { | ||
17164 | find interpretation(problem,interpretation); | ||
17165 | find mustInstanceOfFunction_class(problem,interpretation,root); | ||
17166 | find mustExist(problem, interpretation, root); | ||
17167 | }or{ | ||
17168 | find interpretation(problem,interpretation); | ||
17169 | find mustInstanceOfFunctionalElement_class(problem,interpretation,root); | ||
17170 | find mustExist(problem, interpretation, root); | ||
17171 | }or{ | ||
17172 | find interpretation(problem,interpretation); | ||
17173 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); | ||
17174 | find mustExist(problem, interpretation, root); | ||
17175 | }or{ | ||
17176 | find interpretation(problem,interpretation); | ||
17177 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); | ||
17178 | find mustExist(problem, interpretation, root); | ||
17179 | }or{ | ||
17180 | find interpretation(problem,interpretation); | ||
17181 | find mustInstanceOfFunctionalData_class(problem,interpretation,root); | ||
17182 | find mustExist(problem, interpretation, root); | ||
17183 | }or{ | ||
17184 | find interpretation(problem,interpretation); | ||
17185 | find mustInstanceOfFAMTerminator_class(problem,interpretation,root); | ||
17186 | find mustExist(problem, interpretation, root); | ||
17187 | }or{ | ||
17188 | find interpretation(problem,interpretation); | ||
17189 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); | ||
17190 | find mustExist(problem, interpretation, root); | ||
17191 | }or{ | ||
17192 | find interpretation(problem,interpretation); | ||
17193 | find mustInstanceOfFunctionalInput_class(problem,interpretation,root); | ||
17194 | find mustExist(problem, interpretation, root); | ||
17195 | }or{ | ||
17196 | find interpretation(problem,interpretation); | ||
17197 | find mustInstanceOfInformationLink_class(problem,interpretation,root); | ||
17198 | find mustExist(problem, interpretation, root); | ||
17199 | }or{ | ||
17200 | find interpretation(problem,interpretation); | ||
17201 | find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); | ||
17202 | find mustExist(problem, interpretation, root); | ||
17203 | }or{ | ||
17204 | find interpretation(problem,interpretation); | ||
17205 | find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); | ||
17206 | find mustExist(problem, interpretation, root); | ||
17207 | } | ||
17208 | pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( | ||
17209 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17210 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
17211 | container:DefinedElement) | ||
17212 | { | ||
17213 | find interpretation(problem,interpretation); | ||
17214 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17215 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
17216 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
17217 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
17218 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); | ||
17219 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
17220 | find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); | ||
17221 | find mustExist(problem, interpretation, container); | ||
17222 | neg find mustExist(problem, interpretation, newObject); | ||
17223 | } | ||
17224 | pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( | ||
17225 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17226 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
17227 | container:DefinedElement) | ||
17228 | { | ||
17229 | find interpretation(problem,interpretation); | ||
17230 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17231 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
17232 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
17233 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); | ||
17234 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
17235 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); | ||
17236 | find mustInstanceOfFunction_class(problem,interpretation,container); | ||
17237 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
17238 | find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); | ||
17239 | find mustExist(problem, interpretation, container); | ||
17240 | neg find mustExist(problem, interpretation, newObject); | ||
17241 | } | ||
17242 | pattern createObject_Function_class( | ||
17243 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17244 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17245 | { | ||
17246 | find interpretation(problem,interpretation); | ||
17247 | neg find hasElementInContainment(problem,interpretation); | ||
17248 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17249 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
17250 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
17251 | find mayExist(problem, interpretation, newObject); | ||
17252 | neg find mustExist(problem, interpretation, newObject); | ||
17253 | } | ||
17254 | pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( | ||
17255 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17256 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17257 | { | ||
17258 | find interpretation(problem,interpretation); | ||
17259 | neg find hasElementInContainment(problem,interpretation); | ||
17260 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17261 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); | ||
17262 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); | ||
17263 | find mayExist(problem, interpretation, newObject); | ||
17264 | neg find mustExist(problem, interpretation, newObject); | ||
17265 | } | ||
17266 | pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
17267 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17268 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
17269 | container:DefinedElement) | ||
17270 | { | ||
17271 | find interpretation(problem,interpretation); | ||
17272 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17273 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
17274 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
17275 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
17276 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
17277 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
17278 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
17279 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
17280 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
17281 | find mustExist(problem, interpretation, container); | ||
17282 | neg find mustExist(problem, interpretation, newObject); | ||
17283 | } | ||
17284 | pattern createObject_FunctionalOutput_class( | ||
17285 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17286 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17287 | { | ||
17288 | find interpretation(problem,interpretation); | ||
17289 | neg find hasElementInContainment(problem,interpretation); | ||
17290 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17291 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
17292 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
17293 | find mayExist(problem, interpretation, newObject); | ||
17294 | neg find mustExist(problem, interpretation, newObject); | ||
17295 | } | ||
17296 | pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( | ||
17297 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17298 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
17299 | container:DefinedElement) | ||
17300 | { | ||
17301 | find interpretation(problem,interpretation); | ||
17302 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17303 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
17304 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
17305 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); | ||
17306 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
17307 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); | ||
17308 | find mustInstanceOfFunctionalData_class(problem,interpretation,container); | ||
17309 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
17310 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); | ||
17311 | find mustExist(problem, interpretation, container); | ||
17312 | neg find mustExist(problem, interpretation, newObject); | ||
17313 | } | ||
17314 | pattern createObject_FAMTerminator_class( | ||
17315 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17316 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17317 | { | ||
17318 | find interpretation(problem,interpretation); | ||
17319 | neg find hasElementInContainment(problem,interpretation); | ||
17320 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17321 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
17322 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
17323 | find mayExist(problem, interpretation, newObject); | ||
17324 | neg find mustExist(problem, interpretation, newObject); | ||
17325 | } | ||
17326 | pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
17327 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17328 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
17329 | container:DefinedElement) | ||
17330 | { | ||
17331 | find interpretation(problem,interpretation); | ||
17332 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17333 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
17334 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
17335 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
17336 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
17337 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
17338 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
17339 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
17340 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
17341 | find mustExist(problem, interpretation, container); | ||
17342 | neg find mustExist(problem, interpretation, newObject); | ||
17343 | } | ||
17344 | pattern createObject_FunctionalInput_class( | ||
17345 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17346 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17347 | { | ||
17348 | find interpretation(problem,interpretation); | ||
17349 | neg find hasElementInContainment(problem,interpretation); | ||
17350 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17351 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
17352 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
17353 | find mayExist(problem, interpretation, newObject); | ||
17354 | neg find mustExist(problem, interpretation, newObject); | ||
17355 | } | ||
17356 | pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( | ||
17357 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17358 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
17359 | container:DefinedElement) | ||
17360 | { | ||
17361 | find interpretation(problem,interpretation); | ||
17362 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17363 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
17364 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
17365 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); | ||
17366 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
17367 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); | ||
17368 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); | ||
17369 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
17370 | find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); | ||
17371 | find mustExist(problem, interpretation, container); | ||
17372 | neg find mustExist(problem, interpretation, newObject); | ||
17373 | } | ||
17374 | pattern createObject_InformationLink_class( | ||
17375 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17376 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17377 | { | ||
17378 | find interpretation(problem,interpretation); | ||
17379 | neg find hasElementInContainment(problem,interpretation); | ||
17380 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17381 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
17382 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
17383 | find mayExist(problem, interpretation, newObject); | ||
17384 | neg find mustExist(problem, interpretation, newObject); | ||
17385 | } | ||
17386 | pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( | ||
17387 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17388 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
17389 | container:DefinedElement) | ||
17390 | { | ||
17391 | find interpretation(problem,interpretation); | ||
17392 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17393 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
17394 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
17395 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); | ||
17396 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
17397 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); | ||
17398 | find mustInstanceOfFunctionalElement_class(problem,interpretation,container); | ||
17399 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
17400 | find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); | ||
17401 | find mustExist(problem, interpretation, container); | ||
17402 | neg find mustExist(problem, interpretation, newObject); | ||
17403 | } | ||
17404 | pattern createObject_FunctionalInterface_class( | ||
17405 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17406 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17407 | { | ||
17408 | find interpretation(problem,interpretation); | ||
17409 | neg find hasElementInContainment(problem,interpretation); | ||
17410 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17411 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
17412 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
17413 | find mayExist(problem, interpretation, newObject); | ||
17414 | neg find mustExist(problem, interpretation, newObject); | ||
17415 | } | ||
17416 | |||
17417 | ////////// | ||
17418 | // 4.2 Type refinement | ||
17419 | ////////// | ||
17420 | pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17421 | find interpretation(problem,interpretation); | ||
17422 | PartialInterpretation.newElements(interpretation,element); | ||
17423 | find mayInstanceOfFunction_class(problem,interpretation,element); | ||
17424 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
17425 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
17426 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
17427 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
17428 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
17429 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
17430 | } | ||
17431 | pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17432 | find interpretation(problem,interpretation); | ||
17433 | PartialInterpretation.newElements(interpretation,element); | ||
17434 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
17435 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
17436 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
17437 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
17438 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
17439 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
17440 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
17441 | } | ||
17442 | pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17443 | find interpretation(problem,interpretation); | ||
17444 | PartialInterpretation.newElements(interpretation,element); | ||
17445 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
17446 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
17447 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
17448 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
17449 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
17450 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
17451 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
17452 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
17453 | } | ||
17454 | pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17455 | find interpretation(problem,interpretation); | ||
17456 | PartialInterpretation.newElements(interpretation,element); | ||
17457 | find mayInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
17458 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
17459 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
17460 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
17461 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
17462 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
17463 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
17464 | } | ||
17465 | pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17466 | find interpretation(problem,interpretation); | ||
17467 | PartialInterpretation.newElements(interpretation,element); | ||
17468 | find mayInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
17469 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
17470 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
17471 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
17472 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
17473 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
17474 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
17475 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
17476 | } | ||
17477 | pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17478 | find interpretation(problem,interpretation); | ||
17479 | PartialInterpretation.newElements(interpretation,element); | ||
17480 | find mayInstanceOfInformationLink_class(problem,interpretation,element); | ||
17481 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
17482 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
17483 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
17484 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
17485 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
17486 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
17487 | } | ||
17488 | pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17489 | find interpretation(problem,interpretation); | ||
17490 | PartialInterpretation.newElements(interpretation,element); | ||
17491 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
17492 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
17493 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
17494 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
17495 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
17496 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
17497 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
17498 | } | ||
17499 | |||
17500 | ////////// | ||
17501 | // 4.3 Relation refinement | ||
17502 | ////////// | ||
17503 | pattern refineRelation_model_reference_FunctionalElement( | ||
17504 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17505 | relationIterpretation:PartialRelationInterpretation, | ||
17506 | from: DefinedElement, to: DefinedElement) | ||
17507 | { | ||
17508 | find interpretation(problem,interpretation); | ||
17509 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
17510 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
17511 | find mustExist(problem, interpretation, from); | ||
17512 | find mustExist(problem, interpretation, to); | ||
17513 | find mustInstanceOfFunctionalElement_class(problem,interpretation,from); | ||
17514 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); | ||
17515 | find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
17516 | neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
17517 | } | ||
17518 | pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( | ||
17519 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17520 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
17521 | from: DefinedElement, to: DefinedElement) | ||
17522 | { | ||
17523 | find interpretation(problem,interpretation); | ||
17524 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
17525 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
17526 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
17527 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); | ||
17528 | find mustExist(problem, interpretation, from); | ||
17529 | find mustExist(problem, interpretation, to); | ||
17530 | find mustInstanceOfFunctionalInput_class(problem,interpretation,from); | ||
17531 | find mustInstanceOfInformationLink_class(problem,interpretation,to); | ||
17532 | find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
17533 | neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
17534 | } | ||
17535 | pattern refineRelation_type_attribute_Function( | ||
17536 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17537 | relationIterpretation:PartialRelationInterpretation, | ||
17538 | from: DefinedElement, to: DefinedElement) | ||
17539 | { | ||
17540 | find interpretation(problem,interpretation); | ||
17541 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
17542 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
17543 | find mustExist(problem, interpretation, from); | ||
17544 | find mustExist(problem, interpretation, to); | ||
17545 | find mustInstanceOfFunction_class(problem,interpretation,from); | ||
17546 | find mustInstanceOfFunctionType_enum(problem,interpretation,to); | ||
17547 | find mayInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
17548 | neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
17549 | } | ||
17550 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
17551 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
17552 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
17553 | |||
17554 | ////////// | ||
17555 | // 0. Util | ||
17556 | ////////// | ||
17557 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
17558 | PartialInterpretation.problem(interpretation,problem); | ||
17559 | } | ||
17560 | |||
17561 | ///////////////////////// | ||
17562 | // 0.1 Existence | ||
17563 | ///////////////////////// | ||
17564 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17565 | find interpretation(problem,interpretation); | ||
17566 | LogicProblem.elements(problem,element); | ||
17567 | } or { | ||
17568 | find interpretation(problem,interpretation); | ||
17569 | PartialInterpretation.newElements(interpretation,element); | ||
17570 | } | ||
17571 | |||
17572 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17573 | find mustExist(problem,interpretation,element); | ||
17574 | } or { | ||
17575 | find interpretation(problem,interpretation); | ||
17576 | neg find elementCloseWorld(element); | ||
17577 | PartialInterpretation.openWorldElements(interpretation,element); | ||
17578 | } | ||
17579 | |||
17580 | private pattern elementCloseWorld(element:DefinedElement) { | ||
17581 | PartialInterpretation.openWorldElements(i,element); | ||
17582 | PartialInterpretation.maxNewElements(i,0); | ||
17583 | } or { | ||
17584 | Scope.targetTypeInterpretation(scope,interpretation); | ||
17585 | PartialTypeInterpratation.elements(interpretation,element); | ||
17586 | Scope.maxNewElements(scope,0); | ||
17587 | } | ||
17588 | |||
17589 | //////////////////////// | ||
17590 | // 0.2 Equivalence | ||
17591 | //////////////////////// | ||
17592 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
17593 | find mayExist(problem,interpretation,a); | ||
17594 | find mayExist(problem,interpretation,b); | ||
17595 | a == b; | ||
17596 | } | ||
17597 | |||
17598 | //////////////////////// | ||
17599 | // 0.3 Required Patterns by TypeIndexer | ||
17600 | //////////////////////// | ||
17601 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
17602 | find interpretation(problem,interpretation); | ||
17603 | LogicProblem.types(problem,type); | ||
17604 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17605 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
17606 | } | ||
17607 | |||
17608 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
17609 | find interpretation(problem,interpretation); | ||
17610 | LogicProblem.types(problem,type); | ||
17611 | TypeDefinition.elements(type,element); | ||
17612 | } or { | ||
17613 | find interpretation(problem,interpretation); | ||
17614 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
17615 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
17616 | } | ||
17617 | |||
17618 | private pattern isPrimitive(element: PrimitiveElement) { | ||
17619 | PrimitiveElement(element); | ||
17620 | } | ||
17621 | |||
17622 | ////////// | ||
17623 | // 1. Problem-Specific Base Indexers | ||
17624 | ////////// | ||
17625 | // 1.1 Type Indexers | ||
17626 | ////////// | ||
17627 | // 1.1.1 primitive Type Indexers | ||
17628 | ////////// | ||
17629 | |||
17630 | ////////// | ||
17631 | // 1.1.2 domain-specific Type Indexers | ||
17632 | ////////// | ||
17633 | /** | ||
17634 | * An element must be an instance of type "FunctionalElement class". | ||
17635 | */ | ||
17636 | private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17637 | Type.name(type,"FunctionalElement class"); | ||
17638 | find directInstanceOf(problem,interpretation,element,type); | ||
17639 | } | ||
17640 | private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
17641 | find interpretation(problem,interpretation); | ||
17642 | PartialInterpretation.scopes(interpretation,scope); | ||
17643 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
17644 | Scope.maxNewElements(scope,0); | ||
17645 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
17646 | Type.name(type,"FunctionalElement class"); | ||
17647 | } | ||
17648 | |||
17649 | /** | ||
17650 | * An element may be an instance of type "FunctionalElement class". | ||
17651 | */ | ||
17652 | private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
17653 | { | ||
17654 | find interpretation(problem,interpretation); | ||
17655 | PartialInterpretation.newElements(interpretation,element); | ||
17656 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
17657 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
17658 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
17659 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
17660 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
17661 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
17662 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
17663 | neg find isPrimitive(element); | ||
17664 | } or { | ||
17665 | find interpretation(problem,interpretation); | ||
17666 | PartialInterpretation.openWorldElements(interpretation,element); | ||
17667 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
17668 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
17669 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
17670 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
17671 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
17672 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
17673 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
17674 | neg find isPrimitive(element); | ||
17675 | } or | ||
17676 | { find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } | ||
17677 | /** | ||
17678 | * An element must be an instance of type "FunctionalArchitectureModel class". | ||
17679 | */ | ||
17680 | private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17681 | Type.name(type,"FunctionalArchitectureModel class"); | ||
17682 | find directInstanceOf(problem,interpretation,element,type); | ||
17683 | } | ||
17684 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
17685 | find interpretation(problem,interpretation); | ||
17686 | PartialInterpretation.scopes(interpretation,scope); | ||
17687 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
17688 | Scope.maxNewElements(scope,0); | ||
17689 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
17690 | Type.name(type,"FunctionalArchitectureModel class"); | ||
17691 | } | ||
17692 | |||
17693 | /** | ||
17694 | * An element may be an instance of type "FunctionalArchitectureModel class". | ||
17695 | */ | ||
17696 | private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
17697 | { | ||
17698 | find interpretation(problem,interpretation); | ||
17699 | PartialInterpretation.newElements(interpretation,element); | ||
17700 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
17701 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
17702 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
17703 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
17704 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
17705 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
17706 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
17707 | neg find isPrimitive(element); | ||
17708 | } or { | ||
17709 | find interpretation(problem,interpretation); | ||
17710 | PartialInterpretation.openWorldElements(interpretation,element); | ||
17711 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
17712 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
17713 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
17714 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
17715 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
17716 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
17717 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
17718 | neg find isPrimitive(element); | ||
17719 | } or | ||
17720 | { find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } | ||
17721 | /** | ||
17722 | * An element must be an instance of type "Function class". | ||
17723 | */ | ||
17724 | private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17725 | Type.name(type,"Function class"); | ||
17726 | find directInstanceOf(problem,interpretation,element,type); | ||
17727 | } | ||
17728 | private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
17729 | find interpretation(problem,interpretation); | ||
17730 | PartialInterpretation.scopes(interpretation,scope); | ||
17731 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
17732 | Scope.maxNewElements(scope,0); | ||
17733 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
17734 | Type.name(type,"Function class"); | ||
17735 | } | ||
17736 | |||
17737 | /** | ||
17738 | * An element may be an instance of type "Function class". | ||
17739 | */ | ||
17740 | private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
17741 | { | ||
17742 | find interpretation(problem,interpretation); | ||
17743 | PartialInterpretation.newElements(interpretation,element); | ||
17744 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
17745 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
17746 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
17747 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
17748 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
17749 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
17750 | neg find isPrimitive(element); | ||
17751 | } or { | ||
17752 | find interpretation(problem,interpretation); | ||
17753 | PartialInterpretation.openWorldElements(interpretation,element); | ||
17754 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
17755 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
17756 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
17757 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
17758 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
17759 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
17760 | neg find isPrimitive(element); | ||
17761 | } or | ||
17762 | { find mustInstanceOfFunction_class(problem,interpretation,element); } | ||
17763 | /** | ||
17764 | * An element must be an instance of type "FAMTerminator class". | ||
17765 | */ | ||
17766 | private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17767 | Type.name(type,"FAMTerminator class"); | ||
17768 | find directInstanceOf(problem,interpretation,element,type); | ||
17769 | } | ||
17770 | private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
17771 | find interpretation(problem,interpretation); | ||
17772 | PartialInterpretation.scopes(interpretation,scope); | ||
17773 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
17774 | Scope.maxNewElements(scope,0); | ||
17775 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
17776 | Type.name(type,"FAMTerminator class"); | ||
17777 | } | ||
17778 | |||
17779 | /** | ||
17780 | * An element may be an instance of type "FAMTerminator class". | ||
17781 | */ | ||
17782 | private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
17783 | { | ||
17784 | find interpretation(problem,interpretation); | ||
17785 | PartialInterpretation.newElements(interpretation,element); | ||
17786 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
17787 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
17788 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
17789 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
17790 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
17791 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
17792 | neg find isPrimitive(element); | ||
17793 | } or { | ||
17794 | find interpretation(problem,interpretation); | ||
17795 | PartialInterpretation.openWorldElements(interpretation,element); | ||
17796 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
17797 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
17798 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
17799 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
17800 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
17801 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
17802 | neg find isPrimitive(element); | ||
17803 | } or | ||
17804 | { find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } | ||
17805 | /** | ||
17806 | * An element must be an instance of type "InformationLink class". | ||
17807 | */ | ||
17808 | private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17809 | Type.name(type,"InformationLink class"); | ||
17810 | find directInstanceOf(problem,interpretation,element,type); | ||
17811 | } | ||
17812 | private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
17813 | find interpretation(problem,interpretation); | ||
17814 | PartialInterpretation.scopes(interpretation,scope); | ||
17815 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
17816 | Scope.maxNewElements(scope,0); | ||
17817 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
17818 | Type.name(type,"InformationLink class"); | ||
17819 | } | ||
17820 | |||
17821 | /** | ||
17822 | * An element may be an instance of type "InformationLink class". | ||
17823 | */ | ||
17824 | private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
17825 | { | ||
17826 | find interpretation(problem,interpretation); | ||
17827 | PartialInterpretation.newElements(interpretation,element); | ||
17828 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
17829 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
17830 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
17831 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
17832 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
17833 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
17834 | neg find isPrimitive(element); | ||
17835 | } or { | ||
17836 | find interpretation(problem,interpretation); | ||
17837 | PartialInterpretation.openWorldElements(interpretation,element); | ||
17838 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
17839 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
17840 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
17841 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
17842 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
17843 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
17844 | neg find isPrimitive(element); | ||
17845 | } or | ||
17846 | { find mustInstanceOfInformationLink_class(problem,interpretation,element); } | ||
17847 | /** | ||
17848 | * An element must be an instance of type "FunctionalInterface class". | ||
17849 | */ | ||
17850 | private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17851 | Type.name(type,"FunctionalInterface class"); | ||
17852 | find directInstanceOf(problem,interpretation,element,type); | ||
17853 | } | ||
17854 | private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
17855 | find interpretation(problem,interpretation); | ||
17856 | PartialInterpretation.scopes(interpretation,scope); | ||
17857 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
17858 | Scope.maxNewElements(scope,0); | ||
17859 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
17860 | Type.name(type,"FunctionalInterface class"); | ||
17861 | } | ||
17862 | |||
17863 | /** | ||
17864 | * An element may be an instance of type "FunctionalInterface class". | ||
17865 | */ | ||
17866 | private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
17867 | { | ||
17868 | find interpretation(problem,interpretation); | ||
17869 | PartialInterpretation.newElements(interpretation,element); | ||
17870 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
17871 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
17872 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
17873 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
17874 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
17875 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
17876 | neg find isPrimitive(element); | ||
17877 | } or { | ||
17878 | find interpretation(problem,interpretation); | ||
17879 | PartialInterpretation.openWorldElements(interpretation,element); | ||
17880 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
17881 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
17882 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
17883 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
17884 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
17885 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
17886 | neg find isPrimitive(element); | ||
17887 | } or | ||
17888 | { find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } | ||
17889 | /** | ||
17890 | * An element must be an instance of type "FunctionalInput class". | ||
17891 | */ | ||
17892 | private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17893 | Type.name(type,"FunctionalInput class"); | ||
17894 | find directInstanceOf(problem,interpretation,element,type); | ||
17895 | } | ||
17896 | private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
17897 | find interpretation(problem,interpretation); | ||
17898 | PartialInterpretation.scopes(interpretation,scope); | ||
17899 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
17900 | Scope.maxNewElements(scope,0); | ||
17901 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
17902 | Type.name(type,"FunctionalInput class"); | ||
17903 | } | ||
17904 | |||
17905 | /** | ||
17906 | * An element may be an instance of type "FunctionalInput class". | ||
17907 | */ | ||
17908 | private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
17909 | { | ||
17910 | find interpretation(problem,interpretation); | ||
17911 | PartialInterpretation.newElements(interpretation,element); | ||
17912 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
17913 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
17914 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
17915 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
17916 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
17917 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
17918 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
17919 | neg find isPrimitive(element); | ||
17920 | } or { | ||
17921 | find interpretation(problem,interpretation); | ||
17922 | PartialInterpretation.openWorldElements(interpretation,element); | ||
17923 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
17924 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
17925 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
17926 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
17927 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
17928 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
17929 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
17930 | neg find isPrimitive(element); | ||
17931 | } or | ||
17932 | { find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } | ||
17933 | /** | ||
17934 | * An element must be an instance of type "FunctionalOutput class". | ||
17935 | */ | ||
17936 | private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17937 | Type.name(type,"FunctionalOutput class"); | ||
17938 | find directInstanceOf(problem,interpretation,element,type); | ||
17939 | } | ||
17940 | private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
17941 | find interpretation(problem,interpretation); | ||
17942 | PartialInterpretation.scopes(interpretation,scope); | ||
17943 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
17944 | Scope.maxNewElements(scope,0); | ||
17945 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
17946 | Type.name(type,"FunctionalOutput class"); | ||
17947 | } | ||
17948 | |||
17949 | /** | ||
17950 | * An element may be an instance of type "FunctionalOutput class". | ||
17951 | */ | ||
17952 | private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
17953 | { | ||
17954 | find interpretation(problem,interpretation); | ||
17955 | PartialInterpretation.newElements(interpretation,element); | ||
17956 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
17957 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
17958 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
17959 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
17960 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
17961 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
17962 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
17963 | neg find isPrimitive(element); | ||
17964 | } or { | ||
17965 | find interpretation(problem,interpretation); | ||
17966 | PartialInterpretation.openWorldElements(interpretation,element); | ||
17967 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
17968 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
17969 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
17970 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
17971 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
17972 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
17973 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
17974 | neg find isPrimitive(element); | ||
17975 | } or | ||
17976 | { find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } | ||
17977 | /** | ||
17978 | * An element must be an instance of type "FunctionalData class". | ||
17979 | */ | ||
17980 | private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17981 | Type.name(type,"FunctionalData class"); | ||
17982 | find directInstanceOf(problem,interpretation,element,type); | ||
17983 | } | ||
17984 | private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
17985 | find interpretation(problem,interpretation); | ||
17986 | PartialInterpretation.scopes(interpretation,scope); | ||
17987 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
17988 | Scope.maxNewElements(scope,0); | ||
17989 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
17990 | Type.name(type,"FunctionalData class"); | ||
17991 | } | ||
17992 | |||
17993 | /** | ||
17994 | * An element may be an instance of type "FunctionalData class". | ||
17995 | */ | ||
17996 | private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
17997 | { | ||
17998 | find interpretation(problem,interpretation); | ||
17999 | PartialInterpretation.newElements(interpretation,element); | ||
18000 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
18001 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
18002 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
18003 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
18004 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
18005 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
18006 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
18007 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
18008 | neg find isPrimitive(element); | ||
18009 | } or { | ||
18010 | find interpretation(problem,interpretation); | ||
18011 | PartialInterpretation.openWorldElements(interpretation,element); | ||
18012 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
18013 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
18014 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
18015 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
18016 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
18017 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
18018 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
18019 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
18020 | neg find isPrimitive(element); | ||
18021 | } or | ||
18022 | { find mustInstanceOfFunctionalData_class(problem,interpretation,element); } | ||
18023 | /** | ||
18024 | * An element must be an instance of type "FunctionType enum". | ||
18025 | */ | ||
18026 | private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18027 | Type.name(type,"FunctionType enum"); | ||
18028 | find directInstanceOf(problem,interpretation,element,type); | ||
18029 | } | ||
18030 | private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18031 | find interpretation(problem,interpretation); | ||
18032 | PartialInterpretation.scopes(interpretation,scope); | ||
18033 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18034 | Scope.maxNewElements(scope,0); | ||
18035 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18036 | Type.name(type,"FunctionType enum"); | ||
18037 | } | ||
18038 | |||
18039 | /** | ||
18040 | * An element may be an instance of type "FunctionType enum". | ||
18041 | */ | ||
18042 | private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18043 | { find mustInstanceOfFunctionType_enum(problem,interpretation,element); } | ||
18044 | /** | ||
18045 | * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
18046 | */ | ||
18047 | private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18048 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
18049 | find directInstanceOf(problem,interpretation,element,type); | ||
18050 | } | ||
18051 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18052 | find interpretation(problem,interpretation); | ||
18053 | PartialInterpretation.scopes(interpretation,scope); | ||
18054 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18055 | Scope.maxNewElements(scope,0); | ||
18056 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18057 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
18058 | } | ||
18059 | |||
18060 | /** | ||
18061 | * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
18062 | */ | ||
18063 | private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18064 | { find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } | ||
18065 | /** | ||
18066 | * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
18067 | */ | ||
18068 | private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18069 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
18070 | find directInstanceOf(problem,interpretation,element,type); | ||
18071 | } | ||
18072 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18073 | find interpretation(problem,interpretation); | ||
18074 | PartialInterpretation.scopes(interpretation,scope); | ||
18075 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18076 | Scope.maxNewElements(scope,0); | ||
18077 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18078 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
18079 | } | ||
18080 | |||
18081 | /** | ||
18082 | * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
18083 | */ | ||
18084 | private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18085 | { | ||
18086 | find interpretation(problem,interpretation); | ||
18087 | PartialInterpretation.newElements(interpretation,element); | ||
18088 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
18089 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
18090 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
18091 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
18092 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
18093 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
18094 | neg find isPrimitive(element); | ||
18095 | } or { | ||
18096 | find interpretation(problem,interpretation); | ||
18097 | PartialInterpretation.openWorldElements(interpretation,element); | ||
18098 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
18099 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
18100 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
18101 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
18102 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
18103 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
18104 | neg find isPrimitive(element); | ||
18105 | } or | ||
18106 | { find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } | ||
18107 | |||
18108 | ////////// | ||
18109 | // 1.2 Relation Declaration Indexers | ||
18110 | ////////// | ||
18111 | /** | ||
18112 | * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) | ||
18113 | */ | ||
18114 | private pattern mustInRelationinterface_reference_FunctionalElement( | ||
18115 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18116 | source: DefinedElement, target:DefinedElement) | ||
18117 | { | ||
18118 | find interpretation(problem,interpretation); | ||
18119 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18120 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); | ||
18121 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18122 | BinaryElementRelationLink.param1(link,source); | ||
18123 | BinaryElementRelationLink.param2(link,target); | ||
18124 | } | ||
18125 | /** | ||
18126 | * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) | ||
18127 | */ | ||
18128 | private pattern mayInRelationinterface_reference_FunctionalElement( | ||
18129 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18130 | source: DefinedElement, target:DefinedElement) | ||
18131 | { | ||
18132 | find interpretation(problem,interpretation); | ||
18133 | // The two endpoint of the link have to exist | ||
18134 | find mayExist(problem, interpretation, source); | ||
18135 | find mayExist(problem, interpretation, target); | ||
18136 | // Type consistency | ||
18137 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
18138 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
18139 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
18140 | // the upper bound of the multiplicity should be considered. | ||
18141 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); | ||
18142 | check(numberOfExistingReferences < 1); | ||
18143 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
18144 | // the upper bound of the opposite reference multiplicity should be considered. | ||
18145 | numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); | ||
18146 | check(numberOfExistingOppositeReferences < 1); | ||
18147 | // The reference is containment, then a new reference cannot be create if: | ||
18148 | // 1. Multiple parents | ||
18149 | neg find mustContains4(problem,interpretation,_,target); | ||
18150 | // 2. Circle in the containment hierarchy | ||
18151 | neg find mustTransitiveContains(source,target); | ||
18152 | } or { | ||
18153 | find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); | ||
18154 | } | ||
18155 | /** | ||
18156 | * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) | ||
18157 | */ | ||
18158 | private pattern mustInRelationmodel_reference_FunctionalElement( | ||
18159 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18160 | source: DefinedElement, target:DefinedElement) | ||
18161 | { | ||
18162 | find interpretation(problem,interpretation); | ||
18163 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18164 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
18165 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18166 | BinaryElementRelationLink.param1(link,source); | ||
18167 | BinaryElementRelationLink.param2(link,target); | ||
18168 | } | ||
18169 | /** | ||
18170 | * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target) | ||
18171 | */ | ||
18172 | private pattern mayInRelationmodel_reference_FunctionalElement( | ||
18173 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18174 | source: DefinedElement, target:DefinedElement) | ||
18175 | { | ||
18176 | find interpretation(problem,interpretation); | ||
18177 | // The two endpoint of the link have to exist | ||
18178 | find mayExist(problem, interpretation, source); | ||
18179 | find mayExist(problem, interpretation, target); | ||
18180 | // Type consistency | ||
18181 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
18182 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target); | ||
18183 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
18184 | // the upper bound of the multiplicity should be considered. | ||
18185 | numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_); | ||
18186 | check(numberOfExistingReferences < 1); | ||
18187 | } or { | ||
18188 | find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target); | ||
18189 | } | ||
18190 | /** | ||
18191 | * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) | ||
18192 | */ | ||
18193 | private pattern mustInRelationparent_reference_FunctionalElement( | ||
18194 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18195 | source: DefinedElement, target:DefinedElement) | ||
18196 | { | ||
18197 | find interpretation(problem,interpretation); | ||
18198 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18199 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); | ||
18200 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18201 | BinaryElementRelationLink.param1(link,source); | ||
18202 | BinaryElementRelationLink.param2(link,target); | ||
18203 | } | ||
18204 | /** | ||
18205 | * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) | ||
18206 | */ | ||
18207 | private pattern mayInRelationparent_reference_FunctionalElement( | ||
18208 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18209 | source: DefinedElement, target:DefinedElement) | ||
18210 | { | ||
18211 | find interpretation(problem,interpretation); | ||
18212 | // The two endpoint of the link have to exist | ||
18213 | find mayExist(problem, interpretation, source); | ||
18214 | find mayExist(problem, interpretation, target); | ||
18215 | // Type consistency | ||
18216 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
18217 | find mayInstanceOfFunction_class(problem,interpretation,target); | ||
18218 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
18219 | // the upper bound of the multiplicity should be considered. | ||
18220 | numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); | ||
18221 | check(numberOfExistingReferences < 1); | ||
18222 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
18223 | // 1. Multiple parents | ||
18224 | neg find mustContains4(problem,interpretation,source,_); | ||
18225 | // 2. Circle in the containment hierarchy | ||
18226 | neg find mustTransitiveContains(source,target); | ||
18227 | } or { | ||
18228 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); | ||
18229 | } | ||
18230 | /** | ||
18231 | * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) | ||
18232 | */ | ||
18233 | private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( | ||
18234 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18235 | source: DefinedElement, target:DefinedElement) | ||
18236 | { | ||
18237 | find interpretation(problem,interpretation); | ||
18238 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18239 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
18240 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18241 | BinaryElementRelationLink.param1(link,source); | ||
18242 | BinaryElementRelationLink.param2(link,target); | ||
18243 | } | ||
18244 | /** | ||
18245 | * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) | ||
18246 | */ | ||
18247 | private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( | ||
18248 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18249 | source: DefinedElement, target:DefinedElement) | ||
18250 | { | ||
18251 | find interpretation(problem,interpretation); | ||
18252 | // The two endpoint of the link have to exist | ||
18253 | find mayExist(problem, interpretation, source); | ||
18254 | find mayExist(problem, interpretation, target); | ||
18255 | // Type consistency | ||
18256 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); | ||
18257 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
18258 | // The reference is containment, then a new reference cannot be create if: | ||
18259 | // 1. Multiple parents | ||
18260 | neg find mustContains4(problem,interpretation,_,target); | ||
18261 | // 2. Circle in the containment hierarchy | ||
18262 | neg find mustTransitiveContains(source,target); | ||
18263 | } or { | ||
18264 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); | ||
18265 | } | ||
18266 | /** | ||
18267 | * Matcher for detecting tuples t where []subElements reference Function(source,target) | ||
18268 | */ | ||
18269 | private pattern mustInRelationsubElements_reference_Function( | ||
18270 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18271 | source: DefinedElement, target:DefinedElement) | ||
18272 | { | ||
18273 | find interpretation(problem,interpretation); | ||
18274 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18275 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); | ||
18276 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18277 | BinaryElementRelationLink.param1(link,source); | ||
18278 | BinaryElementRelationLink.param2(link,target); | ||
18279 | } | ||
18280 | /** | ||
18281 | * Matcher for detecting tuples t where <>subElements reference Function(source,target) | ||
18282 | */ | ||
18283 | private pattern mayInRelationsubElements_reference_Function( | ||
18284 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18285 | source: DefinedElement, target:DefinedElement) | ||
18286 | { | ||
18287 | find interpretation(problem,interpretation); | ||
18288 | // The two endpoint of the link have to exist | ||
18289 | find mayExist(problem, interpretation, source); | ||
18290 | find mayExist(problem, interpretation, target); | ||
18291 | // Type consistency | ||
18292 | find mayInstanceOfFunction_class(problem,interpretation,source); | ||
18293 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
18294 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
18295 | // the upper bound of the opposite reference multiplicity should be considered. | ||
18296 | numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); | ||
18297 | check(numberOfExistingOppositeReferences < 1); | ||
18298 | // The reference is containment, then a new reference cannot be create if: | ||
18299 | // 1. Multiple parents | ||
18300 | neg find mustContains4(problem,interpretation,_,target); | ||
18301 | // 2. Circle in the containment hierarchy | ||
18302 | neg find mustTransitiveContains(source,target); | ||
18303 | } or { | ||
18304 | find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); | ||
18305 | } | ||
18306 | /** | ||
18307 | * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) | ||
18308 | */ | ||
18309 | private pattern mustInRelationdata_reference_FAMTerminator( | ||
18310 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18311 | source: DefinedElement, target:DefinedElement) | ||
18312 | { | ||
18313 | find interpretation(problem,interpretation); | ||
18314 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18315 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); | ||
18316 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18317 | BinaryElementRelationLink.param1(link,source); | ||
18318 | BinaryElementRelationLink.param2(link,target); | ||
18319 | } | ||
18320 | /** | ||
18321 | * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) | ||
18322 | */ | ||
18323 | private pattern mayInRelationdata_reference_FAMTerminator( | ||
18324 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18325 | source: DefinedElement, target:DefinedElement) | ||
18326 | { | ||
18327 | find interpretation(problem,interpretation); | ||
18328 | // The two endpoint of the link have to exist | ||
18329 | find mayExist(problem, interpretation, source); | ||
18330 | find mayExist(problem, interpretation, target); | ||
18331 | // Type consistency | ||
18332 | find mayInstanceOfFAMTerminator_class(problem,interpretation,source); | ||
18333 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
18334 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
18335 | // the upper bound of the multiplicity should be considered. | ||
18336 | numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); | ||
18337 | check(numberOfExistingReferences < 1); | ||
18338 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
18339 | // the upper bound of the opposite reference multiplicity should be considered. | ||
18340 | numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); | ||
18341 | check(numberOfExistingOppositeReferences < 1); | ||
18342 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
18343 | // 1. Multiple parents | ||
18344 | neg find mustContains4(problem,interpretation,source,_); | ||
18345 | // 2. Circle in the containment hierarchy | ||
18346 | neg find mustTransitiveContains(source,target); | ||
18347 | } or { | ||
18348 | find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); | ||
18349 | } | ||
18350 | /** | ||
18351 | * Matcher for detecting tuples t where []from reference InformationLink(source,target) | ||
18352 | */ | ||
18353 | private pattern mustInRelationfrom_reference_InformationLink( | ||
18354 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18355 | source: DefinedElement, target:DefinedElement) | ||
18356 | { | ||
18357 | find interpretation(problem,interpretation); | ||
18358 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18359 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); | ||
18360 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18361 | BinaryElementRelationLink.param1(link,source); | ||
18362 | BinaryElementRelationLink.param2(link,target); | ||
18363 | } | ||
18364 | /** | ||
18365 | * Matcher for detecting tuples t where <>from reference InformationLink(source,target) | ||
18366 | */ | ||
18367 | private pattern mayInRelationfrom_reference_InformationLink( | ||
18368 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18369 | source: DefinedElement, target:DefinedElement) | ||
18370 | { | ||
18371 | find interpretation(problem,interpretation); | ||
18372 | // The two endpoint of the link have to exist | ||
18373 | find mayExist(problem, interpretation, source); | ||
18374 | find mayExist(problem, interpretation, target); | ||
18375 | // Type consistency | ||
18376 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
18377 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); | ||
18378 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
18379 | // the upper bound of the multiplicity should be considered. | ||
18380 | numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); | ||
18381 | check(numberOfExistingReferences < 1); | ||
18382 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
18383 | // 1. Multiple parents | ||
18384 | neg find mustContains4(problem,interpretation,source,_); | ||
18385 | // 2. Circle in the containment hierarchy | ||
18386 | neg find mustTransitiveContains(source,target); | ||
18387 | } or { | ||
18388 | find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); | ||
18389 | } | ||
18390 | /** | ||
18391 | * Matcher for detecting tuples t where []to reference InformationLink(source,target) | ||
18392 | */ | ||
18393 | private pattern mustInRelationto_reference_InformationLink( | ||
18394 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18395 | source: DefinedElement, target:DefinedElement) | ||
18396 | { | ||
18397 | find interpretation(problem,interpretation); | ||
18398 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18399 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
18400 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18401 | BinaryElementRelationLink.param1(link,source); | ||
18402 | BinaryElementRelationLink.param2(link,target); | ||
18403 | } | ||
18404 | /** | ||
18405 | * Matcher for detecting tuples t where <>to reference InformationLink(source,target) | ||
18406 | */ | ||
18407 | private pattern mayInRelationto_reference_InformationLink( | ||
18408 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18409 | source: DefinedElement, target:DefinedElement) | ||
18410 | { | ||
18411 | find interpretation(problem,interpretation); | ||
18412 | // The two endpoint of the link have to exist | ||
18413 | find mayExist(problem, interpretation, source); | ||
18414 | find mayExist(problem, interpretation, target); | ||
18415 | // Type consistency | ||
18416 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
18417 | find mayInstanceOfFunctionalInput_class(problem,interpretation,target); | ||
18418 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
18419 | // the upper bound of the multiplicity should be considered. | ||
18420 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); | ||
18421 | check(numberOfExistingReferences < 1); | ||
18422 | } or { | ||
18423 | find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); | ||
18424 | } | ||
18425 | /** | ||
18426 | * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) | ||
18427 | */ | ||
18428 | private pattern mustInRelationdata_reference_FunctionalInterface( | ||
18429 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18430 | source: DefinedElement, target:DefinedElement) | ||
18431 | { | ||
18432 | find interpretation(problem,interpretation); | ||
18433 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18434 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); | ||
18435 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18436 | BinaryElementRelationLink.param1(link,source); | ||
18437 | BinaryElementRelationLink.param2(link,target); | ||
18438 | } | ||
18439 | /** | ||
18440 | * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) | ||
18441 | */ | ||
18442 | private pattern mayInRelationdata_reference_FunctionalInterface( | ||
18443 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18444 | source: DefinedElement, target:DefinedElement) | ||
18445 | { | ||
18446 | find interpretation(problem,interpretation); | ||
18447 | // The two endpoint of the link have to exist | ||
18448 | find mayExist(problem, interpretation, source); | ||
18449 | find mayExist(problem, interpretation, target); | ||
18450 | // Type consistency | ||
18451 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
18452 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
18453 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
18454 | // the upper bound of the opposite reference multiplicity should be considered. | ||
18455 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); | ||
18456 | check(numberOfExistingOppositeReferences < 1); | ||
18457 | // The reference is containment, then a new reference cannot be create if: | ||
18458 | // 1. Multiple parents | ||
18459 | neg find mustContains4(problem,interpretation,_,target); | ||
18460 | // 2. Circle in the containment hierarchy | ||
18461 | neg find mustTransitiveContains(source,target); | ||
18462 | } or { | ||
18463 | find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); | ||
18464 | } | ||
18465 | /** | ||
18466 | * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) | ||
18467 | */ | ||
18468 | private pattern mustInRelationelement_reference_FunctionalInterface( | ||
18469 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18470 | source: DefinedElement, target:DefinedElement) | ||
18471 | { | ||
18472 | find interpretation(problem,interpretation); | ||
18473 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18474 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); | ||
18475 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18476 | BinaryElementRelationLink.param1(link,source); | ||
18477 | BinaryElementRelationLink.param2(link,target); | ||
18478 | } | ||
18479 | /** | ||
18480 | * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) | ||
18481 | */ | ||
18482 | private pattern mayInRelationelement_reference_FunctionalInterface( | ||
18483 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18484 | source: DefinedElement, target:DefinedElement) | ||
18485 | { | ||
18486 | find interpretation(problem,interpretation); | ||
18487 | // The two endpoint of the link have to exist | ||
18488 | find mayExist(problem, interpretation, source); | ||
18489 | find mayExist(problem, interpretation, target); | ||
18490 | // Type consistency | ||
18491 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
18492 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
18493 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
18494 | // the upper bound of the multiplicity should be considered. | ||
18495 | numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); | ||
18496 | check(numberOfExistingReferences < 1); | ||
18497 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
18498 | // the upper bound of the opposite reference multiplicity should be considered. | ||
18499 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); | ||
18500 | check(numberOfExistingOppositeReferences < 1); | ||
18501 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
18502 | // 1. Multiple parents | ||
18503 | neg find mustContains4(problem,interpretation,source,_); | ||
18504 | // 2. Circle in the containment hierarchy | ||
18505 | neg find mustTransitiveContains(source,target); | ||
18506 | } or { | ||
18507 | find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); | ||
18508 | } | ||
18509 | /** | ||
18510 | * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) | ||
18511 | */ | ||
18512 | private pattern mustInRelationIncomingLinks_reference_FunctionalInput( | ||
18513 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18514 | source: DefinedElement, target:DefinedElement) | ||
18515 | { | ||
18516 | find interpretation(problem,interpretation); | ||
18517 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18518 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
18519 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18520 | BinaryElementRelationLink.param1(link,source); | ||
18521 | BinaryElementRelationLink.param2(link,target); | ||
18522 | } | ||
18523 | /** | ||
18524 | * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) | ||
18525 | */ | ||
18526 | private pattern mayInRelationIncomingLinks_reference_FunctionalInput( | ||
18527 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18528 | source: DefinedElement, target:DefinedElement) | ||
18529 | { | ||
18530 | find interpretation(problem,interpretation); | ||
18531 | // The two endpoint of the link have to exist | ||
18532 | find mayExist(problem, interpretation, source); | ||
18533 | find mayExist(problem, interpretation, target); | ||
18534 | // Type consistency | ||
18535 | find mayInstanceOfFunctionalInput_class(problem,interpretation,source); | ||
18536 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
18537 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
18538 | // the upper bound of the opposite reference multiplicity should be considered. | ||
18539 | numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); | ||
18540 | check(numberOfExistingOppositeReferences < 1); | ||
18541 | } or { | ||
18542 | find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); | ||
18543 | } | ||
18544 | /** | ||
18545 | * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) | ||
18546 | */ | ||
18547 | private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( | ||
18548 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18549 | source: DefinedElement, target:DefinedElement) | ||
18550 | { | ||
18551 | find interpretation(problem,interpretation); | ||
18552 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18553 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); | ||
18554 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18555 | BinaryElementRelationLink.param1(link,source); | ||
18556 | BinaryElementRelationLink.param2(link,target); | ||
18557 | } | ||
18558 | /** | ||
18559 | * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) | ||
18560 | */ | ||
18561 | private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( | ||
18562 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18563 | source: DefinedElement, target:DefinedElement) | ||
18564 | { | ||
18565 | find interpretation(problem,interpretation); | ||
18566 | // The two endpoint of the link have to exist | ||
18567 | find mayExist(problem, interpretation, source); | ||
18568 | find mayExist(problem, interpretation, target); | ||
18569 | // Type consistency | ||
18570 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); | ||
18571 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
18572 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
18573 | // the upper bound of the opposite reference multiplicity should be considered. | ||
18574 | numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); | ||
18575 | check(numberOfExistingOppositeReferences < 1); | ||
18576 | // The reference is containment, then a new reference cannot be create if: | ||
18577 | // 1. Multiple parents | ||
18578 | neg find mustContains4(problem,interpretation,_,target); | ||
18579 | // 2. Circle in the containment hierarchy | ||
18580 | neg find mustTransitiveContains(source,target); | ||
18581 | } or { | ||
18582 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); | ||
18583 | } | ||
18584 | /** | ||
18585 | * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) | ||
18586 | */ | ||
18587 | private pattern mustInRelationterminator_reference_FunctionalData( | ||
18588 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18589 | source: DefinedElement, target:DefinedElement) | ||
18590 | { | ||
18591 | find interpretation(problem,interpretation); | ||
18592 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18593 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); | ||
18594 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18595 | BinaryElementRelationLink.param1(link,source); | ||
18596 | BinaryElementRelationLink.param2(link,target); | ||
18597 | } | ||
18598 | /** | ||
18599 | * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) | ||
18600 | */ | ||
18601 | private pattern mayInRelationterminator_reference_FunctionalData( | ||
18602 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18603 | source: DefinedElement, target:DefinedElement) | ||
18604 | { | ||
18605 | find interpretation(problem,interpretation); | ||
18606 | // The two endpoint of the link have to exist | ||
18607 | find mayExist(problem, interpretation, source); | ||
18608 | find mayExist(problem, interpretation, target); | ||
18609 | // Type consistency | ||
18610 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
18611 | find mayInstanceOfFAMTerminator_class(problem,interpretation,target); | ||
18612 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
18613 | // the upper bound of the multiplicity should be considered. | ||
18614 | numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); | ||
18615 | check(numberOfExistingReferences < 1); | ||
18616 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
18617 | // the upper bound of the opposite reference multiplicity should be considered. | ||
18618 | numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); | ||
18619 | check(numberOfExistingOppositeReferences < 1); | ||
18620 | // The reference is containment, then a new reference cannot be create if: | ||
18621 | // 1. Multiple parents | ||
18622 | neg find mustContains4(problem,interpretation,_,target); | ||
18623 | // 2. Circle in the containment hierarchy | ||
18624 | neg find mustTransitiveContains(source,target); | ||
18625 | } or { | ||
18626 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); | ||
18627 | } | ||
18628 | /** | ||
18629 | * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) | ||
18630 | */ | ||
18631 | private pattern mustInRelationinterface_reference_FunctionalData( | ||
18632 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18633 | source: DefinedElement, target:DefinedElement) | ||
18634 | { | ||
18635 | find interpretation(problem,interpretation); | ||
18636 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18637 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); | ||
18638 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18639 | BinaryElementRelationLink.param1(link,source); | ||
18640 | BinaryElementRelationLink.param2(link,target); | ||
18641 | } | ||
18642 | /** | ||
18643 | * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) | ||
18644 | */ | ||
18645 | private pattern mayInRelationinterface_reference_FunctionalData( | ||
18646 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18647 | source: DefinedElement, target:DefinedElement) | ||
18648 | { | ||
18649 | find interpretation(problem,interpretation); | ||
18650 | // The two endpoint of the link have to exist | ||
18651 | find mayExist(problem, interpretation, source); | ||
18652 | find mayExist(problem, interpretation, target); | ||
18653 | // Type consistency | ||
18654 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
18655 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
18656 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
18657 | // the upper bound of the multiplicity should be considered. | ||
18658 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); | ||
18659 | check(numberOfExistingReferences < 1); | ||
18660 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
18661 | // 1. Multiple parents | ||
18662 | neg find mustContains4(problem,interpretation,source,_); | ||
18663 | // 2. Circle in the containment hierarchy | ||
18664 | neg find mustTransitiveContains(source,target); | ||
18665 | } or { | ||
18666 | find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); | ||
18667 | } | ||
18668 | /** | ||
18669 | * Matcher for detecting tuples t where []type attribute Function(source,target) | ||
18670 | */ | ||
18671 | private pattern mustInRelationtype_attribute_Function( | ||
18672 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18673 | source: DefinedElement, target:DefinedElement) | ||
18674 | { | ||
18675 | find interpretation(problem,interpretation); | ||
18676 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18677 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
18678 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18679 | BinaryElementRelationLink.param1(link,source); | ||
18680 | BinaryElementRelationLink.param2(link,target); | ||
18681 | } | ||
18682 | /** | ||
18683 | * Matcher for detecting tuples t where <>type attribute Function(source,target) | ||
18684 | */ | ||
18685 | private pattern mayInRelationtype_attribute_Function( | ||
18686 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18687 | source: DefinedElement, target:DefinedElement) | ||
18688 | { | ||
18689 | find interpretation(problem,interpretation); | ||
18690 | // The two endpoint of the link have to exist | ||
18691 | find mayExist(problem, interpretation, source); | ||
18692 | find mayExist(problem, interpretation, target); | ||
18693 | // Type consistency | ||
18694 | find mayInstanceOfFunction_class(problem,interpretation,source); | ||
18695 | find mayInstanceOfFunctionType_enum(problem,interpretation,target); | ||
18696 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
18697 | // the upper bound of the multiplicity should be considered. | ||
18698 | numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_); | ||
18699 | check(numberOfExistingReferences < 1); | ||
18700 | } or { | ||
18701 | find mustInRelationtype_attribute_Function(problem,interpretation,source,target); | ||
18702 | } | ||
18703 | |||
18704 | ////////// | ||
18705 | // 1.3 Relation Definition Indexers | ||
18706 | ////////// | ||
18707 | |||
18708 | ////////// | ||
18709 | // 1.4 Containment Indexer | ||
18710 | ////////// | ||
18711 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
18712 | find mustContains4(_,_,source,target); | ||
18713 | } | ||
18714 | |||
18715 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
18716 | source: DefinedElement, target: DefinedElement) | ||
18717 | { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or | ||
18718 | |||
18719 | { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or | ||
18720 | |||
18721 | { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or | ||
18722 | |||
18723 | { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or | ||
18724 | |||
18725 | { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or | ||
18726 | |||
18727 | { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } | ||
18728 | |||
18729 | private pattern mustTransitiveContains(source,target) { | ||
18730 | find mustContains2+(source,target); | ||
18731 | } | ||
18732 | |||
18733 | ////////// | ||
18734 | // 2. Invalidation Indexers | ||
18735 | ////////// | ||
18736 | // 2.1 Invalidated by WF Queries | ||
18737 | ////////// | ||
18738 | |||
18739 | ////////// | ||
18740 | // 3. Unfinishedness Indexers | ||
18741 | ////////// | ||
18742 | // 3.1 Unfinishedness Measured by Multiplicity | ||
18743 | ////////// | ||
18744 | pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
18745 | find interpretation(problem,interpretation); | ||
18746 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18747 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
18748 | find mustInstanceOfFunctionalElement_class(problem,interpretation,object); | ||
18749 | numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_); | ||
18750 | check(numberOfExistingReferences < 1); | ||
18751 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
18752 | } | ||
18753 | pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
18754 | find interpretation(problem,interpretation); | ||
18755 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18756 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
18757 | find mustInstanceOfInformationLink_class(problem,interpretation,object); | ||
18758 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); | ||
18759 | check(numberOfExistingReferences < 1); | ||
18760 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
18761 | } | ||
18762 | pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
18763 | find interpretation(problem,interpretation); | ||
18764 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18765 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
18766 | find mustInstanceOfFunction_class(problem,interpretation,object); | ||
18767 | numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_); | ||
18768 | check(numberOfExistingReferences < 1); | ||
18769 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
18770 | } | ||
18771 | |||
18772 | ////////// | ||
18773 | // 3.2 Unfinishedness Measured by WF Queries | ||
18774 | ////////// | ||
18775 | |||
18776 | ////////// | ||
18777 | // 4. Refinement Indexers | ||
18778 | ////////// | ||
18779 | // 4.1 Object constructors | ||
18780 | ////////// | ||
18781 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
18782 | { | ||
18783 | find interpretation(problem,interpretation); | ||
18784 | find mustInstanceOfFunctionalInput_class(problem,interpretation,root); | ||
18785 | find mustExist(problem, interpretation, root); | ||
18786 | }or{ | ||
18787 | find interpretation(problem,interpretation); | ||
18788 | find mustInstanceOfFAMTerminator_class(problem,interpretation,root); | ||
18789 | find mustExist(problem, interpretation, root); | ||
18790 | }or{ | ||
18791 | find interpretation(problem,interpretation); | ||
18792 | find mustInstanceOfFunctionalData_class(problem,interpretation,root); | ||
18793 | find mustExist(problem, interpretation, root); | ||
18794 | }or{ | ||
18795 | find interpretation(problem,interpretation); | ||
18796 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); | ||
18797 | find mustExist(problem, interpretation, root); | ||
18798 | }or{ | ||
18799 | find interpretation(problem,interpretation); | ||
18800 | find mustInstanceOfInformationLink_class(problem,interpretation,root); | ||
18801 | find mustExist(problem, interpretation, root); | ||
18802 | }or{ | ||
18803 | find interpretation(problem,interpretation); | ||
18804 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); | ||
18805 | find mustExist(problem, interpretation, root); | ||
18806 | }or{ | ||
18807 | find interpretation(problem,interpretation); | ||
18808 | find mustInstanceOfFunctionalElement_class(problem,interpretation,root); | ||
18809 | find mustExist(problem, interpretation, root); | ||
18810 | }or{ | ||
18811 | find interpretation(problem,interpretation); | ||
18812 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); | ||
18813 | find mustExist(problem, interpretation, root); | ||
18814 | }or{ | ||
18815 | find interpretation(problem,interpretation); | ||
18816 | find mustInstanceOfFunction_class(problem,interpretation,root); | ||
18817 | find mustExist(problem, interpretation, root); | ||
18818 | }or{ | ||
18819 | find interpretation(problem,interpretation); | ||
18820 | find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); | ||
18821 | find mustExist(problem, interpretation, root); | ||
18822 | }or{ | ||
18823 | find interpretation(problem,interpretation); | ||
18824 | find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); | ||
18825 | find mustExist(problem, interpretation, root); | ||
18826 | } | ||
18827 | pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( | ||
18828 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18829 | typeInterpretation:PartialComplexTypeInterpretation) | ||
18830 | { | ||
18831 | find interpretation(problem,interpretation); | ||
18832 | neg find hasElementInContainment(problem,interpretation); | ||
18833 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
18834 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); | ||
18835 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); | ||
18836 | find mayExist(problem, interpretation, newObject); | ||
18837 | neg find mustExist(problem, interpretation, newObject); | ||
18838 | } | ||
18839 | pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( | ||
18840 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18841 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
18842 | container:DefinedElement) | ||
18843 | { | ||
18844 | find interpretation(problem,interpretation); | ||
18845 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
18846 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
18847 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
18848 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
18849 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); | ||
18850 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
18851 | find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); | ||
18852 | find mustExist(problem, interpretation, container); | ||
18853 | neg find mustExist(problem, interpretation, newObject); | ||
18854 | } | ||
18855 | pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( | ||
18856 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18857 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
18858 | container:DefinedElement) | ||
18859 | { | ||
18860 | find interpretation(problem,interpretation); | ||
18861 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
18862 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
18863 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
18864 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); | ||
18865 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
18866 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); | ||
18867 | find mustInstanceOfFunction_class(problem,interpretation,container); | ||
18868 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
18869 | find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); | ||
18870 | find mustExist(problem, interpretation, container); | ||
18871 | neg find mustExist(problem, interpretation, newObject); | ||
18872 | } | ||
18873 | pattern createObject_Function_class( | ||
18874 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18875 | typeInterpretation:PartialComplexTypeInterpretation) | ||
18876 | { | ||
18877 | find interpretation(problem,interpretation); | ||
18878 | neg find hasElementInContainment(problem,interpretation); | ||
18879 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
18880 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
18881 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
18882 | find mayExist(problem, interpretation, newObject); | ||
18883 | neg find mustExist(problem, interpretation, newObject); | ||
18884 | } | ||
18885 | pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
18886 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18887 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
18888 | container:DefinedElement) | ||
18889 | { | ||
18890 | find interpretation(problem,interpretation); | ||
18891 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
18892 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
18893 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
18894 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
18895 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
18896 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
18897 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
18898 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
18899 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
18900 | find mustExist(problem, interpretation, container); | ||
18901 | neg find mustExist(problem, interpretation, newObject); | ||
18902 | } | ||
18903 | pattern createObject_FunctionalOutput_class( | ||
18904 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18905 | typeInterpretation:PartialComplexTypeInterpretation) | ||
18906 | { | ||
18907 | find interpretation(problem,interpretation); | ||
18908 | neg find hasElementInContainment(problem,interpretation); | ||
18909 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
18910 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
18911 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
18912 | find mayExist(problem, interpretation, newObject); | ||
18913 | neg find mustExist(problem, interpretation, newObject); | ||
18914 | } | ||
18915 | pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( | ||
18916 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18917 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
18918 | container:DefinedElement) | ||
18919 | { | ||
18920 | find interpretation(problem,interpretation); | ||
18921 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
18922 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
18923 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
18924 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); | ||
18925 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
18926 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); | ||
18927 | find mustInstanceOfFunctionalData_class(problem,interpretation,container); | ||
18928 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
18929 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); | ||
18930 | find mustExist(problem, interpretation, container); | ||
18931 | neg find mustExist(problem, interpretation, newObject); | ||
18932 | } | ||
18933 | pattern createObject_FAMTerminator_class( | ||
18934 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18935 | typeInterpretation:PartialComplexTypeInterpretation) | ||
18936 | { | ||
18937 | find interpretation(problem,interpretation); | ||
18938 | neg find hasElementInContainment(problem,interpretation); | ||
18939 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
18940 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
18941 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
18942 | find mayExist(problem, interpretation, newObject); | ||
18943 | neg find mustExist(problem, interpretation, newObject); | ||
18944 | } | ||
18945 | pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
18946 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18947 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
18948 | container:DefinedElement) | ||
18949 | { | ||
18950 | find interpretation(problem,interpretation); | ||
18951 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
18952 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
18953 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
18954 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
18955 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
18956 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
18957 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
18958 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
18959 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
18960 | find mustExist(problem, interpretation, container); | ||
18961 | neg find mustExist(problem, interpretation, newObject); | ||
18962 | } | ||
18963 | pattern createObject_FunctionalInput_class( | ||
18964 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18965 | typeInterpretation:PartialComplexTypeInterpretation) | ||
18966 | { | ||
18967 | find interpretation(problem,interpretation); | ||
18968 | neg find hasElementInContainment(problem,interpretation); | ||
18969 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
18970 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
18971 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
18972 | find mayExist(problem, interpretation, newObject); | ||
18973 | neg find mustExist(problem, interpretation, newObject); | ||
18974 | } | ||
18975 | pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( | ||
18976 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18977 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
18978 | container:DefinedElement) | ||
18979 | { | ||
18980 | find interpretation(problem,interpretation); | ||
18981 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
18982 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
18983 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
18984 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); | ||
18985 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
18986 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); | ||
18987 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); | ||
18988 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
18989 | find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); | ||
18990 | find mustExist(problem, interpretation, container); | ||
18991 | neg find mustExist(problem, interpretation, newObject); | ||
18992 | } | ||
18993 | pattern createObject_InformationLink_class( | ||
18994 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18995 | typeInterpretation:PartialComplexTypeInterpretation) | ||
18996 | { | ||
18997 | find interpretation(problem,interpretation); | ||
18998 | neg find hasElementInContainment(problem,interpretation); | ||
18999 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
19000 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
19001 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
19002 | find mayExist(problem, interpretation, newObject); | ||
19003 | neg find mustExist(problem, interpretation, newObject); | ||
19004 | } | ||
19005 | pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( | ||
19006 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19007 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
19008 | container:DefinedElement) | ||
19009 | { | ||
19010 | find interpretation(problem,interpretation); | ||
19011 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
19012 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
19013 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
19014 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); | ||
19015 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
19016 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); | ||
19017 | find mustInstanceOfFunctionalElement_class(problem,interpretation,container); | ||
19018 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
19019 | find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); | ||
19020 | find mustExist(problem, interpretation, container); | ||
19021 | neg find mustExist(problem, interpretation, newObject); | ||
19022 | } | ||
19023 | pattern createObject_FunctionalInterface_class( | ||
19024 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19025 | typeInterpretation:PartialComplexTypeInterpretation) | ||
19026 | { | ||
19027 | find interpretation(problem,interpretation); | ||
19028 | neg find hasElementInContainment(problem,interpretation); | ||
19029 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
19030 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
19031 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
19032 | find mayExist(problem, interpretation, newObject); | ||
19033 | neg find mustExist(problem, interpretation, newObject); | ||
19034 | } | ||
19035 | |||
19036 | ////////// | ||
19037 | // 4.2 Type refinement | ||
19038 | ////////// | ||
19039 | pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
19040 | find interpretation(problem,interpretation); | ||
19041 | PartialInterpretation.newElements(interpretation,element); | ||
19042 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
19043 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
19044 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
19045 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19046 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
19047 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19048 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19049 | } | ||
19050 | pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
19051 | find interpretation(problem,interpretation); | ||
19052 | PartialInterpretation.newElements(interpretation,element); | ||
19053 | find mayInstanceOfFunction_class(problem,interpretation,element); | ||
19054 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
19055 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
19056 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19057 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
19058 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19059 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19060 | } | ||
19061 | pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
19062 | find interpretation(problem,interpretation); | ||
19063 | PartialInterpretation.newElements(interpretation,element); | ||
19064 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
19065 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
19066 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19067 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
19068 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
19069 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
19070 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19071 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19072 | } | ||
19073 | pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
19074 | find interpretation(problem,interpretation); | ||
19075 | PartialInterpretation.newElements(interpretation,element); | ||
19076 | find mayInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19077 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
19078 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19079 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
19080 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
19081 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19082 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19083 | } | ||
19084 | pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
19085 | find interpretation(problem,interpretation); | ||
19086 | PartialInterpretation.newElements(interpretation,element); | ||
19087 | find mayInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
19088 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
19089 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19090 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
19091 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
19092 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
19093 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19094 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19095 | } | ||
19096 | pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
19097 | find interpretation(problem,interpretation); | ||
19098 | PartialInterpretation.newElements(interpretation,element); | ||
19099 | find mayInstanceOfInformationLink_class(problem,interpretation,element); | ||
19100 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
19101 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19102 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
19103 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
19104 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19105 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19106 | } | ||
19107 | pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
19108 | find interpretation(problem,interpretation); | ||
19109 | PartialInterpretation.newElements(interpretation,element); | ||
19110 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19111 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
19112 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19113 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
19114 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
19115 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19116 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19117 | } | ||
19118 | |||
19119 | ////////// | ||
19120 | // 4.3 Relation refinement | ||
19121 | ////////// | ||
19122 | pattern refineRelation_model_reference_FunctionalElement( | ||
19123 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19124 | relationIterpretation:PartialRelationInterpretation, | ||
19125 | from: DefinedElement, to: DefinedElement) | ||
19126 | { | ||
19127 | find interpretation(problem,interpretation); | ||
19128 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
19129 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
19130 | find mustExist(problem, interpretation, from); | ||
19131 | find mustExist(problem, interpretation, to); | ||
19132 | find mustInstanceOfFunctionalElement_class(problem,interpretation,from); | ||
19133 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); | ||
19134 | find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
19135 | neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
19136 | } | ||
19137 | pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( | ||
19138 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19139 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
19140 | from: DefinedElement, to: DefinedElement) | ||
19141 | { | ||
19142 | find interpretation(problem,interpretation); | ||
19143 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
19144 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
19145 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
19146 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); | ||
19147 | find mustExist(problem, interpretation, from); | ||
19148 | find mustExist(problem, interpretation, to); | ||
19149 | find mustInstanceOfFunctionalInput_class(problem,interpretation,from); | ||
19150 | find mustInstanceOfInformationLink_class(problem,interpretation,to); | ||
19151 | find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
19152 | neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
19153 | } | ||
19154 | pattern refineRelation_type_attribute_Function( | ||
19155 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19156 | relationIterpretation:PartialRelationInterpretation, | ||
19157 | from: DefinedElement, to: DefinedElement) | ||
19158 | { | ||
19159 | find interpretation(problem,interpretation); | ||
19160 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
19161 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
19162 | find mustExist(problem, interpretation, from); | ||
19163 | find mustExist(problem, interpretation, to); | ||
19164 | find mustInstanceOfFunction_class(problem,interpretation,from); | ||
19165 | find mustInstanceOfFunctionType_enum(problem,interpretation,to); | ||
19166 | find mayInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
19167 | neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
19168 | } | ||
19169 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
19170 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
19171 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
19172 | |||
19173 | ////////// | ||
19174 | // 0. Util | ||
19175 | ////////// | ||
19176 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
19177 | PartialInterpretation.problem(interpretation,problem); | ||
19178 | } | ||
19179 | |||
19180 | ///////////////////////// | ||
19181 | // 0.1 Existence | ||
19182 | ///////////////////////// | ||
19183 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
19184 | find interpretation(problem,interpretation); | ||
19185 | LogicProblem.elements(problem,element); | ||
19186 | } or { | ||
19187 | find interpretation(problem,interpretation); | ||
19188 | PartialInterpretation.newElements(interpretation,element); | ||
19189 | } | ||
19190 | |||
19191 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
19192 | find mustExist(problem,interpretation,element); | ||
19193 | } or { | ||
19194 | find interpretation(problem,interpretation); | ||
19195 | neg find elementCloseWorld(element); | ||
19196 | PartialInterpretation.openWorldElements(interpretation,element); | ||
19197 | } | ||
19198 | |||
19199 | private pattern elementCloseWorld(element:DefinedElement) { | ||
19200 | PartialInterpretation.openWorldElements(i,element); | ||
19201 | PartialInterpretation.maxNewElements(i,0); | ||
19202 | } or { | ||
19203 | Scope.targetTypeInterpretation(scope,interpretation); | ||
19204 | PartialTypeInterpratation.elements(interpretation,element); | ||
19205 | Scope.maxNewElements(scope,0); | ||
19206 | } | ||
19207 | |||
19208 | //////////////////////// | ||
19209 | // 0.2 Equivalence | ||
19210 | //////////////////////// | ||
19211 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
19212 | find mayExist(problem,interpretation,a); | ||
19213 | find mayExist(problem,interpretation,b); | ||
19214 | a == b; | ||
19215 | } | ||
19216 | |||
19217 | //////////////////////// | ||
19218 | // 0.3 Required Patterns by TypeIndexer | ||
19219 | //////////////////////// | ||
19220 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
19221 | find interpretation(problem,interpretation); | ||
19222 | LogicProblem.types(problem,type); | ||
19223 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
19224 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
19225 | } | ||
19226 | |||
19227 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
19228 | find interpretation(problem,interpretation); | ||
19229 | LogicProblem.types(problem,type); | ||
19230 | TypeDefinition.elements(type,element); | ||
19231 | } or { | ||
19232 | find interpretation(problem,interpretation); | ||
19233 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
19234 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
19235 | } | ||
19236 | |||
19237 | private pattern isPrimitive(element: PrimitiveElement) { | ||
19238 | PrimitiveElement(element); | ||
19239 | } | ||
19240 | |||
19241 | ////////// | ||
19242 | // 1. Problem-Specific Base Indexers | ||
19243 | ////////// | ||
19244 | // 1.1 Type Indexers | ||
19245 | ////////// | ||
19246 | // 1.1.1 primitive Type Indexers | ||
19247 | ////////// | ||
19248 | |||
19249 | ////////// | ||
19250 | // 1.1.2 domain-specific Type Indexers | ||
19251 | ////////// | ||
19252 | /** | ||
19253 | * An element must be an instance of type "FunctionalElement class". | ||
19254 | */ | ||
19255 | private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
19256 | Type.name(type,"FunctionalElement class"); | ||
19257 | find directInstanceOf(problem,interpretation,element,type); | ||
19258 | } | ||
19259 | private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
19260 | find interpretation(problem,interpretation); | ||
19261 | PartialInterpretation.scopes(interpretation,scope); | ||
19262 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
19263 | Scope.maxNewElements(scope,0); | ||
19264 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
19265 | Type.name(type,"FunctionalElement class"); | ||
19266 | } | ||
19267 | |||
19268 | /** | ||
19269 | * An element may be an instance of type "FunctionalElement class". | ||
19270 | */ | ||
19271 | private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
19272 | { | ||
19273 | find interpretation(problem,interpretation); | ||
19274 | PartialInterpretation.newElements(interpretation,element); | ||
19275 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
19276 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
19277 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19278 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
19279 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19280 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19281 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
19282 | neg find isPrimitive(element); | ||
19283 | } or { | ||
19284 | find interpretation(problem,interpretation); | ||
19285 | PartialInterpretation.openWorldElements(interpretation,element); | ||
19286 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
19287 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
19288 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19289 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
19290 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19291 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19292 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
19293 | neg find isPrimitive(element); | ||
19294 | } or | ||
19295 | { find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } | ||
19296 | /** | ||
19297 | * An element must be an instance of type "FunctionalArchitectureModel class". | ||
19298 | */ | ||
19299 | private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
19300 | Type.name(type,"FunctionalArchitectureModel class"); | ||
19301 | find directInstanceOf(problem,interpretation,element,type); | ||
19302 | } | ||
19303 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
19304 | find interpretation(problem,interpretation); | ||
19305 | PartialInterpretation.scopes(interpretation,scope); | ||
19306 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
19307 | Scope.maxNewElements(scope,0); | ||
19308 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
19309 | Type.name(type,"FunctionalArchitectureModel class"); | ||
19310 | } | ||
19311 | |||
19312 | /** | ||
19313 | * An element may be an instance of type "FunctionalArchitectureModel class". | ||
19314 | */ | ||
19315 | private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
19316 | { | ||
19317 | find interpretation(problem,interpretation); | ||
19318 | PartialInterpretation.newElements(interpretation,element); | ||
19319 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19320 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
19321 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
19322 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
19323 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19324 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19325 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
19326 | neg find isPrimitive(element); | ||
19327 | } or { | ||
19328 | find interpretation(problem,interpretation); | ||
19329 | PartialInterpretation.openWorldElements(interpretation,element); | ||
19330 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19331 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
19332 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
19333 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
19334 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19335 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19336 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
19337 | neg find isPrimitive(element); | ||
19338 | } or | ||
19339 | { find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } | ||
19340 | /** | ||
19341 | * An element must be an instance of type "Function class". | ||
19342 | */ | ||
19343 | private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
19344 | Type.name(type,"Function class"); | ||
19345 | find directInstanceOf(problem,interpretation,element,type); | ||
19346 | } | ||
19347 | private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
19348 | find interpretation(problem,interpretation); | ||
19349 | PartialInterpretation.scopes(interpretation,scope); | ||
19350 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
19351 | Scope.maxNewElements(scope,0); | ||
19352 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
19353 | Type.name(type,"Function class"); | ||
19354 | } | ||
19355 | |||
19356 | /** | ||
19357 | * An element may be an instance of type "Function class". | ||
19358 | */ | ||
19359 | private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
19360 | { | ||
19361 | find interpretation(problem,interpretation); | ||
19362 | PartialInterpretation.newElements(interpretation,element); | ||
19363 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
19364 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19365 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
19366 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19367 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19368 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
19369 | neg find isPrimitive(element); | ||
19370 | } or { | ||
19371 | find interpretation(problem,interpretation); | ||
19372 | PartialInterpretation.openWorldElements(interpretation,element); | ||
19373 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
19374 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19375 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
19376 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19377 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19378 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
19379 | neg find isPrimitive(element); | ||
19380 | } or | ||
19381 | { find mustInstanceOfFunction_class(problem,interpretation,element); } | ||
19382 | /** | ||
19383 | * An element must be an instance of type "FAMTerminator class". | ||
19384 | */ | ||
19385 | private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
19386 | Type.name(type,"FAMTerminator class"); | ||
19387 | find directInstanceOf(problem,interpretation,element,type); | ||
19388 | } | ||
19389 | private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
19390 | find interpretation(problem,interpretation); | ||
19391 | PartialInterpretation.scopes(interpretation,scope); | ||
19392 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
19393 | Scope.maxNewElements(scope,0); | ||
19394 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
19395 | Type.name(type,"FAMTerminator class"); | ||
19396 | } | ||
19397 | |||
19398 | /** | ||
19399 | * An element may be an instance of type "FAMTerminator class". | ||
19400 | */ | ||
19401 | private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
19402 | { | ||
19403 | find interpretation(problem,interpretation); | ||
19404 | PartialInterpretation.newElements(interpretation,element); | ||
19405 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
19406 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19407 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
19408 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
19409 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19410 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
19411 | neg find isPrimitive(element); | ||
19412 | } or { | ||
19413 | find interpretation(problem,interpretation); | ||
19414 | PartialInterpretation.openWorldElements(interpretation,element); | ||
19415 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
19416 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19417 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
19418 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
19419 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19420 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
19421 | neg find isPrimitive(element); | ||
19422 | } or | ||
19423 | { find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } | ||
19424 | /** | ||
19425 | * An element must be an instance of type "InformationLink class". | ||
19426 | */ | ||
19427 | private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
19428 | Type.name(type,"InformationLink class"); | ||
19429 | find directInstanceOf(problem,interpretation,element,type); | ||
19430 | } | ||
19431 | private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
19432 | find interpretation(problem,interpretation); | ||
19433 | PartialInterpretation.scopes(interpretation,scope); | ||
19434 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
19435 | Scope.maxNewElements(scope,0); | ||
19436 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
19437 | Type.name(type,"InformationLink class"); | ||
19438 | } | ||
19439 | |||
19440 | /** | ||
19441 | * An element may be an instance of type "InformationLink class". | ||
19442 | */ | ||
19443 | private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
19444 | { | ||
19445 | find interpretation(problem,interpretation); | ||
19446 | PartialInterpretation.newElements(interpretation,element); | ||
19447 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
19448 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19449 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
19450 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
19451 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19452 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
19453 | neg find isPrimitive(element); | ||
19454 | } or { | ||
19455 | find interpretation(problem,interpretation); | ||
19456 | PartialInterpretation.openWorldElements(interpretation,element); | ||
19457 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
19458 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19459 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
19460 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
19461 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19462 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
19463 | neg find isPrimitive(element); | ||
19464 | } or | ||
19465 | { find mustInstanceOfInformationLink_class(problem,interpretation,element); } | ||
19466 | /** | ||
19467 | * An element must be an instance of type "FunctionalInterface class". | ||
19468 | */ | ||
19469 | private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
19470 | Type.name(type,"FunctionalInterface class"); | ||
19471 | find directInstanceOf(problem,interpretation,element,type); | ||
19472 | } | ||
19473 | private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
19474 | find interpretation(problem,interpretation); | ||
19475 | PartialInterpretation.scopes(interpretation,scope); | ||
19476 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
19477 | Scope.maxNewElements(scope,0); | ||
19478 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
19479 | Type.name(type,"FunctionalInterface class"); | ||
19480 | } | ||
19481 | |||
19482 | /** | ||
19483 | * An element may be an instance of type "FunctionalInterface class". | ||
19484 | */ | ||
19485 | private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
19486 | { | ||
19487 | find interpretation(problem,interpretation); | ||
19488 | PartialInterpretation.newElements(interpretation,element); | ||
19489 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
19490 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
19491 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
19492 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19493 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19494 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
19495 | neg find isPrimitive(element); | ||
19496 | } or { | ||
19497 | find interpretation(problem,interpretation); | ||
19498 | PartialInterpretation.openWorldElements(interpretation,element); | ||
19499 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
19500 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
19501 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
19502 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19503 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19504 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
19505 | neg find isPrimitive(element); | ||
19506 | } or | ||
19507 | { find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } | ||
19508 | /** | ||
19509 | * An element must be an instance of type "FunctionalInput class". | ||
19510 | */ | ||
19511 | private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
19512 | Type.name(type,"FunctionalInput class"); | ||
19513 | find directInstanceOf(problem,interpretation,element,type); | ||
19514 | } | ||
19515 | private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
19516 | find interpretation(problem,interpretation); | ||
19517 | PartialInterpretation.scopes(interpretation,scope); | ||
19518 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
19519 | Scope.maxNewElements(scope,0); | ||
19520 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
19521 | Type.name(type,"FunctionalInput class"); | ||
19522 | } | ||
19523 | |||
19524 | /** | ||
19525 | * An element may be an instance of type "FunctionalInput class". | ||
19526 | */ | ||
19527 | private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
19528 | { | ||
19529 | find interpretation(problem,interpretation); | ||
19530 | PartialInterpretation.newElements(interpretation,element); | ||
19531 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
19532 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19533 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
19534 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
19535 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19536 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19537 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
19538 | neg find isPrimitive(element); | ||
19539 | } or { | ||
19540 | find interpretation(problem,interpretation); | ||
19541 | PartialInterpretation.openWorldElements(interpretation,element); | ||
19542 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
19543 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19544 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
19545 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
19546 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19547 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19548 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
19549 | neg find isPrimitive(element); | ||
19550 | } or | ||
19551 | { find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } | ||
19552 | /** | ||
19553 | * An element must be an instance of type "FunctionalOutput class". | ||
19554 | */ | ||
19555 | private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
19556 | Type.name(type,"FunctionalOutput class"); | ||
19557 | find directInstanceOf(problem,interpretation,element,type); | ||
19558 | } | ||
19559 | private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
19560 | find interpretation(problem,interpretation); | ||
19561 | PartialInterpretation.scopes(interpretation,scope); | ||
19562 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
19563 | Scope.maxNewElements(scope,0); | ||
19564 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
19565 | Type.name(type,"FunctionalOutput class"); | ||
19566 | } | ||
19567 | |||
19568 | /** | ||
19569 | * An element may be an instance of type "FunctionalOutput class". | ||
19570 | */ | ||
19571 | private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
19572 | { | ||
19573 | find interpretation(problem,interpretation); | ||
19574 | PartialInterpretation.newElements(interpretation,element); | ||
19575 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
19576 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19577 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
19578 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
19579 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19580 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19581 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
19582 | neg find isPrimitive(element); | ||
19583 | } or { | ||
19584 | find interpretation(problem,interpretation); | ||
19585 | PartialInterpretation.openWorldElements(interpretation,element); | ||
19586 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
19587 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19588 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
19589 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
19590 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19591 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19592 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
19593 | neg find isPrimitive(element); | ||
19594 | } or | ||
19595 | { find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } | ||
19596 | /** | ||
19597 | * An element must be an instance of type "FunctionalData class". | ||
19598 | */ | ||
19599 | private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
19600 | Type.name(type,"FunctionalData class"); | ||
19601 | find directInstanceOf(problem,interpretation,element,type); | ||
19602 | } | ||
19603 | private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
19604 | find interpretation(problem,interpretation); | ||
19605 | PartialInterpretation.scopes(interpretation,scope); | ||
19606 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
19607 | Scope.maxNewElements(scope,0); | ||
19608 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
19609 | Type.name(type,"FunctionalData class"); | ||
19610 | } | ||
19611 | |||
19612 | /** | ||
19613 | * An element may be an instance of type "FunctionalData class". | ||
19614 | */ | ||
19615 | private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
19616 | { | ||
19617 | find interpretation(problem,interpretation); | ||
19618 | PartialInterpretation.newElements(interpretation,element); | ||
19619 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
19620 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19621 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
19622 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
19623 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
19624 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19625 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19626 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
19627 | neg find isPrimitive(element); | ||
19628 | } or { | ||
19629 | find interpretation(problem,interpretation); | ||
19630 | PartialInterpretation.openWorldElements(interpretation,element); | ||
19631 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
19632 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19633 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
19634 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
19635 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
19636 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19637 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19638 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
19639 | neg find isPrimitive(element); | ||
19640 | } or | ||
19641 | { find mustInstanceOfFunctionalData_class(problem,interpretation,element); } | ||
19642 | /** | ||
19643 | * An element must be an instance of type "FunctionType enum". | ||
19644 | */ | ||
19645 | private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
19646 | Type.name(type,"FunctionType enum"); | ||
19647 | find directInstanceOf(problem,interpretation,element,type); | ||
19648 | } | ||
19649 | private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
19650 | find interpretation(problem,interpretation); | ||
19651 | PartialInterpretation.scopes(interpretation,scope); | ||
19652 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
19653 | Scope.maxNewElements(scope,0); | ||
19654 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
19655 | Type.name(type,"FunctionType enum"); | ||
19656 | } | ||
19657 | |||
19658 | /** | ||
19659 | * An element may be an instance of type "FunctionType enum". | ||
19660 | */ | ||
19661 | private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
19662 | { find mustInstanceOfFunctionType_enum(problem,interpretation,element); } | ||
19663 | /** | ||
19664 | * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
19665 | */ | ||
19666 | private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
19667 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
19668 | find directInstanceOf(problem,interpretation,element,type); | ||
19669 | } | ||
19670 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
19671 | find interpretation(problem,interpretation); | ||
19672 | PartialInterpretation.scopes(interpretation,scope); | ||
19673 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
19674 | Scope.maxNewElements(scope,0); | ||
19675 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
19676 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
19677 | } | ||
19678 | |||
19679 | /** | ||
19680 | * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
19681 | */ | ||
19682 | private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
19683 | { find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } | ||
19684 | /** | ||
19685 | * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
19686 | */ | ||
19687 | private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
19688 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
19689 | find directInstanceOf(problem,interpretation,element,type); | ||
19690 | } | ||
19691 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
19692 | find interpretation(problem,interpretation); | ||
19693 | PartialInterpretation.scopes(interpretation,scope); | ||
19694 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
19695 | Scope.maxNewElements(scope,0); | ||
19696 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
19697 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
19698 | } | ||
19699 | |||
19700 | /** | ||
19701 | * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
19702 | */ | ||
19703 | private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
19704 | { | ||
19705 | find interpretation(problem,interpretation); | ||
19706 | PartialInterpretation.newElements(interpretation,element); | ||
19707 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19708 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
19709 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
19710 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19711 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19712 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
19713 | neg find isPrimitive(element); | ||
19714 | } or { | ||
19715 | find interpretation(problem,interpretation); | ||
19716 | PartialInterpretation.openWorldElements(interpretation,element); | ||
19717 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
19718 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
19719 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
19720 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
19721 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
19722 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
19723 | neg find isPrimitive(element); | ||
19724 | } or | ||
19725 | { find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } | ||
19726 | |||
19727 | ////////// | ||
19728 | // 1.2 Relation Declaration Indexers | ||
19729 | ////////// | ||
19730 | /** | ||
19731 | * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) | ||
19732 | */ | ||
19733 | private pattern mustInRelationinterface_reference_FunctionalElement( | ||
19734 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19735 | source: DefinedElement, target:DefinedElement) | ||
19736 | { | ||
19737 | find interpretation(problem,interpretation); | ||
19738 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
19739 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); | ||
19740 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
19741 | BinaryElementRelationLink.param1(link,source); | ||
19742 | BinaryElementRelationLink.param2(link,target); | ||
19743 | } | ||
19744 | /** | ||
19745 | * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) | ||
19746 | */ | ||
19747 | private pattern mayInRelationinterface_reference_FunctionalElement( | ||
19748 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19749 | source: DefinedElement, target:DefinedElement) | ||
19750 | { | ||
19751 | find interpretation(problem,interpretation); | ||
19752 | // The two endpoint of the link have to exist | ||
19753 | find mayExist(problem, interpretation, source); | ||
19754 | find mayExist(problem, interpretation, target); | ||
19755 | // Type consistency | ||
19756 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
19757 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
19758 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
19759 | // the upper bound of the multiplicity should be considered. | ||
19760 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); | ||
19761 | check(numberOfExistingReferences < 1); | ||
19762 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
19763 | // the upper bound of the opposite reference multiplicity should be considered. | ||
19764 | numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); | ||
19765 | check(numberOfExistingOppositeReferences < 1); | ||
19766 | // The reference is containment, then a new reference cannot be create if: | ||
19767 | // 1. Multiple parents | ||
19768 | neg find mustContains4(problem,interpretation,_,target); | ||
19769 | // 2. Circle in the containment hierarchy | ||
19770 | neg find mustTransitiveContains(source,target); | ||
19771 | } or { | ||
19772 | find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); | ||
19773 | } | ||
19774 | /** | ||
19775 | * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) | ||
19776 | */ | ||
19777 | private pattern mustInRelationmodel_reference_FunctionalElement( | ||
19778 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19779 | source: DefinedElement, target:DefinedElement) | ||
19780 | { | ||
19781 | find interpretation(problem,interpretation); | ||
19782 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
19783 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
19784 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
19785 | BinaryElementRelationLink.param1(link,source); | ||
19786 | BinaryElementRelationLink.param2(link,target); | ||
19787 | } | ||
19788 | /** | ||
19789 | * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target) | ||
19790 | */ | ||
19791 | private pattern mayInRelationmodel_reference_FunctionalElement( | ||
19792 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19793 | source: DefinedElement, target:DefinedElement) | ||
19794 | { | ||
19795 | find interpretation(problem,interpretation); | ||
19796 | // The two endpoint of the link have to exist | ||
19797 | find mayExist(problem, interpretation, source); | ||
19798 | find mayExist(problem, interpretation, target); | ||
19799 | // Type consistency | ||
19800 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
19801 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target); | ||
19802 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
19803 | // the upper bound of the multiplicity should be considered. | ||
19804 | numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_); | ||
19805 | check(numberOfExistingReferences < 1); | ||
19806 | } or { | ||
19807 | find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target); | ||
19808 | } | ||
19809 | /** | ||
19810 | * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) | ||
19811 | */ | ||
19812 | private pattern mustInRelationparent_reference_FunctionalElement( | ||
19813 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19814 | source: DefinedElement, target:DefinedElement) | ||
19815 | { | ||
19816 | find interpretation(problem,interpretation); | ||
19817 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
19818 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); | ||
19819 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
19820 | BinaryElementRelationLink.param1(link,source); | ||
19821 | BinaryElementRelationLink.param2(link,target); | ||
19822 | } | ||
19823 | /** | ||
19824 | * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) | ||
19825 | */ | ||
19826 | private pattern mayInRelationparent_reference_FunctionalElement( | ||
19827 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19828 | source: DefinedElement, target:DefinedElement) | ||
19829 | { | ||
19830 | find interpretation(problem,interpretation); | ||
19831 | // The two endpoint of the link have to exist | ||
19832 | find mayExist(problem, interpretation, source); | ||
19833 | find mayExist(problem, interpretation, target); | ||
19834 | // Type consistency | ||
19835 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
19836 | find mayInstanceOfFunction_class(problem,interpretation,target); | ||
19837 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
19838 | // the upper bound of the multiplicity should be considered. | ||
19839 | numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); | ||
19840 | check(numberOfExistingReferences < 1); | ||
19841 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
19842 | // 1. Multiple parents | ||
19843 | neg find mustContains4(problem,interpretation,source,_); | ||
19844 | // 2. Circle in the containment hierarchy | ||
19845 | neg find mustTransitiveContains(source,target); | ||
19846 | } or { | ||
19847 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); | ||
19848 | } | ||
19849 | /** | ||
19850 | * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) | ||
19851 | */ | ||
19852 | private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( | ||
19853 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19854 | source: DefinedElement, target:DefinedElement) | ||
19855 | { | ||
19856 | find interpretation(problem,interpretation); | ||
19857 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
19858 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
19859 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
19860 | BinaryElementRelationLink.param1(link,source); | ||
19861 | BinaryElementRelationLink.param2(link,target); | ||
19862 | } | ||
19863 | /** | ||
19864 | * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) | ||
19865 | */ | ||
19866 | private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( | ||
19867 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19868 | source: DefinedElement, target:DefinedElement) | ||
19869 | { | ||
19870 | find interpretation(problem,interpretation); | ||
19871 | // The two endpoint of the link have to exist | ||
19872 | find mayExist(problem, interpretation, source); | ||
19873 | find mayExist(problem, interpretation, target); | ||
19874 | // Type consistency | ||
19875 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); | ||
19876 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
19877 | // The reference is containment, then a new reference cannot be create if: | ||
19878 | // 1. Multiple parents | ||
19879 | neg find mustContains4(problem,interpretation,_,target); | ||
19880 | // 2. Circle in the containment hierarchy | ||
19881 | neg find mustTransitiveContains(source,target); | ||
19882 | } or { | ||
19883 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); | ||
19884 | } | ||
19885 | /** | ||
19886 | * Matcher for detecting tuples t where []subElements reference Function(source,target) | ||
19887 | */ | ||
19888 | private pattern mustInRelationsubElements_reference_Function( | ||
19889 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19890 | source: DefinedElement, target:DefinedElement) | ||
19891 | { | ||
19892 | find interpretation(problem,interpretation); | ||
19893 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
19894 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); | ||
19895 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
19896 | BinaryElementRelationLink.param1(link,source); | ||
19897 | BinaryElementRelationLink.param2(link,target); | ||
19898 | } | ||
19899 | /** | ||
19900 | * Matcher for detecting tuples t where <>subElements reference Function(source,target) | ||
19901 | */ | ||
19902 | private pattern mayInRelationsubElements_reference_Function( | ||
19903 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19904 | source: DefinedElement, target:DefinedElement) | ||
19905 | { | ||
19906 | find interpretation(problem,interpretation); | ||
19907 | // The two endpoint of the link have to exist | ||
19908 | find mayExist(problem, interpretation, source); | ||
19909 | find mayExist(problem, interpretation, target); | ||
19910 | // Type consistency | ||
19911 | find mayInstanceOfFunction_class(problem,interpretation,source); | ||
19912 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
19913 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
19914 | // the upper bound of the opposite reference multiplicity should be considered. | ||
19915 | numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); | ||
19916 | check(numberOfExistingOppositeReferences < 1); | ||
19917 | // The reference is containment, then a new reference cannot be create if: | ||
19918 | // 1. Multiple parents | ||
19919 | neg find mustContains4(problem,interpretation,_,target); | ||
19920 | // 2. Circle in the containment hierarchy | ||
19921 | neg find mustTransitiveContains(source,target); | ||
19922 | } or { | ||
19923 | find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); | ||
19924 | } | ||
19925 | /** | ||
19926 | * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) | ||
19927 | */ | ||
19928 | private pattern mustInRelationdata_reference_FAMTerminator( | ||
19929 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19930 | source: DefinedElement, target:DefinedElement) | ||
19931 | { | ||
19932 | find interpretation(problem,interpretation); | ||
19933 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
19934 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); | ||
19935 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
19936 | BinaryElementRelationLink.param1(link,source); | ||
19937 | BinaryElementRelationLink.param2(link,target); | ||
19938 | } | ||
19939 | /** | ||
19940 | * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) | ||
19941 | */ | ||
19942 | private pattern mayInRelationdata_reference_FAMTerminator( | ||
19943 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19944 | source: DefinedElement, target:DefinedElement) | ||
19945 | { | ||
19946 | find interpretation(problem,interpretation); | ||
19947 | // The two endpoint of the link have to exist | ||
19948 | find mayExist(problem, interpretation, source); | ||
19949 | find mayExist(problem, interpretation, target); | ||
19950 | // Type consistency | ||
19951 | find mayInstanceOfFAMTerminator_class(problem,interpretation,source); | ||
19952 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
19953 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
19954 | // the upper bound of the multiplicity should be considered. | ||
19955 | numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); | ||
19956 | check(numberOfExistingReferences < 1); | ||
19957 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
19958 | // the upper bound of the opposite reference multiplicity should be considered. | ||
19959 | numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); | ||
19960 | check(numberOfExistingOppositeReferences < 1); | ||
19961 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
19962 | // 1. Multiple parents | ||
19963 | neg find mustContains4(problem,interpretation,source,_); | ||
19964 | // 2. Circle in the containment hierarchy | ||
19965 | neg find mustTransitiveContains(source,target); | ||
19966 | } or { | ||
19967 | find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); | ||
19968 | } | ||
19969 | /** | ||
19970 | * Matcher for detecting tuples t where []from reference InformationLink(source,target) | ||
19971 | */ | ||
19972 | private pattern mustInRelationfrom_reference_InformationLink( | ||
19973 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19974 | source: DefinedElement, target:DefinedElement) | ||
19975 | { | ||
19976 | find interpretation(problem,interpretation); | ||
19977 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
19978 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); | ||
19979 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
19980 | BinaryElementRelationLink.param1(link,source); | ||
19981 | BinaryElementRelationLink.param2(link,target); | ||
19982 | } | ||
19983 | /** | ||
19984 | * Matcher for detecting tuples t where <>from reference InformationLink(source,target) | ||
19985 | */ | ||
19986 | private pattern mayInRelationfrom_reference_InformationLink( | ||
19987 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19988 | source: DefinedElement, target:DefinedElement) | ||
19989 | { | ||
19990 | find interpretation(problem,interpretation); | ||
19991 | // The two endpoint of the link have to exist | ||
19992 | find mayExist(problem, interpretation, source); | ||
19993 | find mayExist(problem, interpretation, target); | ||
19994 | // Type consistency | ||
19995 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
19996 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); | ||
19997 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
19998 | // the upper bound of the multiplicity should be considered. | ||
19999 | numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); | ||
20000 | check(numberOfExistingReferences < 1); | ||
20001 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
20002 | // 1. Multiple parents | ||
20003 | neg find mustContains4(problem,interpretation,source,_); | ||
20004 | // 2. Circle in the containment hierarchy | ||
20005 | neg find mustTransitiveContains(source,target); | ||
20006 | } or { | ||
20007 | find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); | ||
20008 | } | ||
20009 | /** | ||
20010 | * Matcher for detecting tuples t where []to reference InformationLink(source,target) | ||
20011 | */ | ||
20012 | private pattern mustInRelationto_reference_InformationLink( | ||
20013 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20014 | source: DefinedElement, target:DefinedElement) | ||
20015 | { | ||
20016 | find interpretation(problem,interpretation); | ||
20017 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
20018 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
20019 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
20020 | BinaryElementRelationLink.param1(link,source); | ||
20021 | BinaryElementRelationLink.param2(link,target); | ||
20022 | } | ||
20023 | /** | ||
20024 | * Matcher for detecting tuples t where <>to reference InformationLink(source,target) | ||
20025 | */ | ||
20026 | private pattern mayInRelationto_reference_InformationLink( | ||
20027 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20028 | source: DefinedElement, target:DefinedElement) | ||
20029 | { | ||
20030 | find interpretation(problem,interpretation); | ||
20031 | // The two endpoint of the link have to exist | ||
20032 | find mayExist(problem, interpretation, source); | ||
20033 | find mayExist(problem, interpretation, target); | ||
20034 | // Type consistency | ||
20035 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
20036 | find mayInstanceOfFunctionalInput_class(problem,interpretation,target); | ||
20037 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
20038 | // the upper bound of the multiplicity should be considered. | ||
20039 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); | ||
20040 | check(numberOfExistingReferences < 1); | ||
20041 | } or { | ||
20042 | find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); | ||
20043 | } | ||
20044 | /** | ||
20045 | * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) | ||
20046 | */ | ||
20047 | private pattern mustInRelationdata_reference_FunctionalInterface( | ||
20048 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20049 | source: DefinedElement, target:DefinedElement) | ||
20050 | { | ||
20051 | find interpretation(problem,interpretation); | ||
20052 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
20053 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); | ||
20054 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
20055 | BinaryElementRelationLink.param1(link,source); | ||
20056 | BinaryElementRelationLink.param2(link,target); | ||
20057 | } | ||
20058 | /** | ||
20059 | * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) | ||
20060 | */ | ||
20061 | private pattern mayInRelationdata_reference_FunctionalInterface( | ||
20062 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20063 | source: DefinedElement, target:DefinedElement) | ||
20064 | { | ||
20065 | find interpretation(problem,interpretation); | ||
20066 | // The two endpoint of the link have to exist | ||
20067 | find mayExist(problem, interpretation, source); | ||
20068 | find mayExist(problem, interpretation, target); | ||
20069 | // Type consistency | ||
20070 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
20071 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
20072 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
20073 | // the upper bound of the opposite reference multiplicity should be considered. | ||
20074 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); | ||
20075 | check(numberOfExistingOppositeReferences < 1); | ||
20076 | // The reference is containment, then a new reference cannot be create if: | ||
20077 | // 1. Multiple parents | ||
20078 | neg find mustContains4(problem,interpretation,_,target); | ||
20079 | // 2. Circle in the containment hierarchy | ||
20080 | neg find mustTransitiveContains(source,target); | ||
20081 | } or { | ||
20082 | find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); | ||
20083 | } | ||
20084 | /** | ||
20085 | * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) | ||
20086 | */ | ||
20087 | private pattern mustInRelationelement_reference_FunctionalInterface( | ||
20088 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20089 | source: DefinedElement, target:DefinedElement) | ||
20090 | { | ||
20091 | find interpretation(problem,interpretation); | ||
20092 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
20093 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); | ||
20094 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
20095 | BinaryElementRelationLink.param1(link,source); | ||
20096 | BinaryElementRelationLink.param2(link,target); | ||
20097 | } | ||
20098 | /** | ||
20099 | * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) | ||
20100 | */ | ||
20101 | private pattern mayInRelationelement_reference_FunctionalInterface( | ||
20102 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20103 | source: DefinedElement, target:DefinedElement) | ||
20104 | { | ||
20105 | find interpretation(problem,interpretation); | ||
20106 | // The two endpoint of the link have to exist | ||
20107 | find mayExist(problem, interpretation, source); | ||
20108 | find mayExist(problem, interpretation, target); | ||
20109 | // Type consistency | ||
20110 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
20111 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
20112 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
20113 | // the upper bound of the multiplicity should be considered. | ||
20114 | numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); | ||
20115 | check(numberOfExistingReferences < 1); | ||
20116 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
20117 | // the upper bound of the opposite reference multiplicity should be considered. | ||
20118 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); | ||
20119 | check(numberOfExistingOppositeReferences < 1); | ||
20120 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
20121 | // 1. Multiple parents | ||
20122 | neg find mustContains4(problem,interpretation,source,_); | ||
20123 | // 2. Circle in the containment hierarchy | ||
20124 | neg find mustTransitiveContains(source,target); | ||
20125 | } or { | ||
20126 | find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); | ||
20127 | } | ||
20128 | /** | ||
20129 | * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) | ||
20130 | */ | ||
20131 | private pattern mustInRelationIncomingLinks_reference_FunctionalInput( | ||
20132 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20133 | source: DefinedElement, target:DefinedElement) | ||
20134 | { | ||
20135 | find interpretation(problem,interpretation); | ||
20136 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
20137 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
20138 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
20139 | BinaryElementRelationLink.param1(link,source); | ||
20140 | BinaryElementRelationLink.param2(link,target); | ||
20141 | } | ||
20142 | /** | ||
20143 | * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) | ||
20144 | */ | ||
20145 | private pattern mayInRelationIncomingLinks_reference_FunctionalInput( | ||
20146 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20147 | source: DefinedElement, target:DefinedElement) | ||
20148 | { | ||
20149 | find interpretation(problem,interpretation); | ||
20150 | // The two endpoint of the link have to exist | ||
20151 | find mayExist(problem, interpretation, source); | ||
20152 | find mayExist(problem, interpretation, target); | ||
20153 | // Type consistency | ||
20154 | find mayInstanceOfFunctionalInput_class(problem,interpretation,source); | ||
20155 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
20156 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
20157 | // the upper bound of the opposite reference multiplicity should be considered. | ||
20158 | numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); | ||
20159 | check(numberOfExistingOppositeReferences < 1); | ||
20160 | } or { | ||
20161 | find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); | ||
20162 | } | ||
20163 | /** | ||
20164 | * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) | ||
20165 | */ | ||
20166 | private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( | ||
20167 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20168 | source: DefinedElement, target:DefinedElement) | ||
20169 | { | ||
20170 | find interpretation(problem,interpretation); | ||
20171 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
20172 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); | ||
20173 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
20174 | BinaryElementRelationLink.param1(link,source); | ||
20175 | BinaryElementRelationLink.param2(link,target); | ||
20176 | } | ||
20177 | /** | ||
20178 | * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) | ||
20179 | */ | ||
20180 | private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( | ||
20181 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20182 | source: DefinedElement, target:DefinedElement) | ||
20183 | { | ||
20184 | find interpretation(problem,interpretation); | ||
20185 | // The two endpoint of the link have to exist | ||
20186 | find mayExist(problem, interpretation, source); | ||
20187 | find mayExist(problem, interpretation, target); | ||
20188 | // Type consistency | ||
20189 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); | ||
20190 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
20191 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
20192 | // the upper bound of the opposite reference multiplicity should be considered. | ||
20193 | numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); | ||
20194 | check(numberOfExistingOppositeReferences < 1); | ||
20195 | // The reference is containment, then a new reference cannot be create if: | ||
20196 | // 1. Multiple parents | ||
20197 | neg find mustContains4(problem,interpretation,_,target); | ||
20198 | // 2. Circle in the containment hierarchy | ||
20199 | neg find mustTransitiveContains(source,target); | ||
20200 | } or { | ||
20201 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); | ||
20202 | } | ||
20203 | /** | ||
20204 | * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) | ||
20205 | */ | ||
20206 | private pattern mustInRelationterminator_reference_FunctionalData( | ||
20207 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20208 | source: DefinedElement, target:DefinedElement) | ||
20209 | { | ||
20210 | find interpretation(problem,interpretation); | ||
20211 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
20212 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); | ||
20213 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
20214 | BinaryElementRelationLink.param1(link,source); | ||
20215 | BinaryElementRelationLink.param2(link,target); | ||
20216 | } | ||
20217 | /** | ||
20218 | * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) | ||
20219 | */ | ||
20220 | private pattern mayInRelationterminator_reference_FunctionalData( | ||
20221 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20222 | source: DefinedElement, target:DefinedElement) | ||
20223 | { | ||
20224 | find interpretation(problem,interpretation); | ||
20225 | // The two endpoint of the link have to exist | ||
20226 | find mayExist(problem, interpretation, source); | ||
20227 | find mayExist(problem, interpretation, target); | ||
20228 | // Type consistency | ||
20229 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
20230 | find mayInstanceOfFAMTerminator_class(problem,interpretation,target); | ||
20231 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
20232 | // the upper bound of the multiplicity should be considered. | ||
20233 | numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); | ||
20234 | check(numberOfExistingReferences < 1); | ||
20235 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
20236 | // the upper bound of the opposite reference multiplicity should be considered. | ||
20237 | numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); | ||
20238 | check(numberOfExistingOppositeReferences < 1); | ||
20239 | // The reference is containment, then a new reference cannot be create if: | ||
20240 | // 1. Multiple parents | ||
20241 | neg find mustContains4(problem,interpretation,_,target); | ||
20242 | // 2. Circle in the containment hierarchy | ||
20243 | neg find mustTransitiveContains(source,target); | ||
20244 | } or { | ||
20245 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); | ||
20246 | } | ||
20247 | /** | ||
20248 | * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) | ||
20249 | */ | ||
20250 | private pattern mustInRelationinterface_reference_FunctionalData( | ||
20251 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20252 | source: DefinedElement, target:DefinedElement) | ||
20253 | { | ||
20254 | find interpretation(problem,interpretation); | ||
20255 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
20256 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); | ||
20257 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
20258 | BinaryElementRelationLink.param1(link,source); | ||
20259 | BinaryElementRelationLink.param2(link,target); | ||
20260 | } | ||
20261 | /** | ||
20262 | * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) | ||
20263 | */ | ||
20264 | private pattern mayInRelationinterface_reference_FunctionalData( | ||
20265 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20266 | source: DefinedElement, target:DefinedElement) | ||
20267 | { | ||
20268 | find interpretation(problem,interpretation); | ||
20269 | // The two endpoint of the link have to exist | ||
20270 | find mayExist(problem, interpretation, source); | ||
20271 | find mayExist(problem, interpretation, target); | ||
20272 | // Type consistency | ||
20273 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
20274 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
20275 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
20276 | // the upper bound of the multiplicity should be considered. | ||
20277 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); | ||
20278 | check(numberOfExistingReferences < 1); | ||
20279 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
20280 | // 1. Multiple parents | ||
20281 | neg find mustContains4(problem,interpretation,source,_); | ||
20282 | // 2. Circle in the containment hierarchy | ||
20283 | neg find mustTransitiveContains(source,target); | ||
20284 | } or { | ||
20285 | find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); | ||
20286 | } | ||
20287 | /** | ||
20288 | * Matcher for detecting tuples t where []type attribute Function(source,target) | ||
20289 | */ | ||
20290 | private pattern mustInRelationtype_attribute_Function( | ||
20291 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20292 | source: DefinedElement, target:DefinedElement) | ||
20293 | { | ||
20294 | find interpretation(problem,interpretation); | ||
20295 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
20296 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
20297 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
20298 | BinaryElementRelationLink.param1(link,source); | ||
20299 | BinaryElementRelationLink.param2(link,target); | ||
20300 | } | ||
20301 | /** | ||
20302 | * Matcher for detecting tuples t where <>type attribute Function(source,target) | ||
20303 | */ | ||
20304 | private pattern mayInRelationtype_attribute_Function( | ||
20305 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20306 | source: DefinedElement, target:DefinedElement) | ||
20307 | { | ||
20308 | find interpretation(problem,interpretation); | ||
20309 | // The two endpoint of the link have to exist | ||
20310 | find mayExist(problem, interpretation, source); | ||
20311 | find mayExist(problem, interpretation, target); | ||
20312 | // Type consistency | ||
20313 | find mayInstanceOfFunction_class(problem,interpretation,source); | ||
20314 | find mayInstanceOfFunctionType_enum(problem,interpretation,target); | ||
20315 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
20316 | // the upper bound of the multiplicity should be considered. | ||
20317 | numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_); | ||
20318 | check(numberOfExistingReferences < 1); | ||
20319 | } or { | ||
20320 | find mustInRelationtype_attribute_Function(problem,interpretation,source,target); | ||
20321 | } | ||
20322 | |||
20323 | ////////// | ||
20324 | // 1.3 Relation Definition Indexers | ||
20325 | ////////// | ||
20326 | |||
20327 | ////////// | ||
20328 | // 1.4 Containment Indexer | ||
20329 | ////////// | ||
20330 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
20331 | find mustContains4(_,_,source,target); | ||
20332 | } | ||
20333 | |||
20334 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20335 | source: DefinedElement, target: DefinedElement) | ||
20336 | { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or | ||
20337 | |||
20338 | { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or | ||
20339 | |||
20340 | { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or | ||
20341 | |||
20342 | { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or | ||
20343 | |||
20344 | { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or | ||
20345 | |||
20346 | { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } | ||
20347 | |||
20348 | private pattern mustTransitiveContains(source,target) { | ||
20349 | find mustContains2+(source,target); | ||
20350 | } | ||
20351 | |||
20352 | ////////// | ||
20353 | // 2. Invalidation Indexers | ||
20354 | ////////// | ||
20355 | // 2.1 Invalidated by WF Queries | ||
20356 | ////////// | ||
20357 | |||
20358 | ////////// | ||
20359 | // 3. Unfinishedness Indexers | ||
20360 | ////////// | ||
20361 | // 3.1 Unfinishedness Measured by Multiplicity | ||
20362 | ////////// | ||
20363 | pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
20364 | find interpretation(problem,interpretation); | ||
20365 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
20366 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
20367 | find mustInstanceOfFunctionalElement_class(problem,interpretation,object); | ||
20368 | numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_); | ||
20369 | check(numberOfExistingReferences < 1); | ||
20370 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
20371 | } | ||
20372 | pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
20373 | find interpretation(problem,interpretation); | ||
20374 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
20375 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
20376 | find mustInstanceOfInformationLink_class(problem,interpretation,object); | ||
20377 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); | ||
20378 | check(numberOfExistingReferences < 1); | ||
20379 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
20380 | } | ||
20381 | pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
20382 | find interpretation(problem,interpretation); | ||
20383 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
20384 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
20385 | find mustInstanceOfFunction_class(problem,interpretation,object); | ||
20386 | numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_); | ||
20387 | check(numberOfExistingReferences < 1); | ||
20388 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
20389 | } | ||
20390 | |||
20391 | ////////// | ||
20392 | // 3.2 Unfinishedness Measured by WF Queries | ||
20393 | ////////// | ||
20394 | |||
20395 | ////////// | ||
20396 | // 4. Refinement Indexers | ||
20397 | ////////// | ||
20398 | // 4.1 Object constructors | ||
20399 | ////////// | ||
20400 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
20401 | { | ||
20402 | find interpretation(problem,interpretation); | ||
20403 | find mustInstanceOfFunctionalInput_class(problem,interpretation,root); | ||
20404 | find mustExist(problem, interpretation, root); | ||
20405 | }or{ | ||
20406 | find interpretation(problem,interpretation); | ||
20407 | find mustInstanceOfFAMTerminator_class(problem,interpretation,root); | ||
20408 | find mustExist(problem, interpretation, root); | ||
20409 | }or{ | ||
20410 | find interpretation(problem,interpretation); | ||
20411 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); | ||
20412 | find mustExist(problem, interpretation, root); | ||
20413 | }or{ | ||
20414 | find interpretation(problem,interpretation); | ||
20415 | find mustInstanceOfFunctionalElement_class(problem,interpretation,root); | ||
20416 | find mustExist(problem, interpretation, root); | ||
20417 | }or{ | ||
20418 | find interpretation(problem,interpretation); | ||
20419 | find mustInstanceOfFunction_class(problem,interpretation,root); | ||
20420 | find mustExist(problem, interpretation, root); | ||
20421 | }or{ | ||
20422 | find interpretation(problem,interpretation); | ||
20423 | find mustInstanceOfFunctionalData_class(problem,interpretation,root); | ||
20424 | find mustExist(problem, interpretation, root); | ||
20425 | }or{ | ||
20426 | find interpretation(problem,interpretation); | ||
20427 | find mustInstanceOfInformationLink_class(problem,interpretation,root); | ||
20428 | find mustExist(problem, interpretation, root); | ||
20429 | }or{ | ||
20430 | find interpretation(problem,interpretation); | ||
20431 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); | ||
20432 | find mustExist(problem, interpretation, root); | ||
20433 | }or{ | ||
20434 | find interpretation(problem,interpretation); | ||
20435 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); | ||
20436 | find mustExist(problem, interpretation, root); | ||
20437 | }or{ | ||
20438 | find interpretation(problem,interpretation); | ||
20439 | find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); | ||
20440 | find mustExist(problem, interpretation, root); | ||
20441 | }or{ | ||
20442 | find interpretation(problem,interpretation); | ||
20443 | find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); | ||
20444 | find mustExist(problem, interpretation, root); | ||
20445 | } | ||
20446 | pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( | ||
20447 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20448 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
20449 | container:DefinedElement) | ||
20450 | { | ||
20451 | find interpretation(problem,interpretation); | ||
20452 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20453 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
20454 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
20455 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); | ||
20456 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
20457 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); | ||
20458 | find mustInstanceOfFunctionalElement_class(problem,interpretation,container); | ||
20459 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
20460 | find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); | ||
20461 | find mustExist(problem, interpretation, container); | ||
20462 | neg find mustExist(problem, interpretation, newObject); | ||
20463 | } | ||
20464 | pattern createObject_FunctionalInterface_class( | ||
20465 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20466 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20467 | { | ||
20468 | find interpretation(problem,interpretation); | ||
20469 | neg find hasElementInContainment(problem,interpretation); | ||
20470 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20471 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
20472 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
20473 | find mayExist(problem, interpretation, newObject); | ||
20474 | neg find mustExist(problem, interpretation, newObject); | ||
20475 | } | ||
20476 | pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( | ||
20477 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20478 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
20479 | container:DefinedElement) | ||
20480 | { | ||
20481 | find interpretation(problem,interpretation); | ||
20482 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20483 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
20484 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
20485 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
20486 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); | ||
20487 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
20488 | find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); | ||
20489 | find mustExist(problem, interpretation, container); | ||
20490 | neg find mustExist(problem, interpretation, newObject); | ||
20491 | } | ||
20492 | pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( | ||
20493 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20494 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
20495 | container:DefinedElement) | ||
20496 | { | ||
20497 | find interpretation(problem,interpretation); | ||
20498 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20499 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
20500 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
20501 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); | ||
20502 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
20503 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); | ||
20504 | find mustInstanceOfFunction_class(problem,interpretation,container); | ||
20505 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
20506 | find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); | ||
20507 | find mustExist(problem, interpretation, container); | ||
20508 | neg find mustExist(problem, interpretation, newObject); | ||
20509 | } | ||
20510 | pattern createObject_Function_class( | ||
20511 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20512 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20513 | { | ||
20514 | find interpretation(problem,interpretation); | ||
20515 | neg find hasElementInContainment(problem,interpretation); | ||
20516 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20517 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
20518 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
20519 | find mayExist(problem, interpretation, newObject); | ||
20520 | neg find mustExist(problem, interpretation, newObject); | ||
20521 | } | ||
20522 | pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
20523 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20524 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
20525 | container:DefinedElement) | ||
20526 | { | ||
20527 | find interpretation(problem,interpretation); | ||
20528 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20529 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
20530 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
20531 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
20532 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
20533 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
20534 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
20535 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
20536 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
20537 | find mustExist(problem, interpretation, container); | ||
20538 | neg find mustExist(problem, interpretation, newObject); | ||
20539 | } | ||
20540 | pattern createObject_FunctionalOutput_class( | ||
20541 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20542 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20543 | { | ||
20544 | find interpretation(problem,interpretation); | ||
20545 | neg find hasElementInContainment(problem,interpretation); | ||
20546 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20547 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
20548 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
20549 | find mayExist(problem, interpretation, newObject); | ||
20550 | neg find mustExist(problem, interpretation, newObject); | ||
20551 | } | ||
20552 | pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
20553 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20554 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
20555 | container:DefinedElement) | ||
20556 | { | ||
20557 | find interpretation(problem,interpretation); | ||
20558 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20559 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
20560 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
20561 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
20562 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
20563 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
20564 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
20565 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
20566 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
20567 | find mustExist(problem, interpretation, container); | ||
20568 | neg find mustExist(problem, interpretation, newObject); | ||
20569 | } | ||
20570 | pattern createObject_FunctionalInput_class( | ||
20571 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20572 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20573 | { | ||
20574 | find interpretation(problem,interpretation); | ||
20575 | neg find hasElementInContainment(problem,interpretation); | ||
20576 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20577 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
20578 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
20579 | find mayExist(problem, interpretation, newObject); | ||
20580 | neg find mustExist(problem, interpretation, newObject); | ||
20581 | } | ||
20582 | pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( | ||
20583 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20584 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20585 | { | ||
20586 | find interpretation(problem,interpretation); | ||
20587 | neg find hasElementInContainment(problem,interpretation); | ||
20588 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20589 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); | ||
20590 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); | ||
20591 | find mayExist(problem, interpretation, newObject); | ||
20592 | neg find mustExist(problem, interpretation, newObject); | ||
20593 | } | ||
20594 | pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( | ||
20595 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20596 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
20597 | container:DefinedElement) | ||
20598 | { | ||
20599 | find interpretation(problem,interpretation); | ||
20600 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20601 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
20602 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
20603 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); | ||
20604 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
20605 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); | ||
20606 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); | ||
20607 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
20608 | find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); | ||
20609 | find mustExist(problem, interpretation, container); | ||
20610 | neg find mustExist(problem, interpretation, newObject); | ||
20611 | } | ||
20612 | pattern createObject_InformationLink_class( | ||
20613 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20614 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20615 | { | ||
20616 | find interpretation(problem,interpretation); | ||
20617 | neg find hasElementInContainment(problem,interpretation); | ||
20618 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20619 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
20620 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
20621 | find mayExist(problem, interpretation, newObject); | ||
20622 | neg find mustExist(problem, interpretation, newObject); | ||
20623 | } | ||
20624 | pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( | ||
20625 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20626 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
20627 | container:DefinedElement) | ||
20628 | { | ||
20629 | find interpretation(problem,interpretation); | ||
20630 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20631 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
20632 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
20633 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); | ||
20634 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
20635 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); | ||
20636 | find mustInstanceOfFunctionalData_class(problem,interpretation,container); | ||
20637 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
20638 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); | ||
20639 | find mustExist(problem, interpretation, container); | ||
20640 | neg find mustExist(problem, interpretation, newObject); | ||
20641 | } | ||
20642 | pattern createObject_FAMTerminator_class( | ||
20643 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20644 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20645 | { | ||
20646 | find interpretation(problem,interpretation); | ||
20647 | neg find hasElementInContainment(problem,interpretation); | ||
20648 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20649 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
20650 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
20651 | find mayExist(problem, interpretation, newObject); | ||
20652 | neg find mustExist(problem, interpretation, newObject); | ||
20653 | } | ||
20654 | |||
20655 | ////////// | ||
20656 | // 4.2 Type refinement | ||
20657 | ////////// | ||
20658 | pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20659 | find interpretation(problem,interpretation); | ||
20660 | PartialInterpretation.newElements(interpretation,element); | ||
20661 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
20662 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
20663 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
20664 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
20665 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
20666 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
20667 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
20668 | } | ||
20669 | pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20670 | find interpretation(problem,interpretation); | ||
20671 | PartialInterpretation.newElements(interpretation,element); | ||
20672 | find mayInstanceOfFunction_class(problem,interpretation,element); | ||
20673 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
20674 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
20675 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
20676 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
20677 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
20678 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
20679 | } | ||
20680 | pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20681 | find interpretation(problem,interpretation); | ||
20682 | PartialInterpretation.newElements(interpretation,element); | ||
20683 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
20684 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
20685 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
20686 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
20687 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
20688 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
20689 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
20690 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
20691 | } | ||
20692 | pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20693 | find interpretation(problem,interpretation); | ||
20694 | PartialInterpretation.newElements(interpretation,element); | ||
20695 | find mayInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
20696 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
20697 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
20698 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
20699 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
20700 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
20701 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
20702 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
20703 | } | ||
20704 | pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20705 | find interpretation(problem,interpretation); | ||
20706 | PartialInterpretation.newElements(interpretation,element); | ||
20707 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
20708 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
20709 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
20710 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
20711 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
20712 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
20713 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
20714 | } | ||
20715 | pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20716 | find interpretation(problem,interpretation); | ||
20717 | PartialInterpretation.newElements(interpretation,element); | ||
20718 | find mayInstanceOfInformationLink_class(problem,interpretation,element); | ||
20719 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
20720 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
20721 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
20722 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
20723 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
20724 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
20725 | } | ||
20726 | pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20727 | find interpretation(problem,interpretation); | ||
20728 | PartialInterpretation.newElements(interpretation,element); | ||
20729 | find mayInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
20730 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
20731 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
20732 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
20733 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
20734 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
20735 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
20736 | } | ||
20737 | |||
20738 | ////////// | ||
20739 | // 4.3 Relation refinement | ||
20740 | ////////// | ||
20741 | pattern refineRelation_model_reference_FunctionalElement( | ||
20742 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20743 | relationIterpretation:PartialRelationInterpretation, | ||
20744 | from: DefinedElement, to: DefinedElement) | ||
20745 | { | ||
20746 | find interpretation(problem,interpretation); | ||
20747 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
20748 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
20749 | find mustExist(problem, interpretation, from); | ||
20750 | find mustExist(problem, interpretation, to); | ||
20751 | find mustInstanceOfFunctionalElement_class(problem,interpretation,from); | ||
20752 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); | ||
20753 | find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
20754 | neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
20755 | } | ||
20756 | pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( | ||
20757 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20758 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
20759 | from: DefinedElement, to: DefinedElement) | ||
20760 | { | ||
20761 | find interpretation(problem,interpretation); | ||
20762 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
20763 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
20764 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
20765 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); | ||
20766 | find mustExist(problem, interpretation, from); | ||
20767 | find mustExist(problem, interpretation, to); | ||
20768 | find mustInstanceOfFunctionalInput_class(problem,interpretation,from); | ||
20769 | find mustInstanceOfInformationLink_class(problem,interpretation,to); | ||
20770 | find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
20771 | neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
20772 | } | ||
20773 | pattern refineRelation_type_attribute_Function( | ||
20774 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20775 | relationIterpretation:PartialRelationInterpretation, | ||
20776 | from: DefinedElement, to: DefinedElement) | ||
20777 | { | ||
20778 | find interpretation(problem,interpretation); | ||
20779 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
20780 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
20781 | find mustExist(problem, interpretation, from); | ||
20782 | find mustExist(problem, interpretation, to); | ||
20783 | find mustInstanceOfFunction_class(problem,interpretation,from); | ||
20784 | find mustInstanceOfFunctionType_enum(problem,interpretation,to); | ||
20785 | find mayInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
20786 | neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
20787 | } | ||
20788 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
20789 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
20790 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
20791 | |||
20792 | ////////// | ||
20793 | // 0. Util | ||
20794 | ////////// | ||
20795 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
20796 | PartialInterpretation.problem(interpretation,problem); | ||
20797 | } | ||
20798 | |||
20799 | ///////////////////////// | ||
20800 | // 0.1 Existence | ||
20801 | ///////////////////////// | ||
20802 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20803 | find interpretation(problem,interpretation); | ||
20804 | LogicProblem.elements(problem,element); | ||
20805 | } or { | ||
20806 | find interpretation(problem,interpretation); | ||
20807 | PartialInterpretation.newElements(interpretation,element); | ||
20808 | } | ||
20809 | |||
20810 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20811 | find mustExist(problem,interpretation,element); | ||
20812 | } or { | ||
20813 | find interpretation(problem,interpretation); | ||
20814 | neg find elementCloseWorld(element); | ||
20815 | PartialInterpretation.openWorldElements(interpretation,element); | ||
20816 | } | ||
20817 | |||
20818 | private pattern elementCloseWorld(element:DefinedElement) { | ||
20819 | PartialInterpretation.openWorldElements(i,element); | ||
20820 | PartialInterpretation.maxNewElements(i,0); | ||
20821 | } or { | ||
20822 | Scope.targetTypeInterpretation(scope,interpretation); | ||
20823 | PartialTypeInterpratation.elements(interpretation,element); | ||
20824 | Scope.maxNewElements(scope,0); | ||
20825 | } | ||
20826 | |||
20827 | //////////////////////// | ||
20828 | // 0.2 Equivalence | ||
20829 | //////////////////////// | ||
20830 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
20831 | find mayExist(problem,interpretation,a); | ||
20832 | find mayExist(problem,interpretation,b); | ||
20833 | a == b; | ||
20834 | } | ||
20835 | |||
20836 | //////////////////////// | ||
20837 | // 0.3 Required Patterns by TypeIndexer | ||
20838 | //////////////////////// | ||
20839 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
20840 | find interpretation(problem,interpretation); | ||
20841 | LogicProblem.types(problem,type); | ||
20842 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20843 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
20844 | } | ||
20845 | |||
20846 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
20847 | find interpretation(problem,interpretation); | ||
20848 | LogicProblem.types(problem,type); | ||
20849 | TypeDefinition.elements(type,element); | ||
20850 | } or { | ||
20851 | find interpretation(problem,interpretation); | ||
20852 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
20853 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
20854 | } | ||
20855 | |||
20856 | private pattern isPrimitive(element: PrimitiveElement) { | ||
20857 | PrimitiveElement(element); | ||
20858 | } | ||
20859 | |||
20860 | ////////// | ||
20861 | // 1. Problem-Specific Base Indexers | ||
20862 | ////////// | ||
20863 | // 1.1 Type Indexers | ||
20864 | ////////// | ||
20865 | // 1.1.1 primitive Type Indexers | ||
20866 | ////////// | ||
20867 | |||
20868 | ////////// | ||
20869 | // 1.1.2 domain-specific Type Indexers | ||
20870 | ////////// | ||
20871 | /** | ||
20872 | * An element must be an instance of type "FunctionalElement class". | ||
20873 | */ | ||
20874 | private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20875 | Type.name(type,"FunctionalElement class"); | ||
20876 | find directInstanceOf(problem,interpretation,element,type); | ||
20877 | } | ||
20878 | private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
20879 | find interpretation(problem,interpretation); | ||
20880 | PartialInterpretation.scopes(interpretation,scope); | ||
20881 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
20882 | Scope.maxNewElements(scope,0); | ||
20883 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
20884 | Type.name(type,"FunctionalElement class"); | ||
20885 | } | ||
20886 | |||
20887 | /** | ||
20888 | * An element may be an instance of type "FunctionalElement class". | ||
20889 | */ | ||
20890 | private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
20891 | { | ||
20892 | find interpretation(problem,interpretation); | ||
20893 | PartialInterpretation.newElements(interpretation,element); | ||
20894 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
20895 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
20896 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
20897 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
20898 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
20899 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
20900 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
20901 | neg find isPrimitive(element); | ||
20902 | } or { | ||
20903 | find interpretation(problem,interpretation); | ||
20904 | PartialInterpretation.openWorldElements(interpretation,element); | ||
20905 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
20906 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
20907 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
20908 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
20909 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
20910 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
20911 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
20912 | neg find isPrimitive(element); | ||
20913 | } or | ||
20914 | { find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } | ||
20915 | /** | ||
20916 | * An element must be an instance of type "FunctionalArchitectureModel class". | ||
20917 | */ | ||
20918 | private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20919 | Type.name(type,"FunctionalArchitectureModel class"); | ||
20920 | find directInstanceOf(problem,interpretation,element,type); | ||
20921 | } | ||
20922 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
20923 | find interpretation(problem,interpretation); | ||
20924 | PartialInterpretation.scopes(interpretation,scope); | ||
20925 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
20926 | Scope.maxNewElements(scope,0); | ||
20927 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
20928 | Type.name(type,"FunctionalArchitectureModel class"); | ||
20929 | } | ||
20930 | |||
20931 | /** | ||
20932 | * An element may be an instance of type "FunctionalArchitectureModel class". | ||
20933 | */ | ||
20934 | private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
20935 | { | ||
20936 | find interpretation(problem,interpretation); | ||
20937 | PartialInterpretation.newElements(interpretation,element); | ||
20938 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
20939 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
20940 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
20941 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
20942 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
20943 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
20944 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
20945 | neg find isPrimitive(element); | ||
20946 | } or { | ||
20947 | find interpretation(problem,interpretation); | ||
20948 | PartialInterpretation.openWorldElements(interpretation,element); | ||
20949 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
20950 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
20951 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
20952 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
20953 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
20954 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
20955 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
20956 | neg find isPrimitive(element); | ||
20957 | } or | ||
20958 | { find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } | ||
20959 | /** | ||
20960 | * An element must be an instance of type "Function class". | ||
20961 | */ | ||
20962 | private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20963 | Type.name(type,"Function class"); | ||
20964 | find directInstanceOf(problem,interpretation,element,type); | ||
20965 | } | ||
20966 | private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
20967 | find interpretation(problem,interpretation); | ||
20968 | PartialInterpretation.scopes(interpretation,scope); | ||
20969 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
20970 | Scope.maxNewElements(scope,0); | ||
20971 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
20972 | Type.name(type,"Function class"); | ||
20973 | } | ||
20974 | |||
20975 | /** | ||
20976 | * An element may be an instance of type "Function class". | ||
20977 | */ | ||
20978 | private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
20979 | { | ||
20980 | find interpretation(problem,interpretation); | ||
20981 | PartialInterpretation.newElements(interpretation,element); | ||
20982 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
20983 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
20984 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
20985 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
20986 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
20987 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
20988 | neg find isPrimitive(element); | ||
20989 | } or { | ||
20990 | find interpretation(problem,interpretation); | ||
20991 | PartialInterpretation.openWorldElements(interpretation,element); | ||
20992 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
20993 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
20994 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
20995 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
20996 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
20997 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
20998 | neg find isPrimitive(element); | ||
20999 | } or | ||
21000 | { find mustInstanceOfFunction_class(problem,interpretation,element); } | ||
21001 | /** | ||
21002 | * An element must be an instance of type "FAMTerminator class". | ||
21003 | */ | ||
21004 | private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
21005 | Type.name(type,"FAMTerminator class"); | ||
21006 | find directInstanceOf(problem,interpretation,element,type); | ||
21007 | } | ||
21008 | private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
21009 | find interpretation(problem,interpretation); | ||
21010 | PartialInterpretation.scopes(interpretation,scope); | ||
21011 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
21012 | Scope.maxNewElements(scope,0); | ||
21013 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
21014 | Type.name(type,"FAMTerminator class"); | ||
21015 | } | ||
21016 | |||
21017 | /** | ||
21018 | * An element may be an instance of type "FAMTerminator class". | ||
21019 | */ | ||
21020 | private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
21021 | { | ||
21022 | find interpretation(problem,interpretation); | ||
21023 | PartialInterpretation.newElements(interpretation,element); | ||
21024 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
21025 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
21026 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
21027 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
21028 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
21029 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
21030 | neg find isPrimitive(element); | ||
21031 | } or { | ||
21032 | find interpretation(problem,interpretation); | ||
21033 | PartialInterpretation.openWorldElements(interpretation,element); | ||
21034 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
21035 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
21036 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
21037 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
21038 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
21039 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
21040 | neg find isPrimitive(element); | ||
21041 | } or | ||
21042 | { find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } | ||
21043 | /** | ||
21044 | * An element must be an instance of type "InformationLink class". | ||
21045 | */ | ||
21046 | private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
21047 | Type.name(type,"InformationLink class"); | ||
21048 | find directInstanceOf(problem,interpretation,element,type); | ||
21049 | } | ||
21050 | private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
21051 | find interpretation(problem,interpretation); | ||
21052 | PartialInterpretation.scopes(interpretation,scope); | ||
21053 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
21054 | Scope.maxNewElements(scope,0); | ||
21055 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
21056 | Type.name(type,"InformationLink class"); | ||
21057 | } | ||
21058 | |||
21059 | /** | ||
21060 | * An element may be an instance of type "InformationLink class". | ||
21061 | */ | ||
21062 | private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
21063 | { | ||
21064 | find interpretation(problem,interpretation); | ||
21065 | PartialInterpretation.newElements(interpretation,element); | ||
21066 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
21067 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
21068 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
21069 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
21070 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
21071 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
21072 | neg find isPrimitive(element); | ||
21073 | } or { | ||
21074 | find interpretation(problem,interpretation); | ||
21075 | PartialInterpretation.openWorldElements(interpretation,element); | ||
21076 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
21077 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
21078 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
21079 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
21080 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
21081 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
21082 | neg find isPrimitive(element); | ||
21083 | } or | ||
21084 | { find mustInstanceOfInformationLink_class(problem,interpretation,element); } | ||
21085 | /** | ||
21086 | * An element must be an instance of type "FunctionalInterface class". | ||
21087 | */ | ||
21088 | private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
21089 | Type.name(type,"FunctionalInterface class"); | ||
21090 | find directInstanceOf(problem,interpretation,element,type); | ||
21091 | } | ||
21092 | private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
21093 | find interpretation(problem,interpretation); | ||
21094 | PartialInterpretation.scopes(interpretation,scope); | ||
21095 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
21096 | Scope.maxNewElements(scope,0); | ||
21097 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
21098 | Type.name(type,"FunctionalInterface class"); | ||
21099 | } | ||
21100 | |||
21101 | /** | ||
21102 | * An element may be an instance of type "FunctionalInterface class". | ||
21103 | */ | ||
21104 | private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
21105 | { | ||
21106 | find interpretation(problem,interpretation); | ||
21107 | PartialInterpretation.newElements(interpretation,element); | ||
21108 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
21109 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
21110 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
21111 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
21112 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
21113 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
21114 | neg find isPrimitive(element); | ||
21115 | } or { | ||
21116 | find interpretation(problem,interpretation); | ||
21117 | PartialInterpretation.openWorldElements(interpretation,element); | ||
21118 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
21119 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
21120 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
21121 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
21122 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
21123 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
21124 | neg find isPrimitive(element); | ||
21125 | } or | ||
21126 | { find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } | ||
21127 | /** | ||
21128 | * An element must be an instance of type "FunctionalInput class". | ||
21129 | */ | ||
21130 | private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
21131 | Type.name(type,"FunctionalInput class"); | ||
21132 | find directInstanceOf(problem,interpretation,element,type); | ||
21133 | } | ||
21134 | private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
21135 | find interpretation(problem,interpretation); | ||
21136 | PartialInterpretation.scopes(interpretation,scope); | ||
21137 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
21138 | Scope.maxNewElements(scope,0); | ||
21139 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
21140 | Type.name(type,"FunctionalInput class"); | ||
21141 | } | ||
21142 | |||
21143 | /** | ||
21144 | * An element may be an instance of type "FunctionalInput class". | ||
21145 | */ | ||
21146 | private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
21147 | { | ||
21148 | find interpretation(problem,interpretation); | ||
21149 | PartialInterpretation.newElements(interpretation,element); | ||
21150 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
21151 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
21152 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
21153 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
21154 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
21155 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
21156 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
21157 | neg find isPrimitive(element); | ||
21158 | } or { | ||
21159 | find interpretation(problem,interpretation); | ||
21160 | PartialInterpretation.openWorldElements(interpretation,element); | ||
21161 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
21162 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
21163 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
21164 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
21165 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
21166 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
21167 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
21168 | neg find isPrimitive(element); | ||
21169 | } or | ||
21170 | { find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } | ||
21171 | /** | ||
21172 | * An element must be an instance of type "FunctionalOutput class". | ||
21173 | */ | ||
21174 | private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
21175 | Type.name(type,"FunctionalOutput class"); | ||
21176 | find directInstanceOf(problem,interpretation,element,type); | ||
21177 | } | ||
21178 | private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
21179 | find interpretation(problem,interpretation); | ||
21180 | PartialInterpretation.scopes(interpretation,scope); | ||
21181 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
21182 | Scope.maxNewElements(scope,0); | ||
21183 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
21184 | Type.name(type,"FunctionalOutput class"); | ||
21185 | } | ||
21186 | |||
21187 | /** | ||
21188 | * An element may be an instance of type "FunctionalOutput class". | ||
21189 | */ | ||
21190 | private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
21191 | { | ||
21192 | find interpretation(problem,interpretation); | ||
21193 | PartialInterpretation.newElements(interpretation,element); | ||
21194 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
21195 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
21196 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
21197 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
21198 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
21199 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
21200 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
21201 | neg find isPrimitive(element); | ||
21202 | } or { | ||
21203 | find interpretation(problem,interpretation); | ||
21204 | PartialInterpretation.openWorldElements(interpretation,element); | ||
21205 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
21206 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
21207 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
21208 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
21209 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
21210 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
21211 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
21212 | neg find isPrimitive(element); | ||
21213 | } or | ||
21214 | { find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } | ||
21215 | /** | ||
21216 | * An element must be an instance of type "FunctionalData class". | ||
21217 | */ | ||
21218 | private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
21219 | Type.name(type,"FunctionalData class"); | ||
21220 | find directInstanceOf(problem,interpretation,element,type); | ||
21221 | } | ||
21222 | private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
21223 | find interpretation(problem,interpretation); | ||
21224 | PartialInterpretation.scopes(interpretation,scope); | ||
21225 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
21226 | Scope.maxNewElements(scope,0); | ||
21227 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
21228 | Type.name(type,"FunctionalData class"); | ||
21229 | } | ||
21230 | |||
21231 | /** | ||
21232 | * An element may be an instance of type "FunctionalData class". | ||
21233 | */ | ||
21234 | private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
21235 | { | ||
21236 | find interpretation(problem,interpretation); | ||
21237 | PartialInterpretation.newElements(interpretation,element); | ||
21238 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
21239 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
21240 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
21241 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
21242 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
21243 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
21244 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
21245 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
21246 | neg find isPrimitive(element); | ||
21247 | } or { | ||
21248 | find interpretation(problem,interpretation); | ||
21249 | PartialInterpretation.openWorldElements(interpretation,element); | ||
21250 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
21251 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
21252 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
21253 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
21254 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
21255 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
21256 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
21257 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
21258 | neg find isPrimitive(element); | ||
21259 | } or | ||
21260 | { find mustInstanceOfFunctionalData_class(problem,interpretation,element); } | ||
21261 | /** | ||
21262 | * An element must be an instance of type "FunctionType enum". | ||
21263 | */ | ||
21264 | private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
21265 | Type.name(type,"FunctionType enum"); | ||
21266 | find directInstanceOf(problem,interpretation,element,type); | ||
21267 | } | ||
21268 | private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
21269 | find interpretation(problem,interpretation); | ||
21270 | PartialInterpretation.scopes(interpretation,scope); | ||
21271 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
21272 | Scope.maxNewElements(scope,0); | ||
21273 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
21274 | Type.name(type,"FunctionType enum"); | ||
21275 | } | ||
21276 | |||
21277 | /** | ||
21278 | * An element may be an instance of type "FunctionType enum". | ||
21279 | */ | ||
21280 | private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
21281 | { find mustInstanceOfFunctionType_enum(problem,interpretation,element); } | ||
21282 | /** | ||
21283 | * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
21284 | */ | ||
21285 | private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
21286 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
21287 | find directInstanceOf(problem,interpretation,element,type); | ||
21288 | } | ||
21289 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
21290 | find interpretation(problem,interpretation); | ||
21291 | PartialInterpretation.scopes(interpretation,scope); | ||
21292 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
21293 | Scope.maxNewElements(scope,0); | ||
21294 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
21295 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
21296 | } | ||
21297 | |||
21298 | /** | ||
21299 | * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
21300 | */ | ||
21301 | private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
21302 | { find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } | ||
21303 | /** | ||
21304 | * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
21305 | */ | ||
21306 | private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
21307 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
21308 | find directInstanceOf(problem,interpretation,element,type); | ||
21309 | } | ||
21310 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
21311 | find interpretation(problem,interpretation); | ||
21312 | PartialInterpretation.scopes(interpretation,scope); | ||
21313 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
21314 | Scope.maxNewElements(scope,0); | ||
21315 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
21316 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
21317 | } | ||
21318 | |||
21319 | /** | ||
21320 | * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
21321 | */ | ||
21322 | private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
21323 | { | ||
21324 | find interpretation(problem,interpretation); | ||
21325 | PartialInterpretation.newElements(interpretation,element); | ||
21326 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
21327 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
21328 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
21329 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
21330 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
21331 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
21332 | neg find isPrimitive(element); | ||
21333 | } or { | ||
21334 | find interpretation(problem,interpretation); | ||
21335 | PartialInterpretation.openWorldElements(interpretation,element); | ||
21336 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
21337 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
21338 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
21339 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
21340 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
21341 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
21342 | neg find isPrimitive(element); | ||
21343 | } or | ||
21344 | { find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } | ||
21345 | |||
21346 | ////////// | ||
21347 | // 1.2 Relation Declaration Indexers | ||
21348 | ////////// | ||
21349 | /** | ||
21350 | * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) | ||
21351 | */ | ||
21352 | private pattern mustInRelationinterface_reference_FunctionalElement( | ||
21353 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21354 | source: DefinedElement, target:DefinedElement) | ||
21355 | { | ||
21356 | find interpretation(problem,interpretation); | ||
21357 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21358 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); | ||
21359 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21360 | BinaryElementRelationLink.param1(link,source); | ||
21361 | BinaryElementRelationLink.param2(link,target); | ||
21362 | } | ||
21363 | /** | ||
21364 | * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) | ||
21365 | */ | ||
21366 | private pattern mayInRelationinterface_reference_FunctionalElement( | ||
21367 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21368 | source: DefinedElement, target:DefinedElement) | ||
21369 | { | ||
21370 | find interpretation(problem,interpretation); | ||
21371 | // The two endpoint of the link have to exist | ||
21372 | find mayExist(problem, interpretation, source); | ||
21373 | find mayExist(problem, interpretation, target); | ||
21374 | // Type consistency | ||
21375 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
21376 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
21377 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
21378 | // the upper bound of the multiplicity should be considered. | ||
21379 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); | ||
21380 | check(numberOfExistingReferences < 1); | ||
21381 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
21382 | // the upper bound of the opposite reference multiplicity should be considered. | ||
21383 | numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); | ||
21384 | check(numberOfExistingOppositeReferences < 1); | ||
21385 | // The reference is containment, then a new reference cannot be create if: | ||
21386 | // 1. Multiple parents | ||
21387 | neg find mustContains4(problem,interpretation,_,target); | ||
21388 | // 2. Circle in the containment hierarchy | ||
21389 | neg find mustTransitiveContains(source,target); | ||
21390 | } or { | ||
21391 | find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); | ||
21392 | } | ||
21393 | /** | ||
21394 | * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) | ||
21395 | */ | ||
21396 | private pattern mustInRelationmodel_reference_FunctionalElement( | ||
21397 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21398 | source: DefinedElement, target:DefinedElement) | ||
21399 | { | ||
21400 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); | ||
21401 | } | ||
21402 | /** | ||
21403 | * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) | ||
21404 | */ | ||
21405 | private pattern mayInRelationmodel_reference_FunctionalElement( | ||
21406 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21407 | source: DefinedElement, target:DefinedElement) | ||
21408 | { | ||
21409 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); | ||
21410 | } | ||
21411 | /** | ||
21412 | * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) | ||
21413 | */ | ||
21414 | private pattern mustInRelationparent_reference_FunctionalElement( | ||
21415 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21416 | source: DefinedElement, target:DefinedElement) | ||
21417 | { | ||
21418 | find interpretation(problem,interpretation); | ||
21419 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21420 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); | ||
21421 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21422 | BinaryElementRelationLink.param1(link,source); | ||
21423 | BinaryElementRelationLink.param2(link,target); | ||
21424 | } | ||
21425 | /** | ||
21426 | * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) | ||
21427 | */ | ||
21428 | private pattern mayInRelationparent_reference_FunctionalElement( | ||
21429 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21430 | source: DefinedElement, target:DefinedElement) | ||
21431 | { | ||
21432 | find interpretation(problem,interpretation); | ||
21433 | // The two endpoint of the link have to exist | ||
21434 | find mayExist(problem, interpretation, source); | ||
21435 | find mayExist(problem, interpretation, target); | ||
21436 | // Type consistency | ||
21437 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
21438 | find mayInstanceOfFunction_class(problem,interpretation,target); | ||
21439 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
21440 | // the upper bound of the multiplicity should be considered. | ||
21441 | numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); | ||
21442 | check(numberOfExistingReferences < 1); | ||
21443 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
21444 | // 1. Multiple parents | ||
21445 | neg find mustContains4(problem,interpretation,source,_); | ||
21446 | // 2. Circle in the containment hierarchy | ||
21447 | neg find mustTransitiveContains(source,target); | ||
21448 | } or { | ||
21449 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); | ||
21450 | } | ||
21451 | /** | ||
21452 | * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) | ||
21453 | */ | ||
21454 | private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( | ||
21455 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21456 | source: DefinedElement, target:DefinedElement) | ||
21457 | { | ||
21458 | find interpretation(problem,interpretation); | ||
21459 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21460 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
21461 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21462 | BinaryElementRelationLink.param1(link,source); | ||
21463 | BinaryElementRelationLink.param2(link,target); | ||
21464 | } | ||
21465 | /** | ||
21466 | * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) | ||
21467 | */ | ||
21468 | private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( | ||
21469 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21470 | source: DefinedElement, target:DefinedElement) | ||
21471 | { | ||
21472 | find interpretation(problem,interpretation); | ||
21473 | // The two endpoint of the link have to exist | ||
21474 | find mayExist(problem, interpretation, source); | ||
21475 | find mayExist(problem, interpretation, target); | ||
21476 | // Type consistency | ||
21477 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); | ||
21478 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
21479 | // The reference is containment, then a new reference cannot be create if: | ||
21480 | // 1. Multiple parents | ||
21481 | neg find mustContains4(problem,interpretation,_,target); | ||
21482 | // 2. Circle in the containment hierarchy | ||
21483 | neg find mustTransitiveContains(source,target); | ||
21484 | } or { | ||
21485 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); | ||
21486 | } | ||
21487 | /** | ||
21488 | * Matcher for detecting tuples t where []subElements reference Function(source,target) | ||
21489 | */ | ||
21490 | private pattern mustInRelationsubElements_reference_Function( | ||
21491 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21492 | source: DefinedElement, target:DefinedElement) | ||
21493 | { | ||
21494 | find interpretation(problem,interpretation); | ||
21495 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21496 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); | ||
21497 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21498 | BinaryElementRelationLink.param1(link,source); | ||
21499 | BinaryElementRelationLink.param2(link,target); | ||
21500 | } | ||
21501 | /** | ||
21502 | * Matcher for detecting tuples t where <>subElements reference Function(source,target) | ||
21503 | */ | ||
21504 | private pattern mayInRelationsubElements_reference_Function( | ||
21505 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21506 | source: DefinedElement, target:DefinedElement) | ||
21507 | { | ||
21508 | find interpretation(problem,interpretation); | ||
21509 | // The two endpoint of the link have to exist | ||
21510 | find mayExist(problem, interpretation, source); | ||
21511 | find mayExist(problem, interpretation, target); | ||
21512 | // Type consistency | ||
21513 | find mayInstanceOfFunction_class(problem,interpretation,source); | ||
21514 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
21515 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
21516 | // the upper bound of the opposite reference multiplicity should be considered. | ||
21517 | numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); | ||
21518 | check(numberOfExistingOppositeReferences < 1); | ||
21519 | // The reference is containment, then a new reference cannot be create if: | ||
21520 | // 1. Multiple parents | ||
21521 | neg find mustContains4(problem,interpretation,_,target); | ||
21522 | // 2. Circle in the containment hierarchy | ||
21523 | neg find mustTransitiveContains(source,target); | ||
21524 | } or { | ||
21525 | find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); | ||
21526 | } | ||
21527 | /** | ||
21528 | * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) | ||
21529 | */ | ||
21530 | private pattern mustInRelationdata_reference_FAMTerminator( | ||
21531 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21532 | source: DefinedElement, target:DefinedElement) | ||
21533 | { | ||
21534 | find interpretation(problem,interpretation); | ||
21535 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21536 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); | ||
21537 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21538 | BinaryElementRelationLink.param1(link,source); | ||
21539 | BinaryElementRelationLink.param2(link,target); | ||
21540 | } | ||
21541 | /** | ||
21542 | * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) | ||
21543 | */ | ||
21544 | private pattern mayInRelationdata_reference_FAMTerminator( | ||
21545 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21546 | source: DefinedElement, target:DefinedElement) | ||
21547 | { | ||
21548 | find interpretation(problem,interpretation); | ||
21549 | // The two endpoint of the link have to exist | ||
21550 | find mayExist(problem, interpretation, source); | ||
21551 | find mayExist(problem, interpretation, target); | ||
21552 | // Type consistency | ||
21553 | find mayInstanceOfFAMTerminator_class(problem,interpretation,source); | ||
21554 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
21555 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
21556 | // the upper bound of the multiplicity should be considered. | ||
21557 | numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); | ||
21558 | check(numberOfExistingReferences < 1); | ||
21559 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
21560 | // the upper bound of the opposite reference multiplicity should be considered. | ||
21561 | numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); | ||
21562 | check(numberOfExistingOppositeReferences < 1); | ||
21563 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
21564 | // 1. Multiple parents | ||
21565 | neg find mustContains4(problem,interpretation,source,_); | ||
21566 | // 2. Circle in the containment hierarchy | ||
21567 | neg find mustTransitiveContains(source,target); | ||
21568 | } or { | ||
21569 | find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); | ||
21570 | } | ||
21571 | /** | ||
21572 | * Matcher for detecting tuples t where []from reference InformationLink(source,target) | ||
21573 | */ | ||
21574 | private pattern mustInRelationfrom_reference_InformationLink( | ||
21575 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21576 | source: DefinedElement, target:DefinedElement) | ||
21577 | { | ||
21578 | find interpretation(problem,interpretation); | ||
21579 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21580 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); | ||
21581 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21582 | BinaryElementRelationLink.param1(link,source); | ||
21583 | BinaryElementRelationLink.param2(link,target); | ||
21584 | } | ||
21585 | /** | ||
21586 | * Matcher for detecting tuples t where <>from reference InformationLink(source,target) | ||
21587 | */ | ||
21588 | private pattern mayInRelationfrom_reference_InformationLink( | ||
21589 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21590 | source: DefinedElement, target:DefinedElement) | ||
21591 | { | ||
21592 | find interpretation(problem,interpretation); | ||
21593 | // The two endpoint of the link have to exist | ||
21594 | find mayExist(problem, interpretation, source); | ||
21595 | find mayExist(problem, interpretation, target); | ||
21596 | // Type consistency | ||
21597 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
21598 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); | ||
21599 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
21600 | // the upper bound of the multiplicity should be considered. | ||
21601 | numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); | ||
21602 | check(numberOfExistingReferences < 1); | ||
21603 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
21604 | // 1. Multiple parents | ||
21605 | neg find mustContains4(problem,interpretation,source,_); | ||
21606 | // 2. Circle in the containment hierarchy | ||
21607 | neg find mustTransitiveContains(source,target); | ||
21608 | } or { | ||
21609 | find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); | ||
21610 | } | ||
21611 | /** | ||
21612 | * Matcher for detecting tuples t where []to reference InformationLink(source,target) | ||
21613 | */ | ||
21614 | private pattern mustInRelationto_reference_InformationLink( | ||
21615 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21616 | source: DefinedElement, target:DefinedElement) | ||
21617 | { | ||
21618 | find interpretation(problem,interpretation); | ||
21619 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21620 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
21621 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21622 | BinaryElementRelationLink.param1(link,source); | ||
21623 | BinaryElementRelationLink.param2(link,target); | ||
21624 | } | ||
21625 | /** | ||
21626 | * Matcher for detecting tuples t where <>to reference InformationLink(source,target) | ||
21627 | */ | ||
21628 | private pattern mayInRelationto_reference_InformationLink( | ||
21629 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21630 | source: DefinedElement, target:DefinedElement) | ||
21631 | { | ||
21632 | find interpretation(problem,interpretation); | ||
21633 | // The two endpoint of the link have to exist | ||
21634 | find mayExist(problem, interpretation, source); | ||
21635 | find mayExist(problem, interpretation, target); | ||
21636 | // Type consistency | ||
21637 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
21638 | find mayInstanceOfFunctionalInput_class(problem,interpretation,target); | ||
21639 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
21640 | // the upper bound of the multiplicity should be considered. | ||
21641 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); | ||
21642 | check(numberOfExistingReferences < 1); | ||
21643 | } or { | ||
21644 | find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); | ||
21645 | } | ||
21646 | /** | ||
21647 | * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) | ||
21648 | */ | ||
21649 | private pattern mustInRelationdata_reference_FunctionalInterface( | ||
21650 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21651 | source: DefinedElement, target:DefinedElement) | ||
21652 | { | ||
21653 | find interpretation(problem,interpretation); | ||
21654 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21655 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); | ||
21656 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21657 | BinaryElementRelationLink.param1(link,source); | ||
21658 | BinaryElementRelationLink.param2(link,target); | ||
21659 | } | ||
21660 | /** | ||
21661 | * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) | ||
21662 | */ | ||
21663 | private pattern mayInRelationdata_reference_FunctionalInterface( | ||
21664 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21665 | source: DefinedElement, target:DefinedElement) | ||
21666 | { | ||
21667 | find interpretation(problem,interpretation); | ||
21668 | // The two endpoint of the link have to exist | ||
21669 | find mayExist(problem, interpretation, source); | ||
21670 | find mayExist(problem, interpretation, target); | ||
21671 | // Type consistency | ||
21672 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
21673 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
21674 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
21675 | // the upper bound of the opposite reference multiplicity should be considered. | ||
21676 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); | ||
21677 | check(numberOfExistingOppositeReferences < 1); | ||
21678 | // The reference is containment, then a new reference cannot be create if: | ||
21679 | // 1. Multiple parents | ||
21680 | neg find mustContains4(problem,interpretation,_,target); | ||
21681 | // 2. Circle in the containment hierarchy | ||
21682 | neg find mustTransitiveContains(source,target); | ||
21683 | } or { | ||
21684 | find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); | ||
21685 | } | ||
21686 | /** | ||
21687 | * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) | ||
21688 | */ | ||
21689 | private pattern mustInRelationelement_reference_FunctionalInterface( | ||
21690 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21691 | source: DefinedElement, target:DefinedElement) | ||
21692 | { | ||
21693 | find interpretation(problem,interpretation); | ||
21694 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21695 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); | ||
21696 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21697 | BinaryElementRelationLink.param1(link,source); | ||
21698 | BinaryElementRelationLink.param2(link,target); | ||
21699 | } | ||
21700 | /** | ||
21701 | * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) | ||
21702 | */ | ||
21703 | private pattern mayInRelationelement_reference_FunctionalInterface( | ||
21704 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21705 | source: DefinedElement, target:DefinedElement) | ||
21706 | { | ||
21707 | find interpretation(problem,interpretation); | ||
21708 | // The two endpoint of the link have to exist | ||
21709 | find mayExist(problem, interpretation, source); | ||
21710 | find mayExist(problem, interpretation, target); | ||
21711 | // Type consistency | ||
21712 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
21713 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
21714 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
21715 | // the upper bound of the multiplicity should be considered. | ||
21716 | numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); | ||
21717 | check(numberOfExistingReferences < 1); | ||
21718 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
21719 | // the upper bound of the opposite reference multiplicity should be considered. | ||
21720 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); | ||
21721 | check(numberOfExistingOppositeReferences < 1); | ||
21722 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
21723 | // 1. Multiple parents | ||
21724 | neg find mustContains4(problem,interpretation,source,_); | ||
21725 | // 2. Circle in the containment hierarchy | ||
21726 | neg find mustTransitiveContains(source,target); | ||
21727 | } or { | ||
21728 | find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); | ||
21729 | } | ||
21730 | /** | ||
21731 | * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) | ||
21732 | */ | ||
21733 | private pattern mustInRelationIncomingLinks_reference_FunctionalInput( | ||
21734 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21735 | source: DefinedElement, target:DefinedElement) | ||
21736 | { | ||
21737 | find interpretation(problem,interpretation); | ||
21738 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21739 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
21740 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21741 | BinaryElementRelationLink.param1(link,source); | ||
21742 | BinaryElementRelationLink.param2(link,target); | ||
21743 | } | ||
21744 | /** | ||
21745 | * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) | ||
21746 | */ | ||
21747 | private pattern mayInRelationIncomingLinks_reference_FunctionalInput( | ||
21748 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21749 | source: DefinedElement, target:DefinedElement) | ||
21750 | { | ||
21751 | find interpretation(problem,interpretation); | ||
21752 | // The two endpoint of the link have to exist | ||
21753 | find mayExist(problem, interpretation, source); | ||
21754 | find mayExist(problem, interpretation, target); | ||
21755 | // Type consistency | ||
21756 | find mayInstanceOfFunctionalInput_class(problem,interpretation,source); | ||
21757 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
21758 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
21759 | // the upper bound of the opposite reference multiplicity should be considered. | ||
21760 | numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); | ||
21761 | check(numberOfExistingOppositeReferences < 1); | ||
21762 | } or { | ||
21763 | find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); | ||
21764 | } | ||
21765 | /** | ||
21766 | * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) | ||
21767 | */ | ||
21768 | private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( | ||
21769 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21770 | source: DefinedElement, target:DefinedElement) | ||
21771 | { | ||
21772 | find interpretation(problem,interpretation); | ||
21773 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21774 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); | ||
21775 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21776 | BinaryElementRelationLink.param1(link,source); | ||
21777 | BinaryElementRelationLink.param2(link,target); | ||
21778 | } | ||
21779 | /** | ||
21780 | * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) | ||
21781 | */ | ||
21782 | private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( | ||
21783 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21784 | source: DefinedElement, target:DefinedElement) | ||
21785 | { | ||
21786 | find interpretation(problem,interpretation); | ||
21787 | // The two endpoint of the link have to exist | ||
21788 | find mayExist(problem, interpretation, source); | ||
21789 | find mayExist(problem, interpretation, target); | ||
21790 | // Type consistency | ||
21791 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); | ||
21792 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
21793 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
21794 | // the upper bound of the opposite reference multiplicity should be considered. | ||
21795 | numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); | ||
21796 | check(numberOfExistingOppositeReferences < 1); | ||
21797 | // The reference is containment, then a new reference cannot be create if: | ||
21798 | // 1. Multiple parents | ||
21799 | neg find mustContains4(problem,interpretation,_,target); | ||
21800 | // 2. Circle in the containment hierarchy | ||
21801 | neg find mustTransitiveContains(source,target); | ||
21802 | } or { | ||
21803 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); | ||
21804 | } | ||
21805 | /** | ||
21806 | * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) | ||
21807 | */ | ||
21808 | private pattern mustInRelationterminator_reference_FunctionalData( | ||
21809 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21810 | source: DefinedElement, target:DefinedElement) | ||
21811 | { | ||
21812 | find interpretation(problem,interpretation); | ||
21813 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21814 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); | ||
21815 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21816 | BinaryElementRelationLink.param1(link,source); | ||
21817 | BinaryElementRelationLink.param2(link,target); | ||
21818 | } | ||
21819 | /** | ||
21820 | * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) | ||
21821 | */ | ||
21822 | private pattern mayInRelationterminator_reference_FunctionalData( | ||
21823 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21824 | source: DefinedElement, target:DefinedElement) | ||
21825 | { | ||
21826 | find interpretation(problem,interpretation); | ||
21827 | // The two endpoint of the link have to exist | ||
21828 | find mayExist(problem, interpretation, source); | ||
21829 | find mayExist(problem, interpretation, target); | ||
21830 | // Type consistency | ||
21831 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
21832 | find mayInstanceOfFAMTerminator_class(problem,interpretation,target); | ||
21833 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
21834 | // the upper bound of the multiplicity should be considered. | ||
21835 | numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); | ||
21836 | check(numberOfExistingReferences < 1); | ||
21837 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
21838 | // the upper bound of the opposite reference multiplicity should be considered. | ||
21839 | numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); | ||
21840 | check(numberOfExistingOppositeReferences < 1); | ||
21841 | // The reference is containment, then a new reference cannot be create if: | ||
21842 | // 1. Multiple parents | ||
21843 | neg find mustContains4(problem,interpretation,_,target); | ||
21844 | // 2. Circle in the containment hierarchy | ||
21845 | neg find mustTransitiveContains(source,target); | ||
21846 | } or { | ||
21847 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); | ||
21848 | } | ||
21849 | /** | ||
21850 | * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) | ||
21851 | */ | ||
21852 | private pattern mustInRelationinterface_reference_FunctionalData( | ||
21853 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21854 | source: DefinedElement, target:DefinedElement) | ||
21855 | { | ||
21856 | find interpretation(problem,interpretation); | ||
21857 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21858 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); | ||
21859 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21860 | BinaryElementRelationLink.param1(link,source); | ||
21861 | BinaryElementRelationLink.param2(link,target); | ||
21862 | } | ||
21863 | /** | ||
21864 | * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) | ||
21865 | */ | ||
21866 | private pattern mayInRelationinterface_reference_FunctionalData( | ||
21867 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21868 | source: DefinedElement, target:DefinedElement) | ||
21869 | { | ||
21870 | find interpretation(problem,interpretation); | ||
21871 | // The two endpoint of the link have to exist | ||
21872 | find mayExist(problem, interpretation, source); | ||
21873 | find mayExist(problem, interpretation, target); | ||
21874 | // Type consistency | ||
21875 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
21876 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
21877 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
21878 | // the upper bound of the multiplicity should be considered. | ||
21879 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); | ||
21880 | check(numberOfExistingReferences < 1); | ||
21881 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
21882 | // 1. Multiple parents | ||
21883 | neg find mustContains4(problem,interpretation,source,_); | ||
21884 | // 2. Circle in the containment hierarchy | ||
21885 | neg find mustTransitiveContains(source,target); | ||
21886 | } or { | ||
21887 | find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); | ||
21888 | } | ||
21889 | /** | ||
21890 | * Matcher for detecting tuples t where []type attribute Function(source,target) | ||
21891 | */ | ||
21892 | private pattern mustInRelationtype_attribute_Function( | ||
21893 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21894 | source: DefinedElement, target:DefinedElement) | ||
21895 | { | ||
21896 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); | ||
21897 | } | ||
21898 | /** | ||
21899 | * Matcher for detecting tuples t where []type attribute Function(source,target) | ||
21900 | */ | ||
21901 | private pattern mayInRelationtype_attribute_Function( | ||
21902 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21903 | source: DefinedElement, target:DefinedElement) | ||
21904 | { | ||
21905 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); | ||
21906 | } | ||
21907 | |||
21908 | ////////// | ||
21909 | // 1.3 Relation Definition Indexers | ||
21910 | ////////// | ||
21911 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam terminatorAndInformation | ||
21912 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( | ||
21913 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21914 | var_T, var_I) | ||
21915 | { | ||
21916 | find interpretation(problem,interpretation); | ||
21917 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
21918 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
21919 | // T is exported | ||
21920 | // I is exported | ||
21921 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
21922 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); | ||
21923 | find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); | ||
21924 | var_virtual0 == var_I; | ||
21925 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
21926 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); | ||
21927 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
21928 | var_virtual1 == var_T; | ||
21929 | }or{ | ||
21930 | find interpretation(problem,interpretation); | ||
21931 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
21932 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
21933 | // T is exported | ||
21934 | // I is exported | ||
21935 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
21936 | find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); | ||
21937 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); | ||
21938 | var_virtual0 == var_In; | ||
21939 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); | ||
21940 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); | ||
21941 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
21942 | var_virtual1 == var_T; | ||
21943 | } | ||
21944 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( | ||
21945 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21946 | var_T, var_I) | ||
21947 | { | ||
21948 | find interpretation(problem,interpretation); | ||
21949 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
21950 | find mayInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
21951 | // T is exported | ||
21952 | // I is exported | ||
21953 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
21954 | find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); | ||
21955 | find mayInstanceOfInformationLink_class(problem,interpretation,var_virtual0); | ||
21956 | find mayEquivalent(problem, interpretation, var_virtual0, var_I); | ||
21957 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
21958 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); | ||
21959 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
21960 | find mayEquivalent(problem, interpretation, var_virtual1, var_T); | ||
21961 | }or{ | ||
21962 | find interpretation(problem,interpretation); | ||
21963 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
21964 | find mayInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
21965 | // T is exported | ||
21966 | // I is exported | ||
21967 | find mayInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
21968 | find mayInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); | ||
21969 | find mayInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); | ||
21970 | find mayEquivalent(problem, interpretation, var_virtual0, var_In); | ||
21971 | find mayInstanceOfFunctionalInput_class(problem,interpretation,var_In); | ||
21972 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); | ||
21973 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
21974 | find mayEquivalent(problem, interpretation, var_virtual1, var_T); | ||
21975 | } | ||
21976 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( | ||
21977 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21978 | var_T, var_I) | ||
21979 | { | ||
21980 | find interpretation(problem,interpretation); | ||
21981 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
21982 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
21983 | // T is exported | ||
21984 | // I is exported | ||
21985 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
21986 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); | ||
21987 | find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); | ||
21988 | var_virtual0 == var_I; | ||
21989 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
21990 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); | ||
21991 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
21992 | var_virtual1 == var_T; | ||
21993 | }or{ | ||
21994 | find interpretation(problem,interpretation); | ||
21995 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
21996 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
21997 | // T is exported | ||
21998 | // I is exported | ||
21999 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
22000 | find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); | ||
22001 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); | ||
22002 | var_virtual0 == var_In; | ||
22003 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); | ||
22004 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); | ||
22005 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
22006 | var_virtual1 == var_T; | ||
22007 | } | ||
22008 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam type | ||
22009 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( | ||
22010 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22011 | var_This, var_Target) | ||
22012 | { | ||
22013 | find interpretation(problem,interpretation); | ||
22014 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
22015 | // type constraint is enforced by construction | ||
22016 | // This is exported | ||
22017 | // Target is exported | ||
22018 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
22019 | var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); | ||
22020 | var_Target == var_virtual0; | ||
22021 | }or{ | ||
22022 | find interpretation(problem,interpretation); | ||
22023 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
22024 | // type constraint is enforced by construction | ||
22025 | // This is exported | ||
22026 | // Target is exported | ||
22027 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
22028 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
22029 | var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); | ||
22030 | var_Target == var_virtual0; | ||
22031 | }or{ | ||
22032 | find interpretation(problem,interpretation); | ||
22033 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
22034 | // type constraint is enforced by construction | ||
22035 | // This is exported | ||
22036 | // Target is exported | ||
22037 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); | ||
22038 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
22039 | var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); | ||
22040 | var_Target == var_virtual0; | ||
22041 | } | ||
22042 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( | ||
22043 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22044 | var_This, var_Target) | ||
22045 | { | ||
22046 | find interpretation(problem,interpretation); | ||
22047 | find mayInstanceOfFunction_class(problem,interpretation,var_This); | ||
22048 | // type constraint is enforced by construction | ||
22049 | // This is exported | ||
22050 | // Target is exported | ||
22051 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
22052 | var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); | ||
22053 | find mayEquivalent(problem, interpretation, var_Target, var_virtual0); | ||
22054 | }or{ | ||
22055 | find interpretation(problem,interpretation); | ||
22056 | find mayInstanceOfFunction_class(problem,interpretation,var_This); | ||
22057 | // type constraint is enforced by construction | ||
22058 | // This is exported | ||
22059 | // Target is exported | ||
22060 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
22061 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
22062 | var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); | ||
22063 | find mayEquivalent(problem, interpretation, var_Target, var_virtual0); | ||
22064 | }or{ | ||
22065 | find interpretation(problem,interpretation); | ||
22066 | find mayInstanceOfFunction_class(problem,interpretation,var_This); | ||
22067 | // type constraint is enforced by construction | ||
22068 | // This is exported | ||
22069 | // Target is exported | ||
22070 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); | ||
22071 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
22072 | var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); | ||
22073 | find mayEquivalent(problem, interpretation, var_Target, var_virtual0); | ||
22074 | } | ||
22075 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( | ||
22076 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22077 | var_This, var_Target) | ||
22078 | { | ||
22079 | find interpretation(problem,interpretation); | ||
22080 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
22081 | // type constraint is enforced by construction | ||
22082 | // This is exported | ||
22083 | // Target is exported | ||
22084 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
22085 | var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); | ||
22086 | var_Target == var_virtual0; | ||
22087 | }or{ | ||
22088 | find interpretation(problem,interpretation); | ||
22089 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
22090 | // type constraint is enforced by construction | ||
22091 | // This is exported | ||
22092 | // Target is exported | ||
22093 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
22094 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); | ||
22095 | var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); | ||
22096 | var_Target == var_virtual0; | ||
22097 | }or{ | ||
22098 | find interpretation(problem,interpretation); | ||
22099 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
22100 | // type constraint is enforced by construction | ||
22101 | // This is exported | ||
22102 | // Target is exported | ||
22103 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); | ||
22104 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); | ||
22105 | var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); | ||
22106 | var_Target == var_virtual0; | ||
22107 | } | ||
22108 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam rootElements | ||
22109 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( | ||
22110 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22111 | var_Model, var_Root) | ||
22112 | { | ||
22113 | find interpretation(problem,interpretation); | ||
22114 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
22115 | find mustInstanceOfFunction_class(problem,interpretation,var_Root); | ||
22116 | // Model is exported | ||
22117 | // Root is exported | ||
22118 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
22119 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); | ||
22120 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); | ||
22121 | var_virtual0 == var_Root; | ||
22122 | } | ||
22123 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( | ||
22124 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22125 | var_Model, var_Root) | ||
22126 | { | ||
22127 | find interpretation(problem,interpretation); | ||
22128 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
22129 | find mayInstanceOfFunction_class(problem,interpretation,var_Root); | ||
22130 | // Model is exported | ||
22131 | // Root is exported | ||
22132 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
22133 | find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); | ||
22134 | find mayInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); | ||
22135 | find mayEquivalent(problem, interpretation, var_virtual0, var_Root); | ||
22136 | } | ||
22137 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( | ||
22138 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22139 | var_Model, var_Root) | ||
22140 | { | ||
22141 | find interpretation(problem,interpretation); | ||
22142 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
22143 | find mustInstanceOfFunction_class(problem,interpretation,var_Root); | ||
22144 | // Model is exported | ||
22145 | // Root is exported | ||
22146 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
22147 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); | ||
22148 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); | ||
22149 | var_virtual0 == var_Root; | ||
22150 | } | ||
22151 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam parent | ||
22152 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( | ||
22153 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22154 | var_Func, var_Par) | ||
22155 | { | ||
22156 | find interpretation(problem,interpretation); | ||
22157 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
22158 | find mustInstanceOfFunction_class(problem,interpretation,var_Par); | ||
22159 | // Func is exported | ||
22160 | // Par is exported | ||
22161 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
22162 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); | ||
22163 | find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); | ||
22164 | var_virtual0 == var_Par; | ||
22165 | } | ||
22166 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( | ||
22167 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22168 | var_Func, var_Par) | ||
22169 | { | ||
22170 | find interpretation(problem,interpretation); | ||
22171 | find mayInstanceOfFunction_class(problem,interpretation,var_Func); | ||
22172 | find mayInstanceOfFunction_class(problem,interpretation,var_Par); | ||
22173 | // Func is exported | ||
22174 | // Par is exported | ||
22175 | find mayInstanceOfFunction_class(problem,interpretation,var_Func); | ||
22176 | find mayInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); | ||
22177 | find mayInstanceOfFunction_class(problem,interpretation,var_virtual0); | ||
22178 | find mayEquivalent(problem, interpretation, var_virtual0, var_Par); | ||
22179 | } | ||
22180 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( | ||
22181 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22182 | var_Func, var_Par) | ||
22183 | { | ||
22184 | find interpretation(problem,interpretation); | ||
22185 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
22186 | find mustInstanceOfFunction_class(problem,interpretation,var_Par); | ||
22187 | // Func is exported | ||
22188 | // Par is exported | ||
22189 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
22190 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); | ||
22191 | find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); | ||
22192 | var_virtual0 == var_Par; | ||
22193 | } | ||
22194 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam model | ||
22195 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( | ||
22196 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22197 | var_This, var_Target) | ||
22198 | { | ||
22199 | find interpretation(problem,interpretation); | ||
22200 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
22201 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
22202 | // This is exported | ||
22203 | // Target is exported | ||
22204 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
22205 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
22206 | } | ||
22207 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( | ||
22208 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22209 | var_This, var_Target) | ||
22210 | { | ||
22211 | find interpretation(problem,interpretation); | ||
22212 | find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
22213 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
22214 | // This is exported | ||
22215 | // Target is exported | ||
22216 | find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
22217 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
22218 | } | ||
22219 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( | ||
22220 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22221 | var_This, var_Target) | ||
22222 | { | ||
22223 | find interpretation(problem,interpretation); | ||
22224 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
22225 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
22226 | // This is exported | ||
22227 | // Target is exported | ||
22228 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
22229 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
22230 | } | ||
22231 | |||
22232 | ////////// | ||
22233 | // 1.4 Containment Indexer | ||
22234 | ////////// | ||
22235 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
22236 | find mustContains4(_,_,source,target); | ||
22237 | } | ||
22238 | |||
22239 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22240 | source: DefinedElement, target: DefinedElement) | ||
22241 | { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or | ||
22242 | |||
22243 | { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or | ||
22244 | |||
22245 | { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or | ||
22246 | |||
22247 | { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or | ||
22248 | |||
22249 | { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or | ||
22250 | |||
22251 | { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } | ||
22252 | |||
22253 | private pattern mustTransitiveContains(source,target) { | ||
22254 | find mustContains2+(source,target); | ||
22255 | } | ||
22256 | |||
22257 | ////////// | ||
22258 | // 2. Invalidation Indexers | ||
22259 | ////////// | ||
22260 | // 2.1 Invalidated by WF Queries | ||
22261 | ////////// | ||
22262 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22263 | var_T, var_I) | ||
22264 | { | ||
22265 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem,interpretation,var_T,var_I); | ||
22266 | } | ||
22267 | |||
22268 | ////////// | ||
22269 | // 3. Unfinishedness Indexers | ||
22270 | ////////// | ||
22271 | // 3.1 Unfinishedness Measured by Multiplicity | ||
22272 | ////////// | ||
22273 | pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
22274 | find interpretation(problem,interpretation); | ||
22275 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
22276 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
22277 | find mustInstanceOfInformationLink_class(problem,interpretation,object); | ||
22278 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); | ||
22279 | check(numberOfExistingReferences < 1); | ||
22280 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
22281 | } | ||
22282 | |||
22283 | ////////// | ||
22284 | // 3.2 Unfinishedness Measured by WF Queries | ||
22285 | ////////// | ||
22286 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22287 | var_T, var_I) | ||
22288 | { | ||
22289 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem,interpretation,var_T,var_I); | ||
22290 | } | ||
22291 | |||
22292 | ////////// | ||
22293 | // 4. Refinement Indexers | ||
22294 | ////////// | ||
22295 | // 4.1 Object constructors | ||
22296 | ////////// | ||
22297 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
22298 | { | ||
22299 | find interpretation(problem,interpretation); | ||
22300 | find mustInstanceOfFunction_class(problem,interpretation,root); | ||
22301 | find mustExist(problem, interpretation, root); | ||
22302 | }or{ | ||
22303 | find interpretation(problem,interpretation); | ||
22304 | find mustInstanceOfFAMTerminator_class(problem,interpretation,root); | ||
22305 | find mustExist(problem, interpretation, root); | ||
22306 | }or{ | ||
22307 | find interpretation(problem,interpretation); | ||
22308 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); | ||
22309 | find mustExist(problem, interpretation, root); | ||
22310 | }or{ | ||
22311 | find interpretation(problem,interpretation); | ||
22312 | find mustInstanceOfFunctionalData_class(problem,interpretation,root); | ||
22313 | find mustExist(problem, interpretation, root); | ||
22314 | }or{ | ||
22315 | find interpretation(problem,interpretation); | ||
22316 | find mustInstanceOfFunctionalInput_class(problem,interpretation,root); | ||
22317 | find mustExist(problem, interpretation, root); | ||
22318 | }or{ | ||
22319 | find interpretation(problem,interpretation); | ||
22320 | find mustInstanceOfInformationLink_class(problem,interpretation,root); | ||
22321 | find mustExist(problem, interpretation, root); | ||
22322 | }or{ | ||
22323 | find interpretation(problem,interpretation); | ||
22324 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); | ||
22325 | find mustExist(problem, interpretation, root); | ||
22326 | }or{ | ||
22327 | find interpretation(problem,interpretation); | ||
22328 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); | ||
22329 | find mustExist(problem, interpretation, root); | ||
22330 | }or{ | ||
22331 | find interpretation(problem,interpretation); | ||
22332 | find mustInstanceOfFunctionalElement_class(problem,interpretation,root); | ||
22333 | find mustExist(problem, interpretation, root); | ||
22334 | }or{ | ||
22335 | find interpretation(problem,interpretation); | ||
22336 | find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); | ||
22337 | find mustExist(problem, interpretation, root); | ||
22338 | }or{ | ||
22339 | find interpretation(problem,interpretation); | ||
22340 | find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); | ||
22341 | find mustExist(problem, interpretation, root); | ||
22342 | } | ||
22343 | pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( | ||
22344 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22345 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
22346 | container:DefinedElement) | ||
22347 | { | ||
22348 | find interpretation(problem,interpretation); | ||
22349 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22350 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
22351 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
22352 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); | ||
22353 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
22354 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); | ||
22355 | find mustInstanceOfFunctionalElement_class(problem,interpretation,container); | ||
22356 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
22357 | find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); | ||
22358 | find mustExist(problem, interpretation, container); | ||
22359 | neg find mustExist(problem, interpretation, newObject); | ||
22360 | } | ||
22361 | pattern createObject_FunctionalInterface_class( | ||
22362 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22363 | typeInterpretation:PartialComplexTypeInterpretation) | ||
22364 | { | ||
22365 | find interpretation(problem,interpretation); | ||
22366 | neg find hasElementInContainment(problem,interpretation); | ||
22367 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22368 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
22369 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
22370 | find mayExist(problem, interpretation, newObject); | ||
22371 | neg find mustExist(problem, interpretation, newObject); | ||
22372 | } | ||
22373 | pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( | ||
22374 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22375 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
22376 | container:DefinedElement) | ||
22377 | { | ||
22378 | find interpretation(problem,interpretation); | ||
22379 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22380 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
22381 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
22382 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
22383 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); | ||
22384 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
22385 | find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); | ||
22386 | find mustExist(problem, interpretation, container); | ||
22387 | neg find mustExist(problem, interpretation, newObject); | ||
22388 | } | ||
22389 | pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( | ||
22390 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22391 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
22392 | container:DefinedElement) | ||
22393 | { | ||
22394 | find interpretation(problem,interpretation); | ||
22395 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22396 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
22397 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
22398 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); | ||
22399 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
22400 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); | ||
22401 | find mustInstanceOfFunction_class(problem,interpretation,container); | ||
22402 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
22403 | find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); | ||
22404 | find mustExist(problem, interpretation, container); | ||
22405 | neg find mustExist(problem, interpretation, newObject); | ||
22406 | } | ||
22407 | pattern createObject_Function_class( | ||
22408 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22409 | typeInterpretation:PartialComplexTypeInterpretation) | ||
22410 | { | ||
22411 | find interpretation(problem,interpretation); | ||
22412 | neg find hasElementInContainment(problem,interpretation); | ||
22413 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22414 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
22415 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
22416 | find mayExist(problem, interpretation, newObject); | ||
22417 | neg find mustExist(problem, interpretation, newObject); | ||
22418 | } | ||
22419 | pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( | ||
22420 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22421 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
22422 | container:DefinedElement) | ||
22423 | { | ||
22424 | find interpretation(problem,interpretation); | ||
22425 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22426 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
22427 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
22428 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); | ||
22429 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
22430 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); | ||
22431 | find mustInstanceOfFunctionalData_class(problem,interpretation,container); | ||
22432 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
22433 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); | ||
22434 | find mustExist(problem, interpretation, container); | ||
22435 | neg find mustExist(problem, interpretation, newObject); | ||
22436 | } | ||
22437 | pattern createObject_FAMTerminator_class( | ||
22438 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22439 | typeInterpretation:PartialComplexTypeInterpretation) | ||
22440 | { | ||
22441 | find interpretation(problem,interpretation); | ||
22442 | neg find hasElementInContainment(problem,interpretation); | ||
22443 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22444 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
22445 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
22446 | find mayExist(problem, interpretation, newObject); | ||
22447 | neg find mustExist(problem, interpretation, newObject); | ||
22448 | } | ||
22449 | pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( | ||
22450 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22451 | typeInterpretation:PartialComplexTypeInterpretation) | ||
22452 | { | ||
22453 | find interpretation(problem,interpretation); | ||
22454 | neg find hasElementInContainment(problem,interpretation); | ||
22455 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22456 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); | ||
22457 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); | ||
22458 | find mayExist(problem, interpretation, newObject); | ||
22459 | neg find mustExist(problem, interpretation, newObject); | ||
22460 | } | ||
22461 | pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( | ||
22462 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22463 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
22464 | container:DefinedElement) | ||
22465 | { | ||
22466 | find interpretation(problem,interpretation); | ||
22467 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22468 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
22469 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
22470 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); | ||
22471 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
22472 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); | ||
22473 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); | ||
22474 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
22475 | find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); | ||
22476 | find mustExist(problem, interpretation, container); | ||
22477 | neg find mustExist(problem, interpretation, newObject); | ||
22478 | } | ||
22479 | pattern createObject_InformationLink_class( | ||
22480 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22481 | typeInterpretation:PartialComplexTypeInterpretation) | ||
22482 | { | ||
22483 | find interpretation(problem,interpretation); | ||
22484 | neg find hasElementInContainment(problem,interpretation); | ||
22485 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22486 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
22487 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
22488 | find mayExist(problem, interpretation, newObject); | ||
22489 | neg find mustExist(problem, interpretation, newObject); | ||
22490 | } | ||
22491 | pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
22492 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22493 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
22494 | container:DefinedElement) | ||
22495 | { | ||
22496 | find interpretation(problem,interpretation); | ||
22497 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22498 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
22499 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
22500 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
22501 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
22502 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
22503 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
22504 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
22505 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
22506 | find mustExist(problem, interpretation, container); | ||
22507 | neg find mustExist(problem, interpretation, newObject); | ||
22508 | } | ||
22509 | pattern createObject_FunctionalOutput_class( | ||
22510 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22511 | typeInterpretation:PartialComplexTypeInterpretation) | ||
22512 | { | ||
22513 | find interpretation(problem,interpretation); | ||
22514 | neg find hasElementInContainment(problem,interpretation); | ||
22515 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22516 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
22517 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
22518 | find mayExist(problem, interpretation, newObject); | ||
22519 | neg find mustExist(problem, interpretation, newObject); | ||
22520 | } | ||
22521 | pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
22522 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22523 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
22524 | container:DefinedElement) | ||
22525 | { | ||
22526 | find interpretation(problem,interpretation); | ||
22527 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22528 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
22529 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
22530 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
22531 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
22532 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
22533 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
22534 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
22535 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
22536 | find mustExist(problem, interpretation, container); | ||
22537 | neg find mustExist(problem, interpretation, newObject); | ||
22538 | } | ||
22539 | pattern createObject_FunctionalInput_class( | ||
22540 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22541 | typeInterpretation:PartialComplexTypeInterpretation) | ||
22542 | { | ||
22543 | find interpretation(problem,interpretation); | ||
22544 | neg find hasElementInContainment(problem,interpretation); | ||
22545 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22546 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
22547 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
22548 | find mayExist(problem, interpretation, newObject); | ||
22549 | neg find mustExist(problem, interpretation, newObject); | ||
22550 | } | ||
22551 | |||
22552 | ////////// | ||
22553 | // 4.2 Type refinement | ||
22554 | ////////// | ||
22555 | pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
22556 | find interpretation(problem,interpretation); | ||
22557 | PartialInterpretation.newElements(interpretation,element); | ||
22558 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
22559 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
22560 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
22561 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
22562 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
22563 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
22564 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
22565 | } | ||
22566 | pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
22567 | find interpretation(problem,interpretation); | ||
22568 | PartialInterpretation.newElements(interpretation,element); | ||
22569 | find mayInstanceOfFunction_class(problem,interpretation,element); | ||
22570 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
22571 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
22572 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
22573 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
22574 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
22575 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
22576 | } | ||
22577 | pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
22578 | find interpretation(problem,interpretation); | ||
22579 | PartialInterpretation.newElements(interpretation,element); | ||
22580 | find mayInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
22581 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
22582 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
22583 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
22584 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
22585 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
22586 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
22587 | } | ||
22588 | pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
22589 | find interpretation(problem,interpretation); | ||
22590 | PartialInterpretation.newElements(interpretation,element); | ||
22591 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
22592 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
22593 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
22594 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
22595 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
22596 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
22597 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
22598 | } | ||
22599 | pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
22600 | find interpretation(problem,interpretation); | ||
22601 | PartialInterpretation.newElements(interpretation,element); | ||
22602 | find mayInstanceOfInformationLink_class(problem,interpretation,element); | ||
22603 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
22604 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
22605 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
22606 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
22607 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
22608 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
22609 | } | ||
22610 | pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
22611 | find interpretation(problem,interpretation); | ||
22612 | PartialInterpretation.newElements(interpretation,element); | ||
22613 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
22614 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
22615 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
22616 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
22617 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
22618 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
22619 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
22620 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
22621 | } | ||
22622 | pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
22623 | find interpretation(problem,interpretation); | ||
22624 | PartialInterpretation.newElements(interpretation,element); | ||
22625 | find mayInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
22626 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
22627 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
22628 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
22629 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
22630 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
22631 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
22632 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
22633 | } | ||
22634 | |||
22635 | ////////// | ||
22636 | // 4.3 Relation refinement | ||
22637 | ////////// | ||
22638 | pattern refineRelation_model_reference_FunctionalElement( | ||
22639 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22640 | relationIterpretation:PartialRelationInterpretation, | ||
22641 | from: DefinedElement, to: DefinedElement) | ||
22642 | { | ||
22643 | find interpretation(problem,interpretation); | ||
22644 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
22645 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
22646 | find mustExist(problem, interpretation, from); | ||
22647 | find mustExist(problem, interpretation, to); | ||
22648 | find mustInstanceOfFunctionalElement_class(problem,interpretation,from); | ||
22649 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); | ||
22650 | find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
22651 | neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
22652 | } | ||
22653 | pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( | ||
22654 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22655 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
22656 | from: DefinedElement, to: DefinedElement) | ||
22657 | { | ||
22658 | find interpretation(problem,interpretation); | ||
22659 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
22660 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
22661 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
22662 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); | ||
22663 | find mustExist(problem, interpretation, from); | ||
22664 | find mustExist(problem, interpretation, to); | ||
22665 | find mustInstanceOfFunctionalInput_class(problem,interpretation,from); | ||
22666 | find mustInstanceOfInformationLink_class(problem,interpretation,to); | ||
22667 | find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
22668 | neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
22669 | } | ||
22670 | pattern refineRelation_type_attribute_Function( | ||
22671 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22672 | relationIterpretation:PartialRelationInterpretation, | ||
22673 | from: DefinedElement, to: DefinedElement) | ||
22674 | { | ||
22675 | find interpretation(problem,interpretation); | ||
22676 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
22677 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
22678 | find mustExist(problem, interpretation, from); | ||
22679 | find mustExist(problem, interpretation, to); | ||
22680 | find mustInstanceOfFunction_class(problem,interpretation,from); | ||
22681 | find mustInstanceOfFunctionType_enum(problem,interpretation,to); | ||
22682 | find mayInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
22683 | neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
22684 | } | ||
22685 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
22686 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
22687 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
22688 | |||
22689 | ////////// | ||
22690 | // 0. Util | ||
22691 | ////////// | ||
22692 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
22693 | PartialInterpretation.problem(interpretation,problem); | ||
22694 | } | ||
22695 | |||
22696 | ///////////////////////// | ||
22697 | // 0.1 Existence | ||
22698 | ///////////////////////// | ||
22699 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
22700 | find interpretation(problem,interpretation); | ||
22701 | LogicProblem.elements(problem,element); | ||
22702 | } or { | ||
22703 | find interpretation(problem,interpretation); | ||
22704 | PartialInterpretation.newElements(interpretation,element); | ||
22705 | } | ||
22706 | |||
22707 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
22708 | find mustExist(problem,interpretation,element); | ||
22709 | } or { | ||
22710 | find interpretation(problem,interpretation); | ||
22711 | neg find elementCloseWorld(element); | ||
22712 | PartialInterpretation.openWorldElements(interpretation,element); | ||
22713 | } | ||
22714 | |||
22715 | private pattern elementCloseWorld(element:DefinedElement) { | ||
22716 | PartialInterpretation.openWorldElements(i,element); | ||
22717 | PartialInterpretation.maxNewElements(i,0); | ||
22718 | } or { | ||
22719 | Scope.targetTypeInterpretation(scope,interpretation); | ||
22720 | PartialTypeInterpratation.elements(interpretation,element); | ||
22721 | Scope.maxNewElements(scope,0); | ||
22722 | } | ||
22723 | |||
22724 | //////////////////////// | ||
22725 | // 0.2 Equivalence | ||
22726 | //////////////////////// | ||
22727 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
22728 | find mayExist(problem,interpretation,a); | ||
22729 | find mayExist(problem,interpretation,b); | ||
22730 | a == b; | ||
22731 | } | ||
22732 | |||
22733 | //////////////////////// | ||
22734 | // 0.3 Required Patterns by TypeIndexer | ||
22735 | //////////////////////// | ||
22736 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
22737 | find interpretation(problem,interpretation); | ||
22738 | LogicProblem.types(problem,type); | ||
22739 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22740 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
22741 | } | ||
22742 | |||
22743 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
22744 | find interpretation(problem,interpretation); | ||
22745 | LogicProblem.types(problem,type); | ||
22746 | TypeDefinition.elements(type,element); | ||
22747 | } or { | ||
22748 | find interpretation(problem,interpretation); | ||
22749 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
22750 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
22751 | } | ||
22752 | |||
22753 | private pattern isPrimitive(element: PrimitiveElement) { | ||
22754 | PrimitiveElement(element); | ||
22755 | } | ||
22756 | |||
22757 | ////////// | ||
22758 | // 1. Problem-Specific Base Indexers | ||
22759 | ////////// | ||
22760 | // 1.1 Type Indexers | ||
22761 | ////////// | ||
22762 | // 1.1.1 primitive Type Indexers | ||
22763 | ////////// | ||
22764 | |||
22765 | ////////// | ||
22766 | // 1.1.2 domain-specific Type Indexers | ||
22767 | ////////// | ||
22768 | /** | ||
22769 | * An element must be an instance of type "FunctionalElement class". | ||
22770 | */ | ||
22771 | private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
22772 | Type.name(type,"FunctionalElement class"); | ||
22773 | find directInstanceOf(problem,interpretation,element,type); | ||
22774 | } | ||
22775 | private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
22776 | find interpretation(problem,interpretation); | ||
22777 | PartialInterpretation.scopes(interpretation,scope); | ||
22778 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
22779 | Scope.maxNewElements(scope,0); | ||
22780 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
22781 | Type.name(type,"FunctionalElement class"); | ||
22782 | } | ||
22783 | |||
22784 | /** | ||
22785 | * An element may be an instance of type "FunctionalElement class". | ||
22786 | */ | ||
22787 | private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
22788 | { | ||
22789 | find interpretation(problem,interpretation); | ||
22790 | PartialInterpretation.newElements(interpretation,element); | ||
22791 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
22792 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
22793 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
22794 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
22795 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
22796 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
22797 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
22798 | neg find isPrimitive(element); | ||
22799 | } or { | ||
22800 | find interpretation(problem,interpretation); | ||
22801 | PartialInterpretation.openWorldElements(interpretation,element); | ||
22802 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
22803 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
22804 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
22805 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
22806 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
22807 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
22808 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
22809 | neg find isPrimitive(element); | ||
22810 | } or | ||
22811 | { find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } | ||
22812 | /** | ||
22813 | * An element must be an instance of type "FunctionalArchitectureModel class". | ||
22814 | */ | ||
22815 | private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
22816 | Type.name(type,"FunctionalArchitectureModel class"); | ||
22817 | find directInstanceOf(problem,interpretation,element,type); | ||
22818 | } | ||
22819 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
22820 | find interpretation(problem,interpretation); | ||
22821 | PartialInterpretation.scopes(interpretation,scope); | ||
22822 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
22823 | Scope.maxNewElements(scope,0); | ||
22824 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
22825 | Type.name(type,"FunctionalArchitectureModel class"); | ||
22826 | } | ||
22827 | |||
22828 | /** | ||
22829 | * An element may be an instance of type "FunctionalArchitectureModel class". | ||
22830 | */ | ||
22831 | private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
22832 | { | ||
22833 | find interpretation(problem,interpretation); | ||
22834 | PartialInterpretation.newElements(interpretation,element); | ||
22835 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
22836 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
22837 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
22838 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
22839 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
22840 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
22841 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
22842 | neg find isPrimitive(element); | ||
22843 | } or { | ||
22844 | find interpretation(problem,interpretation); | ||
22845 | PartialInterpretation.openWorldElements(interpretation,element); | ||
22846 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
22847 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
22848 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
22849 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
22850 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
22851 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
22852 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
22853 | neg find isPrimitive(element); | ||
22854 | } or | ||
22855 | { find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } | ||
22856 | /** | ||
22857 | * An element must be an instance of type "Function class". | ||
22858 | */ | ||
22859 | private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
22860 | Type.name(type,"Function class"); | ||
22861 | find directInstanceOf(problem,interpretation,element,type); | ||
22862 | } | ||
22863 | private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
22864 | find interpretation(problem,interpretation); | ||
22865 | PartialInterpretation.scopes(interpretation,scope); | ||
22866 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
22867 | Scope.maxNewElements(scope,0); | ||
22868 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
22869 | Type.name(type,"Function class"); | ||
22870 | } | ||
22871 | |||
22872 | /** | ||
22873 | * An element may be an instance of type "Function class". | ||
22874 | */ | ||
22875 | private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
22876 | { | ||
22877 | find interpretation(problem,interpretation); | ||
22878 | PartialInterpretation.newElements(interpretation,element); | ||
22879 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
22880 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
22881 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
22882 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
22883 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
22884 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
22885 | neg find isPrimitive(element); | ||
22886 | } or { | ||
22887 | find interpretation(problem,interpretation); | ||
22888 | PartialInterpretation.openWorldElements(interpretation,element); | ||
22889 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
22890 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
22891 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
22892 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
22893 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
22894 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
22895 | neg find isPrimitive(element); | ||
22896 | } or | ||
22897 | { find mustInstanceOfFunction_class(problem,interpretation,element); } | ||
22898 | /** | ||
22899 | * An element must be an instance of type "FAMTerminator class". | ||
22900 | */ | ||
22901 | private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
22902 | Type.name(type,"FAMTerminator class"); | ||
22903 | find directInstanceOf(problem,interpretation,element,type); | ||
22904 | } | ||
22905 | private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
22906 | find interpretation(problem,interpretation); | ||
22907 | PartialInterpretation.scopes(interpretation,scope); | ||
22908 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
22909 | Scope.maxNewElements(scope,0); | ||
22910 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
22911 | Type.name(type,"FAMTerminator class"); | ||
22912 | } | ||
22913 | |||
22914 | /** | ||
22915 | * An element may be an instance of type "FAMTerminator class". | ||
22916 | */ | ||
22917 | private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
22918 | { | ||
22919 | find interpretation(problem,interpretation); | ||
22920 | PartialInterpretation.newElements(interpretation,element); | ||
22921 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
22922 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
22923 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
22924 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
22925 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
22926 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
22927 | neg find isPrimitive(element); | ||
22928 | } or { | ||
22929 | find interpretation(problem,interpretation); | ||
22930 | PartialInterpretation.openWorldElements(interpretation,element); | ||
22931 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
22932 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
22933 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
22934 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
22935 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
22936 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
22937 | neg find isPrimitive(element); | ||
22938 | } or | ||
22939 | { find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } | ||
22940 | /** | ||
22941 | * An element must be an instance of type "InformationLink class". | ||
22942 | */ | ||
22943 | private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
22944 | Type.name(type,"InformationLink class"); | ||
22945 | find directInstanceOf(problem,interpretation,element,type); | ||
22946 | } | ||
22947 | private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
22948 | find interpretation(problem,interpretation); | ||
22949 | PartialInterpretation.scopes(interpretation,scope); | ||
22950 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
22951 | Scope.maxNewElements(scope,0); | ||
22952 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
22953 | Type.name(type,"InformationLink class"); | ||
22954 | } | ||
22955 | |||
22956 | /** | ||
22957 | * An element may be an instance of type "InformationLink class". | ||
22958 | */ | ||
22959 | private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
22960 | { | ||
22961 | find interpretation(problem,interpretation); | ||
22962 | PartialInterpretation.newElements(interpretation,element); | ||
22963 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
22964 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
22965 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
22966 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
22967 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
22968 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
22969 | neg find isPrimitive(element); | ||
22970 | } or { | ||
22971 | find interpretation(problem,interpretation); | ||
22972 | PartialInterpretation.openWorldElements(interpretation,element); | ||
22973 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
22974 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
22975 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
22976 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
22977 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
22978 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
22979 | neg find isPrimitive(element); | ||
22980 | } or | ||
22981 | { find mustInstanceOfInformationLink_class(problem,interpretation,element); } | ||
22982 | /** | ||
22983 | * An element must be an instance of type "FunctionalInterface class". | ||
22984 | */ | ||
22985 | private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
22986 | Type.name(type,"FunctionalInterface class"); | ||
22987 | find directInstanceOf(problem,interpretation,element,type); | ||
22988 | } | ||
22989 | private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
22990 | find interpretation(problem,interpretation); | ||
22991 | PartialInterpretation.scopes(interpretation,scope); | ||
22992 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
22993 | Scope.maxNewElements(scope,0); | ||
22994 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
22995 | Type.name(type,"FunctionalInterface class"); | ||
22996 | } | ||
22997 | |||
22998 | /** | ||
22999 | * An element may be an instance of type "FunctionalInterface class". | ||
23000 | */ | ||
23001 | private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23002 | { | ||
23003 | find interpretation(problem,interpretation); | ||
23004 | PartialInterpretation.newElements(interpretation,element); | ||
23005 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
23006 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
23007 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
23008 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
23009 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
23010 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
23011 | neg find isPrimitive(element); | ||
23012 | } or { | ||
23013 | find interpretation(problem,interpretation); | ||
23014 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23015 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
23016 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
23017 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
23018 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
23019 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
23020 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
23021 | neg find isPrimitive(element); | ||
23022 | } or | ||
23023 | { find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } | ||
23024 | /** | ||
23025 | * An element must be an instance of type "FunctionalInput class". | ||
23026 | */ | ||
23027 | private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23028 | Type.name(type,"FunctionalInput class"); | ||
23029 | find directInstanceOf(problem,interpretation,element,type); | ||
23030 | } | ||
23031 | private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23032 | find interpretation(problem,interpretation); | ||
23033 | PartialInterpretation.scopes(interpretation,scope); | ||
23034 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23035 | Scope.maxNewElements(scope,0); | ||
23036 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23037 | Type.name(type,"FunctionalInput class"); | ||
23038 | } | ||
23039 | |||
23040 | /** | ||
23041 | * An element may be an instance of type "FunctionalInput class". | ||
23042 | */ | ||
23043 | private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23044 | { | ||
23045 | find interpretation(problem,interpretation); | ||
23046 | PartialInterpretation.newElements(interpretation,element); | ||
23047 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
23048 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
23049 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
23050 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
23051 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
23052 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
23053 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
23054 | neg find isPrimitive(element); | ||
23055 | } or { | ||
23056 | find interpretation(problem,interpretation); | ||
23057 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23058 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
23059 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
23060 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
23061 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
23062 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
23063 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
23064 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
23065 | neg find isPrimitive(element); | ||
23066 | } or | ||
23067 | { find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } | ||
23068 | /** | ||
23069 | * An element must be an instance of type "FunctionalOutput class". | ||
23070 | */ | ||
23071 | private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23072 | Type.name(type,"FunctionalOutput class"); | ||
23073 | find directInstanceOf(problem,interpretation,element,type); | ||
23074 | } | ||
23075 | private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23076 | find interpretation(problem,interpretation); | ||
23077 | PartialInterpretation.scopes(interpretation,scope); | ||
23078 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23079 | Scope.maxNewElements(scope,0); | ||
23080 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23081 | Type.name(type,"FunctionalOutput class"); | ||
23082 | } | ||
23083 | |||
23084 | /** | ||
23085 | * An element may be an instance of type "FunctionalOutput class". | ||
23086 | */ | ||
23087 | private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23088 | { | ||
23089 | find interpretation(problem,interpretation); | ||
23090 | PartialInterpretation.newElements(interpretation,element); | ||
23091 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
23092 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
23093 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
23094 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
23095 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
23096 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
23097 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
23098 | neg find isPrimitive(element); | ||
23099 | } or { | ||
23100 | find interpretation(problem,interpretation); | ||
23101 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23102 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
23103 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
23104 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
23105 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
23106 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
23107 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
23108 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
23109 | neg find isPrimitive(element); | ||
23110 | } or | ||
23111 | { find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } | ||
23112 | /** | ||
23113 | * An element must be an instance of type "FunctionalData class". | ||
23114 | */ | ||
23115 | private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23116 | Type.name(type,"FunctionalData class"); | ||
23117 | find directInstanceOf(problem,interpretation,element,type); | ||
23118 | } | ||
23119 | private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23120 | find interpretation(problem,interpretation); | ||
23121 | PartialInterpretation.scopes(interpretation,scope); | ||
23122 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23123 | Scope.maxNewElements(scope,0); | ||
23124 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23125 | Type.name(type,"FunctionalData class"); | ||
23126 | } | ||
23127 | |||
23128 | /** | ||
23129 | * An element may be an instance of type "FunctionalData class". | ||
23130 | */ | ||
23131 | private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23132 | { | ||
23133 | find interpretation(problem,interpretation); | ||
23134 | PartialInterpretation.newElements(interpretation,element); | ||
23135 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
23136 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
23137 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
23138 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
23139 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
23140 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
23141 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
23142 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
23143 | neg find isPrimitive(element); | ||
23144 | } or { | ||
23145 | find interpretation(problem,interpretation); | ||
23146 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23147 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
23148 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
23149 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
23150 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
23151 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
23152 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
23153 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
23154 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
23155 | neg find isPrimitive(element); | ||
23156 | } or | ||
23157 | { find mustInstanceOfFunctionalData_class(problem,interpretation,element); } | ||
23158 | /** | ||
23159 | * An element must be an instance of type "FunctionType enum". | ||
23160 | */ | ||
23161 | private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23162 | Type.name(type,"FunctionType enum"); | ||
23163 | find directInstanceOf(problem,interpretation,element,type); | ||
23164 | } | ||
23165 | private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23166 | find interpretation(problem,interpretation); | ||
23167 | PartialInterpretation.scopes(interpretation,scope); | ||
23168 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23169 | Scope.maxNewElements(scope,0); | ||
23170 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23171 | Type.name(type,"FunctionType enum"); | ||
23172 | } | ||
23173 | |||
23174 | /** | ||
23175 | * An element may be an instance of type "FunctionType enum". | ||
23176 | */ | ||
23177 | private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23178 | { find mustInstanceOfFunctionType_enum(problem,interpretation,element); } | ||
23179 | /** | ||
23180 | * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
23181 | */ | ||
23182 | private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23183 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
23184 | find directInstanceOf(problem,interpretation,element,type); | ||
23185 | } | ||
23186 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23187 | find interpretation(problem,interpretation); | ||
23188 | PartialInterpretation.scopes(interpretation,scope); | ||
23189 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23190 | Scope.maxNewElements(scope,0); | ||
23191 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23192 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
23193 | } | ||
23194 | |||
23195 | /** | ||
23196 | * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
23197 | */ | ||
23198 | private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23199 | { find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } | ||
23200 | /** | ||
23201 | * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
23202 | */ | ||
23203 | private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23204 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
23205 | find directInstanceOf(problem,interpretation,element,type); | ||
23206 | } | ||
23207 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23208 | find interpretation(problem,interpretation); | ||
23209 | PartialInterpretation.scopes(interpretation,scope); | ||
23210 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23211 | Scope.maxNewElements(scope,0); | ||
23212 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23213 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
23214 | } | ||
23215 | |||
23216 | /** | ||
23217 | * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
23218 | */ | ||
23219 | private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23220 | { | ||
23221 | find interpretation(problem,interpretation); | ||
23222 | PartialInterpretation.newElements(interpretation,element); | ||
23223 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
23224 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
23225 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
23226 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
23227 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
23228 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
23229 | neg find isPrimitive(element); | ||
23230 | } or { | ||
23231 | find interpretation(problem,interpretation); | ||
23232 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23233 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
23234 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
23235 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
23236 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
23237 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
23238 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
23239 | neg find isPrimitive(element); | ||
23240 | } or | ||
23241 | { find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } | ||
23242 | |||
23243 | ////////// | ||
23244 | // 1.2 Relation Declaration Indexers | ||
23245 | ////////// | ||
23246 | /** | ||
23247 | * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) | ||
23248 | */ | ||
23249 | private pattern mustInRelationinterface_reference_FunctionalElement( | ||
23250 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23251 | source: DefinedElement, target:DefinedElement) | ||
23252 | { | ||
23253 | find interpretation(problem,interpretation); | ||
23254 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
23255 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); | ||
23256 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
23257 | BinaryElementRelationLink.param1(link,source); | ||
23258 | BinaryElementRelationLink.param2(link,target); | ||
23259 | } | ||
23260 | /** | ||
23261 | * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) | ||
23262 | */ | ||
23263 | private pattern mayInRelationinterface_reference_FunctionalElement( | ||
23264 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23265 | source: DefinedElement, target:DefinedElement) | ||
23266 | { | ||
23267 | find interpretation(problem,interpretation); | ||
23268 | // The two endpoint of the link have to exist | ||
23269 | find mayExist(problem, interpretation, source); | ||
23270 | find mayExist(problem, interpretation, target); | ||
23271 | // Type consistency | ||
23272 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
23273 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
23274 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
23275 | // the upper bound of the multiplicity should be considered. | ||
23276 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); | ||
23277 | check(numberOfExistingReferences < 1); | ||
23278 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
23279 | // the upper bound of the opposite reference multiplicity should be considered. | ||
23280 | numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); | ||
23281 | check(numberOfExistingOppositeReferences < 1); | ||
23282 | // The reference is containment, then a new reference cannot be create if: | ||
23283 | // 1. Multiple parents | ||
23284 | neg find mustContains4(problem,interpretation,_,target); | ||
23285 | // 2. Circle in the containment hierarchy | ||
23286 | neg find mustTransitiveContains(source,target); | ||
23287 | } or { | ||
23288 | find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); | ||
23289 | } | ||
23290 | /** | ||
23291 | * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) | ||
23292 | */ | ||
23293 | private pattern mustInRelationmodel_reference_FunctionalElement( | ||
23294 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23295 | source: DefinedElement, target:DefinedElement) | ||
23296 | { | ||
23297 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_model(problem,interpretation,source,target); | ||
23298 | } | ||
23299 | /** | ||
23300 | * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) | ||
23301 | */ | ||
23302 | private pattern mayInRelationmodel_reference_FunctionalElement( | ||
23303 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23304 | source: DefinedElement, target:DefinedElement) | ||
23305 | { | ||
23306 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_model(problem,interpretation,source,target); | ||
23307 | } | ||
23308 | /** | ||
23309 | * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) | ||
23310 | */ | ||
23311 | private pattern mustInRelationparent_reference_FunctionalElement( | ||
23312 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23313 | source: DefinedElement, target:DefinedElement) | ||
23314 | { | ||
23315 | find interpretation(problem,interpretation); | ||
23316 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
23317 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); | ||
23318 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
23319 | BinaryElementRelationLink.param1(link,source); | ||
23320 | BinaryElementRelationLink.param2(link,target); | ||
23321 | } | ||
23322 | /** | ||
23323 | * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) | ||
23324 | */ | ||
23325 | private pattern mayInRelationparent_reference_FunctionalElement( | ||
23326 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23327 | source: DefinedElement, target:DefinedElement) | ||
23328 | { | ||
23329 | find interpretation(problem,interpretation); | ||
23330 | // The two endpoint of the link have to exist | ||
23331 | find mayExist(problem, interpretation, source); | ||
23332 | find mayExist(problem, interpretation, target); | ||
23333 | // Type consistency | ||
23334 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
23335 | find mayInstanceOfFunction_class(problem,interpretation,target); | ||
23336 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
23337 | // the upper bound of the multiplicity should be considered. | ||
23338 | numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); | ||
23339 | check(numberOfExistingReferences < 1); | ||
23340 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
23341 | // 1. Multiple parents | ||
23342 | neg find mustContains4(problem,interpretation,source,_); | ||
23343 | // 2. Circle in the containment hierarchy | ||
23344 | neg find mustTransitiveContains(source,target); | ||
23345 | } or { | ||
23346 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); | ||
23347 | } | ||
23348 | /** | ||
23349 | * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) | ||
23350 | */ | ||
23351 | private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( | ||
23352 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23353 | source: DefinedElement, target:DefinedElement) | ||
23354 | { | ||
23355 | find interpretation(problem,interpretation); | ||
23356 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
23357 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
23358 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
23359 | BinaryElementRelationLink.param1(link,source); | ||
23360 | BinaryElementRelationLink.param2(link,target); | ||
23361 | } | ||
23362 | /** | ||
23363 | * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) | ||
23364 | */ | ||
23365 | private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( | ||
23366 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23367 | source: DefinedElement, target:DefinedElement) | ||
23368 | { | ||
23369 | find interpretation(problem,interpretation); | ||
23370 | // The two endpoint of the link have to exist | ||
23371 | find mayExist(problem, interpretation, source); | ||
23372 | find mayExist(problem, interpretation, target); | ||
23373 | // Type consistency | ||
23374 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); | ||
23375 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
23376 | // The reference is containment, then a new reference cannot be create if: | ||
23377 | // 1. Multiple parents | ||
23378 | neg find mustContains4(problem,interpretation,_,target); | ||
23379 | // 2. Circle in the containment hierarchy | ||
23380 | neg find mustTransitiveContains(source,target); | ||
23381 | } or { | ||
23382 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); | ||
23383 | } | ||
23384 | /** | ||
23385 | * Matcher for detecting tuples t where []subElements reference Function(source,target) | ||
23386 | */ | ||
23387 | private pattern mustInRelationsubElements_reference_Function( | ||
23388 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23389 | source: DefinedElement, target:DefinedElement) | ||
23390 | { | ||
23391 | find interpretation(problem,interpretation); | ||
23392 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
23393 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); | ||
23394 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
23395 | BinaryElementRelationLink.param1(link,source); | ||
23396 | BinaryElementRelationLink.param2(link,target); | ||
23397 | } | ||
23398 | /** | ||
23399 | * Matcher for detecting tuples t where <>subElements reference Function(source,target) | ||
23400 | */ | ||
23401 | private pattern mayInRelationsubElements_reference_Function( | ||
23402 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23403 | source: DefinedElement, target:DefinedElement) | ||
23404 | { | ||
23405 | find interpretation(problem,interpretation); | ||
23406 | // The two endpoint of the link have to exist | ||
23407 | find mayExist(problem, interpretation, source); | ||
23408 | find mayExist(problem, interpretation, target); | ||
23409 | // Type consistency | ||
23410 | find mayInstanceOfFunction_class(problem,interpretation,source); | ||
23411 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
23412 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
23413 | // the upper bound of the opposite reference multiplicity should be considered. | ||
23414 | numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); | ||
23415 | check(numberOfExistingOppositeReferences < 1); | ||
23416 | // The reference is containment, then a new reference cannot be create if: | ||
23417 | // 1. Multiple parents | ||
23418 | neg find mustContains4(problem,interpretation,_,target); | ||
23419 | // 2. Circle in the containment hierarchy | ||
23420 | neg find mustTransitiveContains(source,target); | ||
23421 | } or { | ||
23422 | find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); | ||
23423 | } | ||
23424 | /** | ||
23425 | * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) | ||
23426 | */ | ||
23427 | private pattern mustInRelationdata_reference_FAMTerminator( | ||
23428 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23429 | source: DefinedElement, target:DefinedElement) | ||
23430 | { | ||
23431 | find interpretation(problem,interpretation); | ||
23432 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
23433 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); | ||
23434 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
23435 | BinaryElementRelationLink.param1(link,source); | ||
23436 | BinaryElementRelationLink.param2(link,target); | ||
23437 | } | ||
23438 | /** | ||
23439 | * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) | ||
23440 | */ | ||
23441 | private pattern mayInRelationdata_reference_FAMTerminator( | ||
23442 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23443 | source: DefinedElement, target:DefinedElement) | ||
23444 | { | ||
23445 | find interpretation(problem,interpretation); | ||
23446 | // The two endpoint of the link have to exist | ||
23447 | find mayExist(problem, interpretation, source); | ||
23448 | find mayExist(problem, interpretation, target); | ||
23449 | // Type consistency | ||
23450 | find mayInstanceOfFAMTerminator_class(problem,interpretation,source); | ||
23451 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
23452 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
23453 | // the upper bound of the multiplicity should be considered. | ||
23454 | numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); | ||
23455 | check(numberOfExistingReferences < 1); | ||
23456 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
23457 | // the upper bound of the opposite reference multiplicity should be considered. | ||
23458 | numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); | ||
23459 | check(numberOfExistingOppositeReferences < 1); | ||
23460 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
23461 | // 1. Multiple parents | ||
23462 | neg find mustContains4(problem,interpretation,source,_); | ||
23463 | // 2. Circle in the containment hierarchy | ||
23464 | neg find mustTransitiveContains(source,target); | ||
23465 | } or { | ||
23466 | find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); | ||
23467 | } | ||
23468 | /** | ||
23469 | * Matcher for detecting tuples t where []from reference InformationLink(source,target) | ||
23470 | */ | ||
23471 | private pattern mustInRelationfrom_reference_InformationLink( | ||
23472 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23473 | source: DefinedElement, target:DefinedElement) | ||
23474 | { | ||
23475 | find interpretation(problem,interpretation); | ||
23476 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
23477 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); | ||
23478 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
23479 | BinaryElementRelationLink.param1(link,source); | ||
23480 | BinaryElementRelationLink.param2(link,target); | ||
23481 | } | ||
23482 | /** | ||
23483 | * Matcher for detecting tuples t where <>from reference InformationLink(source,target) | ||
23484 | */ | ||
23485 | private pattern mayInRelationfrom_reference_InformationLink( | ||
23486 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23487 | source: DefinedElement, target:DefinedElement) | ||
23488 | { | ||
23489 | find interpretation(problem,interpretation); | ||
23490 | // The two endpoint of the link have to exist | ||
23491 | find mayExist(problem, interpretation, source); | ||
23492 | find mayExist(problem, interpretation, target); | ||
23493 | // Type consistency | ||
23494 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
23495 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); | ||
23496 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
23497 | // the upper bound of the multiplicity should be considered. | ||
23498 | numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); | ||
23499 | check(numberOfExistingReferences < 1); | ||
23500 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
23501 | // 1. Multiple parents | ||
23502 | neg find mustContains4(problem,interpretation,source,_); | ||
23503 | // 2. Circle in the containment hierarchy | ||
23504 | neg find mustTransitiveContains(source,target); | ||
23505 | } or { | ||
23506 | find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); | ||
23507 | } | ||
23508 | /** | ||
23509 | * Matcher for detecting tuples t where []to reference InformationLink(source,target) | ||
23510 | */ | ||
23511 | private pattern mustInRelationto_reference_InformationLink( | ||
23512 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23513 | source: DefinedElement, target:DefinedElement) | ||
23514 | { | ||
23515 | find interpretation(problem,interpretation); | ||
23516 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
23517 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
23518 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
23519 | BinaryElementRelationLink.param1(link,source); | ||
23520 | BinaryElementRelationLink.param2(link,target); | ||
23521 | } | ||
23522 | /** | ||
23523 | * Matcher for detecting tuples t where <>to reference InformationLink(source,target) | ||
23524 | */ | ||
23525 | private pattern mayInRelationto_reference_InformationLink( | ||
23526 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23527 | source: DefinedElement, target:DefinedElement) | ||
23528 | { | ||
23529 | find interpretation(problem,interpretation); | ||
23530 | // The two endpoint of the link have to exist | ||
23531 | find mayExist(problem, interpretation, source); | ||
23532 | find mayExist(problem, interpretation, target); | ||
23533 | // Type consistency | ||
23534 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
23535 | find mayInstanceOfFunctionalInput_class(problem,interpretation,target); | ||
23536 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
23537 | // the upper bound of the multiplicity should be considered. | ||
23538 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); | ||
23539 | check(numberOfExistingReferences < 1); | ||
23540 | } or { | ||
23541 | find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); | ||
23542 | } | ||
23543 | /** | ||
23544 | * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) | ||
23545 | */ | ||
23546 | private pattern mustInRelationdata_reference_FunctionalInterface( | ||
23547 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23548 | source: DefinedElement, target:DefinedElement) | ||
23549 | { | ||
23550 | find interpretation(problem,interpretation); | ||
23551 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
23552 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); | ||
23553 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
23554 | BinaryElementRelationLink.param1(link,source); | ||
23555 | BinaryElementRelationLink.param2(link,target); | ||
23556 | } | ||
23557 | /** | ||
23558 | * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) | ||
23559 | */ | ||
23560 | private pattern mayInRelationdata_reference_FunctionalInterface( | ||
23561 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23562 | source: DefinedElement, target:DefinedElement) | ||
23563 | { | ||
23564 | find interpretation(problem,interpretation); | ||
23565 | // The two endpoint of the link have to exist | ||
23566 | find mayExist(problem, interpretation, source); | ||
23567 | find mayExist(problem, interpretation, target); | ||
23568 | // Type consistency | ||
23569 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
23570 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
23571 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
23572 | // the upper bound of the opposite reference multiplicity should be considered. | ||
23573 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); | ||
23574 | check(numberOfExistingOppositeReferences < 1); | ||
23575 | // The reference is containment, then a new reference cannot be create if: | ||
23576 | // 1. Multiple parents | ||
23577 | neg find mustContains4(problem,interpretation,_,target); | ||
23578 | // 2. Circle in the containment hierarchy | ||
23579 | neg find mustTransitiveContains(source,target); | ||
23580 | } or { | ||
23581 | find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); | ||
23582 | } | ||
23583 | /** | ||
23584 | * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) | ||
23585 | */ | ||
23586 | private pattern mustInRelationelement_reference_FunctionalInterface( | ||
23587 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23588 | source: DefinedElement, target:DefinedElement) | ||
23589 | { | ||
23590 | find interpretation(problem,interpretation); | ||
23591 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
23592 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); | ||
23593 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
23594 | BinaryElementRelationLink.param1(link,source); | ||
23595 | BinaryElementRelationLink.param2(link,target); | ||
23596 | } | ||
23597 | /** | ||
23598 | * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) | ||
23599 | */ | ||
23600 | private pattern mayInRelationelement_reference_FunctionalInterface( | ||
23601 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23602 | source: DefinedElement, target:DefinedElement) | ||
23603 | { | ||
23604 | find interpretation(problem,interpretation); | ||
23605 | // The two endpoint of the link have to exist | ||
23606 | find mayExist(problem, interpretation, source); | ||
23607 | find mayExist(problem, interpretation, target); | ||
23608 | // Type consistency | ||
23609 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
23610 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
23611 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
23612 | // the upper bound of the multiplicity should be considered. | ||
23613 | numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); | ||
23614 | check(numberOfExistingReferences < 1); | ||
23615 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
23616 | // the upper bound of the opposite reference multiplicity should be considered. | ||
23617 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); | ||
23618 | check(numberOfExistingOppositeReferences < 1); | ||
23619 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
23620 | // 1. Multiple parents | ||
23621 | neg find mustContains4(problem,interpretation,source,_); | ||
23622 | // 2. Circle in the containment hierarchy | ||
23623 | neg find mustTransitiveContains(source,target); | ||
23624 | } or { | ||
23625 | find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); | ||
23626 | } | ||
23627 | /** | ||
23628 | * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) | ||
23629 | */ | ||
23630 | private pattern mustInRelationIncomingLinks_reference_FunctionalInput( | ||
23631 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23632 | source: DefinedElement, target:DefinedElement) | ||
23633 | { | ||
23634 | find interpretation(problem,interpretation); | ||
23635 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
23636 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
23637 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
23638 | BinaryElementRelationLink.param1(link,source); | ||
23639 | BinaryElementRelationLink.param2(link,target); | ||
23640 | } | ||
23641 | /** | ||
23642 | * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) | ||
23643 | */ | ||
23644 | private pattern mayInRelationIncomingLinks_reference_FunctionalInput( | ||
23645 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23646 | source: DefinedElement, target:DefinedElement) | ||
23647 | { | ||
23648 | find interpretation(problem,interpretation); | ||
23649 | // The two endpoint of the link have to exist | ||
23650 | find mayExist(problem, interpretation, source); | ||
23651 | find mayExist(problem, interpretation, target); | ||
23652 | // Type consistency | ||
23653 | find mayInstanceOfFunctionalInput_class(problem,interpretation,source); | ||
23654 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
23655 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
23656 | // the upper bound of the opposite reference multiplicity should be considered. | ||
23657 | numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); | ||
23658 | check(numberOfExistingOppositeReferences < 1); | ||
23659 | } or { | ||
23660 | find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); | ||
23661 | } | ||
23662 | /** | ||
23663 | * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) | ||
23664 | */ | ||
23665 | private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( | ||
23666 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23667 | source: DefinedElement, target:DefinedElement) | ||
23668 | { | ||
23669 | find interpretation(problem,interpretation); | ||
23670 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
23671 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); | ||
23672 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
23673 | BinaryElementRelationLink.param1(link,source); | ||
23674 | BinaryElementRelationLink.param2(link,target); | ||
23675 | } | ||
23676 | /** | ||
23677 | * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) | ||
23678 | */ | ||
23679 | private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( | ||
23680 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23681 | source: DefinedElement, target:DefinedElement) | ||
23682 | { | ||
23683 | find interpretation(problem,interpretation); | ||
23684 | // The two endpoint of the link have to exist | ||
23685 | find mayExist(problem, interpretation, source); | ||
23686 | find mayExist(problem, interpretation, target); | ||
23687 | // Type consistency | ||
23688 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); | ||
23689 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
23690 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
23691 | // the upper bound of the opposite reference multiplicity should be considered. | ||
23692 | numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); | ||
23693 | check(numberOfExistingOppositeReferences < 1); | ||
23694 | // The reference is containment, then a new reference cannot be create if: | ||
23695 | // 1. Multiple parents | ||
23696 | neg find mustContains4(problem,interpretation,_,target); | ||
23697 | // 2. Circle in the containment hierarchy | ||
23698 | neg find mustTransitiveContains(source,target); | ||
23699 | } or { | ||
23700 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); | ||
23701 | } | ||
23702 | /** | ||
23703 | * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) | ||
23704 | */ | ||
23705 | private pattern mustInRelationterminator_reference_FunctionalData( | ||
23706 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23707 | source: DefinedElement, target:DefinedElement) | ||
23708 | { | ||
23709 | find interpretation(problem,interpretation); | ||
23710 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
23711 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); | ||
23712 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
23713 | BinaryElementRelationLink.param1(link,source); | ||
23714 | BinaryElementRelationLink.param2(link,target); | ||
23715 | } | ||
23716 | /** | ||
23717 | * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) | ||
23718 | */ | ||
23719 | private pattern mayInRelationterminator_reference_FunctionalData( | ||
23720 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23721 | source: DefinedElement, target:DefinedElement) | ||
23722 | { | ||
23723 | find interpretation(problem,interpretation); | ||
23724 | // The two endpoint of the link have to exist | ||
23725 | find mayExist(problem, interpretation, source); | ||
23726 | find mayExist(problem, interpretation, target); | ||
23727 | // Type consistency | ||
23728 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
23729 | find mayInstanceOfFAMTerminator_class(problem,interpretation,target); | ||
23730 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
23731 | // the upper bound of the multiplicity should be considered. | ||
23732 | numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); | ||
23733 | check(numberOfExistingReferences < 1); | ||
23734 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
23735 | // the upper bound of the opposite reference multiplicity should be considered. | ||
23736 | numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); | ||
23737 | check(numberOfExistingOppositeReferences < 1); | ||
23738 | // The reference is containment, then a new reference cannot be create if: | ||
23739 | // 1. Multiple parents | ||
23740 | neg find mustContains4(problem,interpretation,_,target); | ||
23741 | // 2. Circle in the containment hierarchy | ||
23742 | neg find mustTransitiveContains(source,target); | ||
23743 | } or { | ||
23744 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); | ||
23745 | } | ||
23746 | /** | ||
23747 | * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) | ||
23748 | */ | ||
23749 | private pattern mustInRelationinterface_reference_FunctionalData( | ||
23750 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23751 | source: DefinedElement, target:DefinedElement) | ||
23752 | { | ||
23753 | find interpretation(problem,interpretation); | ||
23754 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
23755 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); | ||
23756 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
23757 | BinaryElementRelationLink.param1(link,source); | ||
23758 | BinaryElementRelationLink.param2(link,target); | ||
23759 | } | ||
23760 | /** | ||
23761 | * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) | ||
23762 | */ | ||
23763 | private pattern mayInRelationinterface_reference_FunctionalData( | ||
23764 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23765 | source: DefinedElement, target:DefinedElement) | ||
23766 | { | ||
23767 | find interpretation(problem,interpretation); | ||
23768 | // The two endpoint of the link have to exist | ||
23769 | find mayExist(problem, interpretation, source); | ||
23770 | find mayExist(problem, interpretation, target); | ||
23771 | // Type consistency | ||
23772 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
23773 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
23774 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
23775 | // the upper bound of the multiplicity should be considered. | ||
23776 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); | ||
23777 | check(numberOfExistingReferences < 1); | ||
23778 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
23779 | // 1. Multiple parents | ||
23780 | neg find mustContains4(problem,interpretation,source,_); | ||
23781 | // 2. Circle in the containment hierarchy | ||
23782 | neg find mustTransitiveContains(source,target); | ||
23783 | } or { | ||
23784 | find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); | ||
23785 | } | ||
23786 | /** | ||
23787 | * Matcher for detecting tuples t where []type attribute Function(source,target) | ||
23788 | */ | ||
23789 | private pattern mustInRelationtype_attribute_Function( | ||
23790 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23791 | source: DefinedElement, target:DefinedElement) | ||
23792 | { | ||
23793 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_type(problem,interpretation,source,target); | ||
23794 | } | ||
23795 | /** | ||
23796 | * Matcher for detecting tuples t where []type attribute Function(source,target) | ||
23797 | */ | ||
23798 | private pattern mayInRelationtype_attribute_Function( | ||
23799 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23800 | source: DefinedElement, target:DefinedElement) | ||
23801 | { | ||
23802 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_type(problem,interpretation,source,target); | ||
23803 | } | ||
23804 | |||
23805 | ////////// | ||
23806 | // 1.3 Relation Definition Indexers | ||
23807 | ////////// | ||
23808 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test xyz terminatorAndInformation | ||
23809 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_terminatorAndInformation( | ||
23810 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23811 | var_T, var_I) | ||
23812 | { | ||
23813 | find interpretation(problem,interpretation); | ||
23814 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
23815 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
23816 | // T is exported | ||
23817 | // I is exported | ||
23818 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
23819 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); | ||
23820 | find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); | ||
23821 | var_virtual0 == var_I; | ||
23822 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
23823 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); | ||
23824 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
23825 | var_virtual1 == var_T; | ||
23826 | }or{ | ||
23827 | find interpretation(problem,interpretation); | ||
23828 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
23829 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
23830 | // T is exported | ||
23831 | // I is exported | ||
23832 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
23833 | find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); | ||
23834 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); | ||
23835 | var_virtual0 == var_In; | ||
23836 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); | ||
23837 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); | ||
23838 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
23839 | var_virtual1 == var_T; | ||
23840 | } | ||
23841 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_terminatorAndInformation( | ||
23842 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23843 | var_T, var_I) | ||
23844 | { | ||
23845 | find interpretation(problem,interpretation); | ||
23846 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
23847 | find mayInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
23848 | // T is exported | ||
23849 | // I is exported | ||
23850 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
23851 | find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); | ||
23852 | find mayInstanceOfInformationLink_class(problem,interpretation,var_virtual0); | ||
23853 | find mayEquivalent(problem, interpretation, var_virtual0, var_I); | ||
23854 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
23855 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); | ||
23856 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
23857 | find mayEquivalent(problem, interpretation, var_virtual1, var_T); | ||
23858 | }or{ | ||
23859 | find interpretation(problem,interpretation); | ||
23860 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
23861 | find mayInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
23862 | // T is exported | ||
23863 | // I is exported | ||
23864 | find mayInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
23865 | find mayInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); | ||
23866 | find mayInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); | ||
23867 | find mayEquivalent(problem, interpretation, var_virtual0, var_In); | ||
23868 | find mayInstanceOfFunctionalInput_class(problem,interpretation,var_In); | ||
23869 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); | ||
23870 | find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
23871 | find mayEquivalent(problem, interpretation, var_virtual1, var_T); | ||
23872 | } | ||
23873 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_terminatorAndInformation( | ||
23874 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23875 | var_T, var_I) | ||
23876 | { | ||
23877 | find interpretation(problem,interpretation); | ||
23878 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
23879 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
23880 | // T is exported | ||
23881 | // I is exported | ||
23882 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
23883 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); | ||
23884 | find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); | ||
23885 | var_virtual0 == var_I; | ||
23886 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); | ||
23887 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); | ||
23888 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
23889 | var_virtual1 == var_T; | ||
23890 | }or{ | ||
23891 | find interpretation(problem,interpretation); | ||
23892 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); | ||
23893 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
23894 | // T is exported | ||
23895 | // I is exported | ||
23896 | find mustInstanceOfInformationLink_class(problem,interpretation,var_I); | ||
23897 | find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); | ||
23898 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); | ||
23899 | var_virtual0 == var_In; | ||
23900 | find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); | ||
23901 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); | ||
23902 | find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); | ||
23903 | var_virtual1 == var_T; | ||
23904 | } | ||
23905 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test xyz type | ||
23906 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_type( | ||
23907 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23908 | var_This, var_Target) | ||
23909 | { | ||
23910 | find interpretation(problem,interpretation); | ||
23911 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
23912 | // type constraint is enforced by construction | ||
23913 | // This is exported | ||
23914 | // Target is exported | ||
23915 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_rootElements(problem,interpretation,_var__Model,var_This); | ||
23916 | var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); | ||
23917 | var_Target == var_virtual0; | ||
23918 | }or{ | ||
23919 | find interpretation(problem,interpretation); | ||
23920 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
23921 | // type constraint is enforced by construction | ||
23922 | // This is exported | ||
23923 | // Target is exported | ||
23924 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent(problem,interpretation,_var__Child,var_This); | ||
23925 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_rootElements(problem,interpretation,_var__Model,var_This); | ||
23926 | var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); | ||
23927 | var_Target == var_virtual0; | ||
23928 | }or{ | ||
23929 | find interpretation(problem,interpretation); | ||
23930 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
23931 | // type constraint is enforced by construction | ||
23932 | // This is exported | ||
23933 | // Target is exported | ||
23934 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent(problem,interpretation,var_This,_var__Par); | ||
23935 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent(problem,interpretation,_var__Child,var_This); | ||
23936 | var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); | ||
23937 | var_Target == var_virtual0; | ||
23938 | } | ||
23939 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_type( | ||
23940 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23941 | var_This, var_Target) | ||
23942 | { | ||
23943 | find interpretation(problem,interpretation); | ||
23944 | find mayInstanceOfFunction_class(problem,interpretation,var_This); | ||
23945 | // type constraint is enforced by construction | ||
23946 | // This is exported | ||
23947 | // Target is exported | ||
23948 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_rootElements(problem,interpretation,_var__Model,var_This); | ||
23949 | var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); | ||
23950 | find mayEquivalent(problem, interpretation, var_Target, var_virtual0); | ||
23951 | }or{ | ||
23952 | find interpretation(problem,interpretation); | ||
23953 | find mayInstanceOfFunction_class(problem,interpretation,var_This); | ||
23954 | // type constraint is enforced by construction | ||
23955 | // This is exported | ||
23956 | // Target is exported | ||
23957 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent(problem,interpretation,_var__Child,var_This); | ||
23958 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_rootElements(problem,interpretation,_var__Model,var_This); | ||
23959 | var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); | ||
23960 | find mayEquivalent(problem, interpretation, var_Target, var_virtual0); | ||
23961 | }or{ | ||
23962 | find interpretation(problem,interpretation); | ||
23963 | find mayInstanceOfFunction_class(problem,interpretation,var_This); | ||
23964 | // type constraint is enforced by construction | ||
23965 | // This is exported | ||
23966 | // Target is exported | ||
23967 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent(problem,interpretation,var_This,_var__Par); | ||
23968 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent(problem,interpretation,_var__Child,var_This); | ||
23969 | var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); | ||
23970 | find mayEquivalent(problem, interpretation, var_Target, var_virtual0); | ||
23971 | } | ||
23972 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_type( | ||
23973 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23974 | var_This, var_Target) | ||
23975 | { | ||
23976 | find interpretation(problem,interpretation); | ||
23977 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
23978 | // type constraint is enforced by construction | ||
23979 | // This is exported | ||
23980 | // Target is exported | ||
23981 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_rootElements(problem,interpretation,_var__Model,var_This); | ||
23982 | var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); | ||
23983 | var_Target == var_virtual0; | ||
23984 | }or{ | ||
23985 | find interpretation(problem,interpretation); | ||
23986 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
23987 | // type constraint is enforced by construction | ||
23988 | // This is exported | ||
23989 | // Target is exported | ||
23990 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent(problem,interpretation,_var__Child,var_This); | ||
23991 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_rootElements(problem,interpretation,_var__Model,var_This); | ||
23992 | var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); | ||
23993 | var_Target == var_virtual0; | ||
23994 | }or{ | ||
23995 | find interpretation(problem,interpretation); | ||
23996 | find mustInstanceOfFunction_class(problem,interpretation,var_This); | ||
23997 | // type constraint is enforced by construction | ||
23998 | // This is exported | ||
23999 | // Target is exported | ||
24000 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent(problem,interpretation,var_This,_var__Par); | ||
24001 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent(problem,interpretation,_var__Child,var_This); | ||
24002 | var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); | ||
24003 | var_Target == var_virtual0; | ||
24004 | } | ||
24005 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test xyz rootElements | ||
24006 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_rootElements( | ||
24007 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24008 | var_Model, var_Root) | ||
24009 | { | ||
24010 | find interpretation(problem,interpretation); | ||
24011 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
24012 | find mustInstanceOfFunction_class(problem,interpretation,var_Root); | ||
24013 | // Model is exported | ||
24014 | // Root is exported | ||
24015 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
24016 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); | ||
24017 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); | ||
24018 | var_virtual0 == var_Root; | ||
24019 | } | ||
24020 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_rootElements( | ||
24021 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24022 | var_Model, var_Root) | ||
24023 | { | ||
24024 | find interpretation(problem,interpretation); | ||
24025 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
24026 | find mayInstanceOfFunction_class(problem,interpretation,var_Root); | ||
24027 | // Model is exported | ||
24028 | // Root is exported | ||
24029 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
24030 | find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); | ||
24031 | find mayInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); | ||
24032 | find mayEquivalent(problem, interpretation, var_virtual0, var_Root); | ||
24033 | } | ||
24034 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_rootElements( | ||
24035 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24036 | var_Model, var_Root) | ||
24037 | { | ||
24038 | find interpretation(problem,interpretation); | ||
24039 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
24040 | find mustInstanceOfFunction_class(problem,interpretation,var_Root); | ||
24041 | // Model is exported | ||
24042 | // Root is exported | ||
24043 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); | ||
24044 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); | ||
24045 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); | ||
24046 | var_virtual0 == var_Root; | ||
24047 | } | ||
24048 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test xyz parent | ||
24049 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent( | ||
24050 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24051 | var_Func, var_Par) | ||
24052 | { | ||
24053 | find interpretation(problem,interpretation); | ||
24054 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
24055 | find mustInstanceOfFunction_class(problem,interpretation,var_Par); | ||
24056 | // Func is exported | ||
24057 | // Par is exported | ||
24058 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
24059 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); | ||
24060 | find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); | ||
24061 | var_virtual0 == var_Par; | ||
24062 | } | ||
24063 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent( | ||
24064 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24065 | var_Func, var_Par) | ||
24066 | { | ||
24067 | find interpretation(problem,interpretation); | ||
24068 | find mayInstanceOfFunction_class(problem,interpretation,var_Func); | ||
24069 | find mayInstanceOfFunction_class(problem,interpretation,var_Par); | ||
24070 | // Func is exported | ||
24071 | // Par is exported | ||
24072 | find mayInstanceOfFunction_class(problem,interpretation,var_Func); | ||
24073 | find mayInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); | ||
24074 | find mayInstanceOfFunction_class(problem,interpretation,var_virtual0); | ||
24075 | find mayEquivalent(problem, interpretation, var_virtual0, var_Par); | ||
24076 | } | ||
24077 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent( | ||
24078 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24079 | var_Func, var_Par) | ||
24080 | { | ||
24081 | find interpretation(problem,interpretation); | ||
24082 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
24083 | find mustInstanceOfFunction_class(problem,interpretation,var_Par); | ||
24084 | // Func is exported | ||
24085 | // Par is exported | ||
24086 | find mustInstanceOfFunction_class(problem,interpretation,var_Func); | ||
24087 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); | ||
24088 | find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); | ||
24089 | var_virtual0 == var_Par; | ||
24090 | } | ||
24091 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test xyz model | ||
24092 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_model( | ||
24093 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24094 | var_This, var_Target) | ||
24095 | { | ||
24096 | find interpretation(problem,interpretation); | ||
24097 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
24098 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
24099 | // This is exported | ||
24100 | // Target is exported | ||
24101 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
24102 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
24103 | } | ||
24104 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_model( | ||
24105 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24106 | var_This, var_Target) | ||
24107 | { | ||
24108 | find interpretation(problem,interpretation); | ||
24109 | find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
24110 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
24111 | // This is exported | ||
24112 | // Target is exported | ||
24113 | find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
24114 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
24115 | } | ||
24116 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_model( | ||
24117 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24118 | var_This, var_Target) | ||
24119 | { | ||
24120 | find interpretation(problem,interpretation); | ||
24121 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
24122 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
24123 | // This is exported | ||
24124 | // Target is exported | ||
24125 | find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); | ||
24126 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); | ||
24127 | } | ||
24128 | |||
24129 | ////////// | ||
24130 | // 1.4 Containment Indexer | ||
24131 | ////////// | ||
24132 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
24133 | find mustContains4(_,_,source,target); | ||
24134 | } | ||
24135 | |||
24136 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
24137 | source: DefinedElement, target: DefinedElement) | ||
24138 | { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or | ||
24139 | |||
24140 | { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or | ||
24141 | |||
24142 | { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or | ||
24143 | |||
24144 | { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or | ||
24145 | |||
24146 | { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or | ||
24147 | |||
24148 | { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } | ||
24149 | |||
24150 | private pattern mustTransitiveContains(source,target) { | ||
24151 | find mustContains2+(source,target); | ||
24152 | } | ||
24153 | |||
24154 | ////////// | ||
24155 | // 2. Invalidation Indexers | ||
24156 | ////////// | ||
24157 | // 2.1 Invalidated by WF Queries | ||
24158 | ////////// | ||
24159 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_terminatorAndInformation(problem:LogicProblem, interpretation:PartialInterpretation, | ||
24160 | var_T, var_I) | ||
24161 | { | ||
24162 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_terminatorAndInformation(problem,interpretation,var_T,var_I); | ||
24163 | } | ||
24164 | |||
24165 | ////////// | ||
24166 | // 3. Unfinishedness Indexers | ||
24167 | ////////// | ||
24168 | // 3.1 Unfinishedness Measured by Multiplicity | ||
24169 | ////////// | ||
24170 | pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
24171 | find interpretation(problem,interpretation); | ||
24172 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
24173 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
24174 | find mustInstanceOfInformationLink_class(problem,interpretation,object); | ||
24175 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); | ||
24176 | check(numberOfExistingReferences < 1); | ||
24177 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
24178 | } | ||
24179 | |||
24180 | ////////// | ||
24181 | // 3.2 Unfinishedness Measured by WF Queries | ||
24182 | ////////// | ||
24183 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_terminatorAndInformation(problem:LogicProblem, interpretation:PartialInterpretation, | ||
24184 | var_T, var_I) | ||
24185 | { | ||
24186 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_terminatorAndInformation(problem,interpretation,var_T,var_I); | ||
24187 | } | ||
24188 | |||
24189 | ////////// | ||
24190 | // 4. Refinement Indexers | ||
24191 | ////////// | ||
24192 | // 4.1 Object constructors | ||
24193 | ////////// | ||
24194 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
24195 | { | ||
24196 | find interpretation(problem,interpretation); | ||
24197 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); | ||
24198 | find mustExist(problem, interpretation, root); | ||
24199 | }or{ | ||
24200 | find interpretation(problem,interpretation); | ||
24201 | find mustInstanceOfFunctionalData_class(problem,interpretation,root); | ||
24202 | find mustExist(problem, interpretation, root); | ||
24203 | }or{ | ||
24204 | find interpretation(problem,interpretation); | ||
24205 | find mustInstanceOfInformationLink_class(problem,interpretation,root); | ||
24206 | find mustExist(problem, interpretation, root); | ||
24207 | }or{ | ||
24208 | find interpretation(problem,interpretation); | ||
24209 | find mustInstanceOfFunction_class(problem,interpretation,root); | ||
24210 | find mustExist(problem, interpretation, root); | ||
24211 | }or{ | ||
24212 | find interpretation(problem,interpretation); | ||
24213 | find mustInstanceOfFAMTerminator_class(problem,interpretation,root); | ||
24214 | find mustExist(problem, interpretation, root); | ||
24215 | }or{ | ||
24216 | find interpretation(problem,interpretation); | ||
24217 | find mustInstanceOfFunctionalElement_class(problem,interpretation,root); | ||
24218 | find mustExist(problem, interpretation, root); | ||
24219 | }or{ | ||
24220 | find interpretation(problem,interpretation); | ||
24221 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); | ||
24222 | find mustExist(problem, interpretation, root); | ||
24223 | }or{ | ||
24224 | find interpretation(problem,interpretation); | ||
24225 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); | ||
24226 | find mustExist(problem, interpretation, root); | ||
24227 | }or{ | ||
24228 | find interpretation(problem,interpretation); | ||
24229 | find mustInstanceOfFunctionalInput_class(problem,interpretation,root); | ||
24230 | find mustExist(problem, interpretation, root); | ||
24231 | }or{ | ||
24232 | find interpretation(problem,interpretation); | ||
24233 | find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); | ||
24234 | find mustExist(problem, interpretation, root); | ||
24235 | }or{ | ||
24236 | find interpretation(problem,interpretation); | ||
24237 | find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); | ||
24238 | find mustExist(problem, interpretation, root); | ||
24239 | } | ||
24240 | pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( | ||
24241 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24242 | typeInterpretation:PartialComplexTypeInterpretation) | ||
24243 | { | ||
24244 | find interpretation(problem,interpretation); | ||
24245 | neg find hasElementInContainment(problem,interpretation); | ||
24246 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24247 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); | ||
24248 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); | ||
24249 | find mayExist(problem, interpretation, newObject); | ||
24250 | neg find mustExist(problem, interpretation, newObject); | ||
24251 | } | ||
24252 | pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( | ||
24253 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24254 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
24255 | container:DefinedElement) | ||
24256 | { | ||
24257 | find interpretation(problem,interpretation); | ||
24258 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24259 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
24260 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
24261 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
24262 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); | ||
24263 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
24264 | find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); | ||
24265 | find mustExist(problem, interpretation, container); | ||
24266 | neg find mustExist(problem, interpretation, newObject); | ||
24267 | } | ||
24268 | pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( | ||
24269 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24270 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
24271 | container:DefinedElement) | ||
24272 | { | ||
24273 | find interpretation(problem,interpretation); | ||
24274 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24275 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
24276 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
24277 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); | ||
24278 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
24279 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); | ||
24280 | find mustInstanceOfFunction_class(problem,interpretation,container); | ||
24281 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
24282 | find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); | ||
24283 | find mustExist(problem, interpretation, container); | ||
24284 | neg find mustExist(problem, interpretation, newObject); | ||
24285 | } | ||
24286 | pattern createObject_Function_class( | ||
24287 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24288 | typeInterpretation:PartialComplexTypeInterpretation) | ||
24289 | { | ||
24290 | find interpretation(problem,interpretation); | ||
24291 | neg find hasElementInContainment(problem,interpretation); | ||
24292 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24293 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
24294 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
24295 | find mayExist(problem, interpretation, newObject); | ||
24296 | neg find mustExist(problem, interpretation, newObject); | ||
24297 | } | ||
24298 | pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( | ||
24299 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24300 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
24301 | container:DefinedElement) | ||
24302 | { | ||
24303 | find interpretation(problem,interpretation); | ||
24304 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24305 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
24306 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
24307 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); | ||
24308 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
24309 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); | ||
24310 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); | ||
24311 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
24312 | find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); | ||
24313 | find mustExist(problem, interpretation, container); | ||
24314 | neg find mustExist(problem, interpretation, newObject); | ||
24315 | } | ||
24316 | pattern createObject_InformationLink_class( | ||
24317 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24318 | typeInterpretation:PartialComplexTypeInterpretation) | ||
24319 | { | ||
24320 | find interpretation(problem,interpretation); | ||
24321 | neg find hasElementInContainment(problem,interpretation); | ||
24322 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24323 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
24324 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
24325 | find mayExist(problem, interpretation, newObject); | ||
24326 | neg find mustExist(problem, interpretation, newObject); | ||
24327 | } | ||
24328 | pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
24329 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24330 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
24331 | container:DefinedElement) | ||
24332 | { | ||
24333 | find interpretation(problem,interpretation); | ||
24334 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24335 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
24336 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
24337 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
24338 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
24339 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
24340 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
24341 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
24342 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
24343 | find mustExist(problem, interpretation, container); | ||
24344 | neg find mustExist(problem, interpretation, newObject); | ||
24345 | } | ||
24346 | pattern createObject_FunctionalOutput_class( | ||
24347 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24348 | typeInterpretation:PartialComplexTypeInterpretation) | ||
24349 | { | ||
24350 | find interpretation(problem,interpretation); | ||
24351 | neg find hasElementInContainment(problem,interpretation); | ||
24352 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24353 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
24354 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
24355 | find mayExist(problem, interpretation, newObject); | ||
24356 | neg find mustExist(problem, interpretation, newObject); | ||
24357 | } | ||
24358 | pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( | ||
24359 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24360 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
24361 | container:DefinedElement) | ||
24362 | { | ||
24363 | find interpretation(problem,interpretation); | ||
24364 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24365 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
24366 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
24367 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); | ||
24368 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
24369 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); | ||
24370 | find mustInstanceOfFunctionalData_class(problem,interpretation,container); | ||
24371 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
24372 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); | ||
24373 | find mustExist(problem, interpretation, container); | ||
24374 | neg find mustExist(problem, interpretation, newObject); | ||
24375 | } | ||
24376 | pattern createObject_FAMTerminator_class( | ||
24377 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24378 | typeInterpretation:PartialComplexTypeInterpretation) | ||
24379 | { | ||
24380 | find interpretation(problem,interpretation); | ||
24381 | neg find hasElementInContainment(problem,interpretation); | ||
24382 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24383 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
24384 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
24385 | find mayExist(problem, interpretation, newObject); | ||
24386 | neg find mustExist(problem, interpretation, newObject); | ||
24387 | } | ||
24388 | pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( | ||
24389 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24390 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
24391 | container:DefinedElement) | ||
24392 | { | ||
24393 | find interpretation(problem,interpretation); | ||
24394 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24395 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
24396 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
24397 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); | ||
24398 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
24399 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); | ||
24400 | find mustInstanceOfFunctionalElement_class(problem,interpretation,container); | ||
24401 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
24402 | find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); | ||
24403 | find mustExist(problem, interpretation, container); | ||
24404 | neg find mustExist(problem, interpretation, newObject); | ||
24405 | } | ||
24406 | pattern createObject_FunctionalInterface_class( | ||
24407 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24408 | typeInterpretation:PartialComplexTypeInterpretation) | ||
24409 | { | ||
24410 | find interpretation(problem,interpretation); | ||
24411 | neg find hasElementInContainment(problem,interpretation); | ||
24412 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24413 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
24414 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
24415 | find mayExist(problem, interpretation, newObject); | ||
24416 | neg find mustExist(problem, interpretation, newObject); | ||
24417 | } | ||
24418 | pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
24419 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24420 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
24421 | container:DefinedElement) | ||
24422 | { | ||
24423 | find interpretation(problem,interpretation); | ||
24424 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24425 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
24426 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
24427 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
24428 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
24429 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
24430 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
24431 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
24432 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
24433 | find mustExist(problem, interpretation, container); | ||
24434 | neg find mustExist(problem, interpretation, newObject); | ||
24435 | } | ||
24436 | pattern createObject_FunctionalInput_class( | ||
24437 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24438 | typeInterpretation:PartialComplexTypeInterpretation) | ||
24439 | { | ||
24440 | find interpretation(problem,interpretation); | ||
24441 | neg find hasElementInContainment(problem,interpretation); | ||
24442 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24443 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
24444 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
24445 | find mayExist(problem, interpretation, newObject); | ||
24446 | neg find mustExist(problem, interpretation, newObject); | ||
24447 | } | ||
24448 | |||
24449 | ////////// | ||
24450 | // 4.2 Type refinement | ||
24451 | ////////// | ||
24452 | pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
24453 | find interpretation(problem,interpretation); | ||
24454 | PartialInterpretation.newElements(interpretation,element); | ||
24455 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
24456 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
24457 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
24458 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
24459 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
24460 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
24461 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
24462 | } | ||
24463 | pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
24464 | find interpretation(problem,interpretation); | ||
24465 | PartialInterpretation.newElements(interpretation,element); | ||
24466 | find mayInstanceOfFunction_class(problem,interpretation,element); | ||
24467 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
24468 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
24469 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
24470 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
24471 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
24472 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
24473 | } | ||
24474 | pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
24475 | find interpretation(problem,interpretation); | ||
24476 | PartialInterpretation.newElements(interpretation,element); | ||
24477 | find mayInstanceOfInformationLink_class(problem,interpretation,element); | ||
24478 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
24479 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
24480 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
24481 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
24482 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
24483 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
24484 | } | ||
24485 | pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
24486 | find interpretation(problem,interpretation); | ||
24487 | PartialInterpretation.newElements(interpretation,element); | ||
24488 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
24489 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
24490 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
24491 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
24492 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
24493 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
24494 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
24495 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
24496 | } | ||
24497 | pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
24498 | find interpretation(problem,interpretation); | ||
24499 | PartialInterpretation.newElements(interpretation,element); | ||
24500 | find mayInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
24501 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
24502 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
24503 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
24504 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
24505 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
24506 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
24507 | } | ||
24508 | pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
24509 | find interpretation(problem,interpretation); | ||
24510 | PartialInterpretation.newElements(interpretation,element); | ||
24511 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
24512 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
24513 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
24514 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
24515 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
24516 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
24517 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
24518 | } | ||
24519 | pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
24520 | find interpretation(problem,interpretation); | ||
24521 | PartialInterpretation.newElements(interpretation,element); | ||
24522 | find mayInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
24523 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
24524 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
24525 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
24526 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
24527 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
24528 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
24529 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
24530 | } | ||
24531 | |||
24532 | ////////// | ||
24533 | // 4.3 Relation refinement | ||
24534 | ////////// | ||
24535 | pattern refineRelation_model_reference_FunctionalElement( | ||
24536 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24537 | relationIterpretation:PartialRelationInterpretation, | ||
24538 | from: DefinedElement, to: DefinedElement) | ||
24539 | { | ||
24540 | find interpretation(problem,interpretation); | ||
24541 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
24542 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
24543 | find mustExist(problem, interpretation, from); | ||
24544 | find mustExist(problem, interpretation, to); | ||
24545 | find mustInstanceOfFunctionalElement_class(problem,interpretation,from); | ||
24546 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); | ||
24547 | find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
24548 | neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
24549 | } | ||
24550 | pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( | ||
24551 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24552 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
24553 | from: DefinedElement, to: DefinedElement) | ||
24554 | { | ||
24555 | find interpretation(problem,interpretation); | ||
24556 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
24557 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
24558 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
24559 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); | ||
24560 | find mustExist(problem, interpretation, from); | ||
24561 | find mustExist(problem, interpretation, to); | ||
24562 | find mustInstanceOfFunctionalInput_class(problem,interpretation,from); | ||
24563 | find mustInstanceOfInformationLink_class(problem,interpretation,to); | ||
24564 | find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
24565 | neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
24566 | } | ||
24567 | pattern refineRelation_type_attribute_Function( | ||
24568 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24569 | relationIterpretation:PartialRelationInterpretation, | ||
24570 | from: DefinedElement, to: DefinedElement) | ||
24571 | { | ||
24572 | find interpretation(problem,interpretation); | ||
24573 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
24574 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
24575 | find mustExist(problem, interpretation, from); | ||
24576 | find mustExist(problem, interpretation, to); | ||
24577 | find mustInstanceOfFunction_class(problem,interpretation,from); | ||
24578 | find mustInstanceOfFunctionType_enum(problem,interpretation,to); | ||
24579 | find mayInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
24580 | neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
24581 | } | ||
24582 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
24583 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
24584 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
24585 | |||
24586 | ////////// | ||
24587 | // 0. Util | ||
24588 | ////////// | ||
24589 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
24590 | PartialInterpretation.problem(interpretation,problem); | ||
24591 | } | ||
24592 | |||
24593 | ///////////////////////// | ||
24594 | // 0.1 Existence | ||
24595 | ///////////////////////// | ||
24596 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24597 | find interpretation(problem,interpretation); | ||
24598 | LogicProblem.elements(problem,element); | ||
24599 | } or { | ||
24600 | find interpretation(problem,interpretation); | ||
24601 | PartialInterpretation.newElements(interpretation,element); | ||
24602 | } | ||
24603 | |||
24604 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24605 | find mustExist(problem,interpretation,element); | ||
24606 | } or { | ||
24607 | find interpretation(problem,interpretation); | ||
24608 | neg find elementCloseWorld(element); | ||
24609 | PartialInterpretation.openWorldElements(interpretation,element); | ||
24610 | } | ||
24611 | |||
24612 | private pattern elementCloseWorld(element:DefinedElement) { | ||
24613 | PartialInterpretation.openWorldElements(i,element); | ||
24614 | PartialInterpretation.maxNewElements(i,0); | ||
24615 | } or { | ||
24616 | Scope.targetTypeInterpretation(scope,interpretation); | ||
24617 | PartialTypeInterpratation.elements(interpretation,element); | ||
24618 | Scope.maxNewElements(scope,0); | ||
24619 | } | ||
24620 | |||
24621 | //////////////////////// | ||
24622 | // 0.2 Equivalence | ||
24623 | //////////////////////// | ||
24624 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
24625 | find mayExist(problem,interpretation,a); | ||
24626 | find mayExist(problem,interpretation,b); | ||
24627 | a == b; | ||
24628 | } | ||
24629 | |||
24630 | //////////////////////// | ||
24631 | // 0.3 Required Patterns by TypeIndexer | ||
24632 | //////////////////////// | ||
24633 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
24634 | find interpretation(problem,interpretation); | ||
24635 | LogicProblem.types(problem,type); | ||
24636 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24637 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
24638 | } | ||
24639 | |||
24640 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
24641 | find interpretation(problem,interpretation); | ||
24642 | LogicProblem.types(problem,type); | ||
24643 | TypeDefinition.elements(type,element); | ||
24644 | } or { | ||
24645 | find interpretation(problem,interpretation); | ||
24646 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
24647 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
24648 | } | ||
24649 | |||
24650 | private pattern isPrimitive(element: PrimitiveElement) { | ||
24651 | PrimitiveElement(element); | ||
24652 | } | ||
24653 | |||
24654 | ////////// | ||
24655 | // 1. Problem-Specific Base Indexers | ||
24656 | ////////// | ||
24657 | // 1.1 Type Indexers | ||
24658 | ////////// | ||
24659 | // 1.1.1 primitive Type Indexers | ||
24660 | ////////// | ||
24661 | |||
24662 | ////////// | ||
24663 | // 1.1.2 domain-specific Type Indexers | ||
24664 | ////////// | ||
24665 | /** | ||
24666 | * An element must be an instance of type "FunctionalElement class". | ||
24667 | */ | ||
24668 | private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24669 | Type.name(type,"FunctionalElement class"); | ||
24670 | find directInstanceOf(problem,interpretation,element,type); | ||
24671 | } | ||
24672 | private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
24673 | find interpretation(problem,interpretation); | ||
24674 | PartialInterpretation.scopes(interpretation,scope); | ||
24675 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
24676 | Scope.maxNewElements(scope,0); | ||
24677 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
24678 | Type.name(type,"FunctionalElement class"); | ||
24679 | } | ||
24680 | |||
24681 | /** | ||
24682 | * An element may be an instance of type "FunctionalElement class". | ||
24683 | */ | ||
24684 | private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
24685 | { | ||
24686 | find interpretation(problem,interpretation); | ||
24687 | PartialInterpretation.newElements(interpretation,element); | ||
24688 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
24689 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
24690 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
24691 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
24692 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
24693 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
24694 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
24695 | neg find isPrimitive(element); | ||
24696 | } or { | ||
24697 | find interpretation(problem,interpretation); | ||
24698 | PartialInterpretation.openWorldElements(interpretation,element); | ||
24699 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
24700 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
24701 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
24702 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
24703 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
24704 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
24705 | neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); | ||
24706 | neg find isPrimitive(element); | ||
24707 | } or | ||
24708 | { find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } | ||
24709 | /** | ||
24710 | * An element must be an instance of type "FunctionalArchitectureModel class". | ||
24711 | */ | ||
24712 | private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24713 | Type.name(type,"FunctionalArchitectureModel class"); | ||
24714 | find directInstanceOf(problem,interpretation,element,type); | ||
24715 | } | ||
24716 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
24717 | find interpretation(problem,interpretation); | ||
24718 | PartialInterpretation.scopes(interpretation,scope); | ||
24719 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
24720 | Scope.maxNewElements(scope,0); | ||
24721 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
24722 | Type.name(type,"FunctionalArchitectureModel class"); | ||
24723 | } | ||
24724 | |||
24725 | /** | ||
24726 | * An element may be an instance of type "FunctionalArchitectureModel class". | ||
24727 | */ | ||
24728 | private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
24729 | { | ||
24730 | find interpretation(problem,interpretation); | ||
24731 | PartialInterpretation.newElements(interpretation,element); | ||
24732 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
24733 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
24734 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
24735 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
24736 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
24737 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
24738 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
24739 | neg find isPrimitive(element); | ||
24740 | } or { | ||
24741 | find interpretation(problem,interpretation); | ||
24742 | PartialInterpretation.openWorldElements(interpretation,element); | ||
24743 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
24744 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
24745 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
24746 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
24747 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
24748 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
24749 | neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); | ||
24750 | neg find isPrimitive(element); | ||
24751 | } or | ||
24752 | { find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } | ||
24753 | /** | ||
24754 | * An element must be an instance of type "Function class". | ||
24755 | */ | ||
24756 | private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24757 | Type.name(type,"Function class"); | ||
24758 | find directInstanceOf(problem,interpretation,element,type); | ||
24759 | } | ||
24760 | private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
24761 | find interpretation(problem,interpretation); | ||
24762 | PartialInterpretation.scopes(interpretation,scope); | ||
24763 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
24764 | Scope.maxNewElements(scope,0); | ||
24765 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
24766 | Type.name(type,"Function class"); | ||
24767 | } | ||
24768 | |||
24769 | /** | ||
24770 | * An element may be an instance of type "Function class". | ||
24771 | */ | ||
24772 | private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
24773 | { | ||
24774 | find interpretation(problem,interpretation); | ||
24775 | PartialInterpretation.newElements(interpretation,element); | ||
24776 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
24777 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
24778 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
24779 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
24780 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
24781 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
24782 | neg find isPrimitive(element); | ||
24783 | } or { | ||
24784 | find interpretation(problem,interpretation); | ||
24785 | PartialInterpretation.openWorldElements(interpretation,element); | ||
24786 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
24787 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
24788 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
24789 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
24790 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
24791 | neg find scopeDisallowsNewFunction_class(problem, interpretation); | ||
24792 | neg find isPrimitive(element); | ||
24793 | } or | ||
24794 | { find mustInstanceOfFunction_class(problem,interpretation,element); } | ||
24795 | /** | ||
24796 | * An element must be an instance of type "FAMTerminator class". | ||
24797 | */ | ||
24798 | private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24799 | Type.name(type,"FAMTerminator class"); | ||
24800 | find directInstanceOf(problem,interpretation,element,type); | ||
24801 | } | ||
24802 | private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
24803 | find interpretation(problem,interpretation); | ||
24804 | PartialInterpretation.scopes(interpretation,scope); | ||
24805 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
24806 | Scope.maxNewElements(scope,0); | ||
24807 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
24808 | Type.name(type,"FAMTerminator class"); | ||
24809 | } | ||
24810 | |||
24811 | /** | ||
24812 | * An element may be an instance of type "FAMTerminator class". | ||
24813 | */ | ||
24814 | private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
24815 | { | ||
24816 | find interpretation(problem,interpretation); | ||
24817 | PartialInterpretation.newElements(interpretation,element); | ||
24818 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
24819 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
24820 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
24821 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
24822 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
24823 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
24824 | neg find isPrimitive(element); | ||
24825 | } or { | ||
24826 | find interpretation(problem,interpretation); | ||
24827 | PartialInterpretation.openWorldElements(interpretation,element); | ||
24828 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
24829 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
24830 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
24831 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
24832 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
24833 | neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); | ||
24834 | neg find isPrimitive(element); | ||
24835 | } or | ||
24836 | { find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } | ||
24837 | /** | ||
24838 | * An element must be an instance of type "InformationLink class". | ||
24839 | */ | ||
24840 | private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24841 | Type.name(type,"InformationLink class"); | ||
24842 | find directInstanceOf(problem,interpretation,element,type); | ||
24843 | } | ||
24844 | private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
24845 | find interpretation(problem,interpretation); | ||
24846 | PartialInterpretation.scopes(interpretation,scope); | ||
24847 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
24848 | Scope.maxNewElements(scope,0); | ||
24849 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
24850 | Type.name(type,"InformationLink class"); | ||
24851 | } | ||
24852 | |||
24853 | /** | ||
24854 | * An element may be an instance of type "InformationLink class". | ||
24855 | */ | ||
24856 | private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
24857 | { | ||
24858 | find interpretation(problem,interpretation); | ||
24859 | PartialInterpretation.newElements(interpretation,element); | ||
24860 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
24861 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
24862 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
24863 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
24864 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
24865 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
24866 | neg find isPrimitive(element); | ||
24867 | } or { | ||
24868 | find interpretation(problem,interpretation); | ||
24869 | PartialInterpretation.openWorldElements(interpretation,element); | ||
24870 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
24871 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
24872 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
24873 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
24874 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
24875 | neg find scopeDisallowsNewInformationLink_class(problem, interpretation); | ||
24876 | neg find isPrimitive(element); | ||
24877 | } or | ||
24878 | { find mustInstanceOfInformationLink_class(problem,interpretation,element); } | ||
24879 | /** | ||
24880 | * An element must be an instance of type "FunctionalInterface class". | ||
24881 | */ | ||
24882 | private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24883 | Type.name(type,"FunctionalInterface class"); | ||
24884 | find directInstanceOf(problem,interpretation,element,type); | ||
24885 | } | ||
24886 | private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
24887 | find interpretation(problem,interpretation); | ||
24888 | PartialInterpretation.scopes(interpretation,scope); | ||
24889 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
24890 | Scope.maxNewElements(scope,0); | ||
24891 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
24892 | Type.name(type,"FunctionalInterface class"); | ||
24893 | } | ||
24894 | |||
24895 | /** | ||
24896 | * An element may be an instance of type "FunctionalInterface class". | ||
24897 | */ | ||
24898 | private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
24899 | { | ||
24900 | find interpretation(problem,interpretation); | ||
24901 | PartialInterpretation.newElements(interpretation,element); | ||
24902 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
24903 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
24904 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
24905 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
24906 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
24907 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
24908 | neg find isPrimitive(element); | ||
24909 | } or { | ||
24910 | find interpretation(problem,interpretation); | ||
24911 | PartialInterpretation.openWorldElements(interpretation,element); | ||
24912 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
24913 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
24914 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
24915 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
24916 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
24917 | neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); | ||
24918 | neg find isPrimitive(element); | ||
24919 | } or | ||
24920 | { find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } | ||
24921 | /** | ||
24922 | * An element must be an instance of type "FunctionalInput class". | ||
24923 | */ | ||
24924 | private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24925 | Type.name(type,"FunctionalInput class"); | ||
24926 | find directInstanceOf(problem,interpretation,element,type); | ||
24927 | } | ||
24928 | private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
24929 | find interpretation(problem,interpretation); | ||
24930 | PartialInterpretation.scopes(interpretation,scope); | ||
24931 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
24932 | Scope.maxNewElements(scope,0); | ||
24933 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
24934 | Type.name(type,"FunctionalInput class"); | ||
24935 | } | ||
24936 | |||
24937 | /** | ||
24938 | * An element may be an instance of type "FunctionalInput class". | ||
24939 | */ | ||
24940 | private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
24941 | { | ||
24942 | find interpretation(problem,interpretation); | ||
24943 | PartialInterpretation.newElements(interpretation,element); | ||
24944 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
24945 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
24946 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
24947 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
24948 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
24949 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
24950 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
24951 | neg find isPrimitive(element); | ||
24952 | } or { | ||
24953 | find interpretation(problem,interpretation); | ||
24954 | PartialInterpretation.openWorldElements(interpretation,element); | ||
24955 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
24956 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
24957 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
24958 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
24959 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
24960 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
24961 | neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); | ||
24962 | neg find isPrimitive(element); | ||
24963 | } or | ||
24964 | { find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } | ||
24965 | /** | ||
24966 | * An element must be an instance of type "FunctionalOutput class". | ||
24967 | */ | ||
24968 | private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24969 | Type.name(type,"FunctionalOutput class"); | ||
24970 | find directInstanceOf(problem,interpretation,element,type); | ||
24971 | } | ||
24972 | private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
24973 | find interpretation(problem,interpretation); | ||
24974 | PartialInterpretation.scopes(interpretation,scope); | ||
24975 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
24976 | Scope.maxNewElements(scope,0); | ||
24977 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
24978 | Type.name(type,"FunctionalOutput class"); | ||
24979 | } | ||
24980 | |||
24981 | /** | ||
24982 | * An element may be an instance of type "FunctionalOutput class". | ||
24983 | */ | ||
24984 | private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
24985 | { | ||
24986 | find interpretation(problem,interpretation); | ||
24987 | PartialInterpretation.newElements(interpretation,element); | ||
24988 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
24989 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
24990 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
24991 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
24992 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
24993 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
24994 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
24995 | neg find isPrimitive(element); | ||
24996 | } or { | ||
24997 | find interpretation(problem,interpretation); | ||
24998 | PartialInterpretation.openWorldElements(interpretation,element); | ||
24999 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
25000 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
25001 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
25002 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
25003 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
25004 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
25005 | neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); | ||
25006 | neg find isPrimitive(element); | ||
25007 | } or | ||
25008 | { find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } | ||
25009 | /** | ||
25010 | * An element must be an instance of type "FunctionalData class". | ||
25011 | */ | ||
25012 | private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
25013 | Type.name(type,"FunctionalData class"); | ||
25014 | find directInstanceOf(problem,interpretation,element,type); | ||
25015 | } | ||
25016 | private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
25017 | find interpretation(problem,interpretation); | ||
25018 | PartialInterpretation.scopes(interpretation,scope); | ||
25019 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
25020 | Scope.maxNewElements(scope,0); | ||
25021 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
25022 | Type.name(type,"FunctionalData class"); | ||
25023 | } | ||
25024 | |||
25025 | /** | ||
25026 | * An element may be an instance of type "FunctionalData class". | ||
25027 | */ | ||
25028 | private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
25029 | { | ||
25030 | find interpretation(problem,interpretation); | ||
25031 | PartialInterpretation.newElements(interpretation,element); | ||
25032 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
25033 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
25034 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
25035 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
25036 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
25037 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
25038 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
25039 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
25040 | neg find isPrimitive(element); | ||
25041 | } or { | ||
25042 | find interpretation(problem,interpretation); | ||
25043 | PartialInterpretation.openWorldElements(interpretation,element); | ||
25044 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
25045 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
25046 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
25047 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
25048 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
25049 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
25050 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
25051 | neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); | ||
25052 | neg find isPrimitive(element); | ||
25053 | } or | ||
25054 | { find mustInstanceOfFunctionalData_class(problem,interpretation,element); } | ||
25055 | /** | ||
25056 | * An element must be an instance of type "FunctionType enum". | ||
25057 | */ | ||
25058 | private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
25059 | Type.name(type,"FunctionType enum"); | ||
25060 | find directInstanceOf(problem,interpretation,element,type); | ||
25061 | } | ||
25062 | private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
25063 | find interpretation(problem,interpretation); | ||
25064 | PartialInterpretation.scopes(interpretation,scope); | ||
25065 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
25066 | Scope.maxNewElements(scope,0); | ||
25067 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
25068 | Type.name(type,"FunctionType enum"); | ||
25069 | } | ||
25070 | |||
25071 | /** | ||
25072 | * An element may be an instance of type "FunctionType enum". | ||
25073 | */ | ||
25074 | private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
25075 | { find mustInstanceOfFunctionType_enum(problem,interpretation,element); } | ||
25076 | /** | ||
25077 | * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
25078 | */ | ||
25079 | private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
25080 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
25081 | find directInstanceOf(problem,interpretation,element,type); | ||
25082 | } | ||
25083 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
25084 | find interpretation(problem,interpretation); | ||
25085 | PartialInterpretation.scopes(interpretation,scope); | ||
25086 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
25087 | Scope.maxNewElements(scope,0); | ||
25088 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
25089 | Type.name(type,"FunctionalArchitectureModel class DefinedPart"); | ||
25090 | } | ||
25091 | |||
25092 | /** | ||
25093 | * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". | ||
25094 | */ | ||
25095 | private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
25096 | { find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } | ||
25097 | /** | ||
25098 | * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
25099 | */ | ||
25100 | private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
25101 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
25102 | find directInstanceOf(problem,interpretation,element,type); | ||
25103 | } | ||
25104 | private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
25105 | find interpretation(problem,interpretation); | ||
25106 | PartialInterpretation.scopes(interpretation,scope); | ||
25107 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
25108 | Scope.maxNewElements(scope,0); | ||
25109 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
25110 | Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); | ||
25111 | } | ||
25112 | |||
25113 | /** | ||
25114 | * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". | ||
25115 | */ | ||
25116 | private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
25117 | { | ||
25118 | find interpretation(problem,interpretation); | ||
25119 | PartialInterpretation.newElements(interpretation,element); | ||
25120 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
25121 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
25122 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
25123 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
25124 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
25125 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
25126 | neg find isPrimitive(element); | ||
25127 | } or { | ||
25128 | find interpretation(problem,interpretation); | ||
25129 | PartialInterpretation.openWorldElements(interpretation,element); | ||
25130 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
25131 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
25132 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
25133 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
25134 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
25135 | neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); | ||
25136 | neg find isPrimitive(element); | ||
25137 | } or | ||
25138 | { find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } | ||
25139 | |||
25140 | ////////// | ||
25141 | // 1.2 Relation Declaration Indexers | ||
25142 | ////////// | ||
25143 | /** | ||
25144 | * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) | ||
25145 | */ | ||
25146 | private pattern mustInRelationinterface_reference_FunctionalElement( | ||
25147 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25148 | source: DefinedElement, target:DefinedElement) | ||
25149 | { | ||
25150 | find interpretation(problem,interpretation); | ||
25151 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
25152 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); | ||
25153 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
25154 | BinaryElementRelationLink.param1(link,source); | ||
25155 | BinaryElementRelationLink.param2(link,target); | ||
25156 | } | ||
25157 | /** | ||
25158 | * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) | ||
25159 | */ | ||
25160 | private pattern mayInRelationinterface_reference_FunctionalElement( | ||
25161 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25162 | source: DefinedElement, target:DefinedElement) | ||
25163 | { | ||
25164 | find interpretation(problem,interpretation); | ||
25165 | // The two endpoint of the link have to exist | ||
25166 | find mayExist(problem, interpretation, source); | ||
25167 | find mayExist(problem, interpretation, target); | ||
25168 | // Type consistency | ||
25169 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
25170 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
25171 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
25172 | // the upper bound of the multiplicity should be considered. | ||
25173 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); | ||
25174 | check(numberOfExistingReferences < 1); | ||
25175 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
25176 | // the upper bound of the opposite reference multiplicity should be considered. | ||
25177 | numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); | ||
25178 | check(numberOfExistingOppositeReferences < 1); | ||
25179 | // The reference is containment, then a new reference cannot be create if: | ||
25180 | // 1. Multiple parents | ||
25181 | neg find mustContains4(problem,interpretation,_,target); | ||
25182 | // 2. Circle in the containment hierarchy | ||
25183 | neg find mustTransitiveContains(source,target); | ||
25184 | } or { | ||
25185 | find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); | ||
25186 | } | ||
25187 | /** | ||
25188 | * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) | ||
25189 | */ | ||
25190 | private pattern mustInRelationmodel_reference_FunctionalElement( | ||
25191 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25192 | source: DefinedElement, target:DefinedElement) | ||
25193 | { | ||
25194 | find interpretation(problem,interpretation); | ||
25195 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
25196 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
25197 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
25198 | BinaryElementRelationLink.param1(link,source); | ||
25199 | BinaryElementRelationLink.param2(link,target); | ||
25200 | } | ||
25201 | /** | ||
25202 | * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target) | ||
25203 | */ | ||
25204 | private pattern mayInRelationmodel_reference_FunctionalElement( | ||
25205 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25206 | source: DefinedElement, target:DefinedElement) | ||
25207 | { | ||
25208 | find interpretation(problem,interpretation); | ||
25209 | // The two endpoint of the link have to exist | ||
25210 | find mayExist(problem, interpretation, source); | ||
25211 | find mayExist(problem, interpretation, target); | ||
25212 | // Type consistency | ||
25213 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
25214 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target); | ||
25215 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
25216 | // the upper bound of the multiplicity should be considered. | ||
25217 | numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_); | ||
25218 | check(numberOfExistingReferences < 1); | ||
25219 | } or { | ||
25220 | find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target); | ||
25221 | } | ||
25222 | /** | ||
25223 | * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) | ||
25224 | */ | ||
25225 | private pattern mustInRelationparent_reference_FunctionalElement( | ||
25226 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25227 | source: DefinedElement, target:DefinedElement) | ||
25228 | { | ||
25229 | find interpretation(problem,interpretation); | ||
25230 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
25231 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); | ||
25232 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
25233 | BinaryElementRelationLink.param1(link,source); | ||
25234 | BinaryElementRelationLink.param2(link,target); | ||
25235 | } | ||
25236 | /** | ||
25237 | * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) | ||
25238 | */ | ||
25239 | private pattern mayInRelationparent_reference_FunctionalElement( | ||
25240 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25241 | source: DefinedElement, target:DefinedElement) | ||
25242 | { | ||
25243 | find interpretation(problem,interpretation); | ||
25244 | // The two endpoint of the link have to exist | ||
25245 | find mayExist(problem, interpretation, source); | ||
25246 | find mayExist(problem, interpretation, target); | ||
25247 | // Type consistency | ||
25248 | find mayInstanceOfFunctionalElement_class(problem,interpretation,source); | ||
25249 | find mayInstanceOfFunction_class(problem,interpretation,target); | ||
25250 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
25251 | // the upper bound of the multiplicity should be considered. | ||
25252 | numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); | ||
25253 | check(numberOfExistingReferences < 1); | ||
25254 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
25255 | // 1. Multiple parents | ||
25256 | neg find mustContains4(problem,interpretation,source,_); | ||
25257 | // 2. Circle in the containment hierarchy | ||
25258 | neg find mustTransitiveContains(source,target); | ||
25259 | } or { | ||
25260 | find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); | ||
25261 | } | ||
25262 | /** | ||
25263 | * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) | ||
25264 | */ | ||
25265 | private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( | ||
25266 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25267 | source: DefinedElement, target:DefinedElement) | ||
25268 | { | ||
25269 | find interpretation(problem,interpretation); | ||
25270 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
25271 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
25272 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
25273 | BinaryElementRelationLink.param1(link,source); | ||
25274 | BinaryElementRelationLink.param2(link,target); | ||
25275 | } | ||
25276 | /** | ||
25277 | * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) | ||
25278 | */ | ||
25279 | private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( | ||
25280 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25281 | source: DefinedElement, target:DefinedElement) | ||
25282 | { | ||
25283 | find interpretation(problem,interpretation); | ||
25284 | // The two endpoint of the link have to exist | ||
25285 | find mayExist(problem, interpretation, source); | ||
25286 | find mayExist(problem, interpretation, target); | ||
25287 | // Type consistency | ||
25288 | find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); | ||
25289 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
25290 | // The reference is containment, then a new reference cannot be create if: | ||
25291 | // 1. Multiple parents | ||
25292 | neg find mustContains4(problem,interpretation,_,target); | ||
25293 | // 2. Circle in the containment hierarchy | ||
25294 | neg find mustTransitiveContains(source,target); | ||
25295 | } or { | ||
25296 | find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); | ||
25297 | } | ||
25298 | /** | ||
25299 | * Matcher for detecting tuples t where []subElements reference Function(source,target) | ||
25300 | */ | ||
25301 | private pattern mustInRelationsubElements_reference_Function( | ||
25302 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25303 | source: DefinedElement, target:DefinedElement) | ||
25304 | { | ||
25305 | find interpretation(problem,interpretation); | ||
25306 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
25307 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); | ||
25308 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
25309 | BinaryElementRelationLink.param1(link,source); | ||
25310 | BinaryElementRelationLink.param2(link,target); | ||
25311 | } | ||
25312 | /** | ||
25313 | * Matcher for detecting tuples t where <>subElements reference Function(source,target) | ||
25314 | */ | ||
25315 | private pattern mayInRelationsubElements_reference_Function( | ||
25316 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25317 | source: DefinedElement, target:DefinedElement) | ||
25318 | { | ||
25319 | find interpretation(problem,interpretation); | ||
25320 | // The two endpoint of the link have to exist | ||
25321 | find mayExist(problem, interpretation, source); | ||
25322 | find mayExist(problem, interpretation, target); | ||
25323 | // Type consistency | ||
25324 | find mayInstanceOfFunction_class(problem,interpretation,source); | ||
25325 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
25326 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
25327 | // the upper bound of the opposite reference multiplicity should be considered. | ||
25328 | numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); | ||
25329 | check(numberOfExistingOppositeReferences < 1); | ||
25330 | // The reference is containment, then a new reference cannot be create if: | ||
25331 | // 1. Multiple parents | ||
25332 | neg find mustContains4(problem,interpretation,_,target); | ||
25333 | // 2. Circle in the containment hierarchy | ||
25334 | neg find mustTransitiveContains(source,target); | ||
25335 | } or { | ||
25336 | find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); | ||
25337 | } | ||
25338 | /** | ||
25339 | * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) | ||
25340 | */ | ||
25341 | private pattern mustInRelationdata_reference_FAMTerminator( | ||
25342 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25343 | source: DefinedElement, target:DefinedElement) | ||
25344 | { | ||
25345 | find interpretation(problem,interpretation); | ||
25346 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
25347 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); | ||
25348 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
25349 | BinaryElementRelationLink.param1(link,source); | ||
25350 | BinaryElementRelationLink.param2(link,target); | ||
25351 | } | ||
25352 | /** | ||
25353 | * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) | ||
25354 | */ | ||
25355 | private pattern mayInRelationdata_reference_FAMTerminator( | ||
25356 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25357 | source: DefinedElement, target:DefinedElement) | ||
25358 | { | ||
25359 | find interpretation(problem,interpretation); | ||
25360 | // The two endpoint of the link have to exist | ||
25361 | find mayExist(problem, interpretation, source); | ||
25362 | find mayExist(problem, interpretation, target); | ||
25363 | // Type consistency | ||
25364 | find mayInstanceOfFAMTerminator_class(problem,interpretation,source); | ||
25365 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
25366 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
25367 | // the upper bound of the multiplicity should be considered. | ||
25368 | numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); | ||
25369 | check(numberOfExistingReferences < 1); | ||
25370 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
25371 | // the upper bound of the opposite reference multiplicity should be considered. | ||
25372 | numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); | ||
25373 | check(numberOfExistingOppositeReferences < 1); | ||
25374 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
25375 | // 1. Multiple parents | ||
25376 | neg find mustContains4(problem,interpretation,source,_); | ||
25377 | // 2. Circle in the containment hierarchy | ||
25378 | neg find mustTransitiveContains(source,target); | ||
25379 | } or { | ||
25380 | find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); | ||
25381 | } | ||
25382 | /** | ||
25383 | * Matcher for detecting tuples t where []from reference InformationLink(source,target) | ||
25384 | */ | ||
25385 | private pattern mustInRelationfrom_reference_InformationLink( | ||
25386 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25387 | source: DefinedElement, target:DefinedElement) | ||
25388 | { | ||
25389 | find interpretation(problem,interpretation); | ||
25390 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
25391 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); | ||
25392 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
25393 | BinaryElementRelationLink.param1(link,source); | ||
25394 | BinaryElementRelationLink.param2(link,target); | ||
25395 | } | ||
25396 | /** | ||
25397 | * Matcher for detecting tuples t where <>from reference InformationLink(source,target) | ||
25398 | */ | ||
25399 | private pattern mayInRelationfrom_reference_InformationLink( | ||
25400 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25401 | source: DefinedElement, target:DefinedElement) | ||
25402 | { | ||
25403 | find interpretation(problem,interpretation); | ||
25404 | // The two endpoint of the link have to exist | ||
25405 | find mayExist(problem, interpretation, source); | ||
25406 | find mayExist(problem, interpretation, target); | ||
25407 | // Type consistency | ||
25408 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
25409 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); | ||
25410 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
25411 | // the upper bound of the multiplicity should be considered. | ||
25412 | numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); | ||
25413 | check(numberOfExistingReferences < 1); | ||
25414 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
25415 | // 1. Multiple parents | ||
25416 | neg find mustContains4(problem,interpretation,source,_); | ||
25417 | // 2. Circle in the containment hierarchy | ||
25418 | neg find mustTransitiveContains(source,target); | ||
25419 | } or { | ||
25420 | find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); | ||
25421 | } | ||
25422 | /** | ||
25423 | * Matcher for detecting tuples t where []to reference InformationLink(source,target) | ||
25424 | */ | ||
25425 | private pattern mustInRelationto_reference_InformationLink( | ||
25426 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25427 | source: DefinedElement, target:DefinedElement) | ||
25428 | { | ||
25429 | find interpretation(problem,interpretation); | ||
25430 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
25431 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
25432 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
25433 | BinaryElementRelationLink.param1(link,source); | ||
25434 | BinaryElementRelationLink.param2(link,target); | ||
25435 | } | ||
25436 | /** | ||
25437 | * Matcher for detecting tuples t where <>to reference InformationLink(source,target) | ||
25438 | */ | ||
25439 | private pattern mayInRelationto_reference_InformationLink( | ||
25440 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25441 | source: DefinedElement, target:DefinedElement) | ||
25442 | { | ||
25443 | find interpretation(problem,interpretation); | ||
25444 | // The two endpoint of the link have to exist | ||
25445 | find mayExist(problem, interpretation, source); | ||
25446 | find mayExist(problem, interpretation, target); | ||
25447 | // Type consistency | ||
25448 | find mayInstanceOfInformationLink_class(problem,interpretation,source); | ||
25449 | find mayInstanceOfFunctionalInput_class(problem,interpretation,target); | ||
25450 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
25451 | // the upper bound of the multiplicity should be considered. | ||
25452 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); | ||
25453 | check(numberOfExistingReferences < 1); | ||
25454 | } or { | ||
25455 | find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); | ||
25456 | } | ||
25457 | /** | ||
25458 | * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) | ||
25459 | */ | ||
25460 | private pattern mustInRelationdata_reference_FunctionalInterface( | ||
25461 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25462 | source: DefinedElement, target:DefinedElement) | ||
25463 | { | ||
25464 | find interpretation(problem,interpretation); | ||
25465 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
25466 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); | ||
25467 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
25468 | BinaryElementRelationLink.param1(link,source); | ||
25469 | BinaryElementRelationLink.param2(link,target); | ||
25470 | } | ||
25471 | /** | ||
25472 | * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) | ||
25473 | */ | ||
25474 | private pattern mayInRelationdata_reference_FunctionalInterface( | ||
25475 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25476 | source: DefinedElement, target:DefinedElement) | ||
25477 | { | ||
25478 | find interpretation(problem,interpretation); | ||
25479 | // The two endpoint of the link have to exist | ||
25480 | find mayExist(problem, interpretation, source); | ||
25481 | find mayExist(problem, interpretation, target); | ||
25482 | // Type consistency | ||
25483 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
25484 | find mayInstanceOfFunctionalData_class(problem,interpretation,target); | ||
25485 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
25486 | // the upper bound of the opposite reference multiplicity should be considered. | ||
25487 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); | ||
25488 | check(numberOfExistingOppositeReferences < 1); | ||
25489 | // The reference is containment, then a new reference cannot be create if: | ||
25490 | // 1. Multiple parents | ||
25491 | neg find mustContains4(problem,interpretation,_,target); | ||
25492 | // 2. Circle in the containment hierarchy | ||
25493 | neg find mustTransitiveContains(source,target); | ||
25494 | } or { | ||
25495 | find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); | ||
25496 | } | ||
25497 | /** | ||
25498 | * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) | ||
25499 | */ | ||
25500 | private pattern mustInRelationelement_reference_FunctionalInterface( | ||
25501 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25502 | source: DefinedElement, target:DefinedElement) | ||
25503 | { | ||
25504 | find interpretation(problem,interpretation); | ||
25505 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
25506 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); | ||
25507 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
25508 | BinaryElementRelationLink.param1(link,source); | ||
25509 | BinaryElementRelationLink.param2(link,target); | ||
25510 | } | ||
25511 | /** | ||
25512 | * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) | ||
25513 | */ | ||
25514 | private pattern mayInRelationelement_reference_FunctionalInterface( | ||
25515 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25516 | source: DefinedElement, target:DefinedElement) | ||
25517 | { | ||
25518 | find interpretation(problem,interpretation); | ||
25519 | // The two endpoint of the link have to exist | ||
25520 | find mayExist(problem, interpretation, source); | ||
25521 | find mayExist(problem, interpretation, target); | ||
25522 | // Type consistency | ||
25523 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); | ||
25524 | find mayInstanceOfFunctionalElement_class(problem,interpretation,target); | ||
25525 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
25526 | // the upper bound of the multiplicity should be considered. | ||
25527 | numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); | ||
25528 | check(numberOfExistingReferences < 1); | ||
25529 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
25530 | // the upper bound of the opposite reference multiplicity should be considered. | ||
25531 | numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); | ||
25532 | check(numberOfExistingOppositeReferences < 1); | ||
25533 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
25534 | // 1. Multiple parents | ||
25535 | neg find mustContains4(problem,interpretation,source,_); | ||
25536 | // 2. Circle in the containment hierarchy | ||
25537 | neg find mustTransitiveContains(source,target); | ||
25538 | } or { | ||
25539 | find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); | ||
25540 | } | ||
25541 | /** | ||
25542 | * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) | ||
25543 | */ | ||
25544 | private pattern mustInRelationIncomingLinks_reference_FunctionalInput( | ||
25545 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25546 | source: DefinedElement, target:DefinedElement) | ||
25547 | { | ||
25548 | find interpretation(problem,interpretation); | ||
25549 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
25550 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
25551 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
25552 | BinaryElementRelationLink.param1(link,source); | ||
25553 | BinaryElementRelationLink.param2(link,target); | ||
25554 | } | ||
25555 | /** | ||
25556 | * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) | ||
25557 | */ | ||
25558 | private pattern mayInRelationIncomingLinks_reference_FunctionalInput( | ||
25559 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25560 | source: DefinedElement, target:DefinedElement) | ||
25561 | { | ||
25562 | find interpretation(problem,interpretation); | ||
25563 | // The two endpoint of the link have to exist | ||
25564 | find mayExist(problem, interpretation, source); | ||
25565 | find mayExist(problem, interpretation, target); | ||
25566 | // Type consistency | ||
25567 | find mayInstanceOfFunctionalInput_class(problem,interpretation,source); | ||
25568 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
25569 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
25570 | // the upper bound of the opposite reference multiplicity should be considered. | ||
25571 | numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); | ||
25572 | check(numberOfExistingOppositeReferences < 1); | ||
25573 | } or { | ||
25574 | find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); | ||
25575 | } | ||
25576 | /** | ||
25577 | * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) | ||
25578 | */ | ||
25579 | private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( | ||
25580 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25581 | source: DefinedElement, target:DefinedElement) | ||
25582 | { | ||
25583 | find interpretation(problem,interpretation); | ||
25584 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
25585 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); | ||
25586 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
25587 | BinaryElementRelationLink.param1(link,source); | ||
25588 | BinaryElementRelationLink.param2(link,target); | ||
25589 | } | ||
25590 | /** | ||
25591 | * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) | ||
25592 | */ | ||
25593 | private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( | ||
25594 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25595 | source: DefinedElement, target:DefinedElement) | ||
25596 | { | ||
25597 | find interpretation(problem,interpretation); | ||
25598 | // The two endpoint of the link have to exist | ||
25599 | find mayExist(problem, interpretation, source); | ||
25600 | find mayExist(problem, interpretation, target); | ||
25601 | // Type consistency | ||
25602 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); | ||
25603 | find mayInstanceOfInformationLink_class(problem,interpretation,target); | ||
25604 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
25605 | // the upper bound of the opposite reference multiplicity should be considered. | ||
25606 | numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); | ||
25607 | check(numberOfExistingOppositeReferences < 1); | ||
25608 | // The reference is containment, then a new reference cannot be create if: | ||
25609 | // 1. Multiple parents | ||
25610 | neg find mustContains4(problem,interpretation,_,target); | ||
25611 | // 2. Circle in the containment hierarchy | ||
25612 | neg find mustTransitiveContains(source,target); | ||
25613 | } or { | ||
25614 | find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); | ||
25615 | } | ||
25616 | /** | ||
25617 | * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) | ||
25618 | */ | ||
25619 | private pattern mustInRelationterminator_reference_FunctionalData( | ||
25620 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25621 | source: DefinedElement, target:DefinedElement) | ||
25622 | { | ||
25623 | find interpretation(problem,interpretation); | ||
25624 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
25625 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); | ||
25626 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
25627 | BinaryElementRelationLink.param1(link,source); | ||
25628 | BinaryElementRelationLink.param2(link,target); | ||
25629 | } | ||
25630 | /** | ||
25631 | * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) | ||
25632 | */ | ||
25633 | private pattern mayInRelationterminator_reference_FunctionalData( | ||
25634 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25635 | source: DefinedElement, target:DefinedElement) | ||
25636 | { | ||
25637 | find interpretation(problem,interpretation); | ||
25638 | // The two endpoint of the link have to exist | ||
25639 | find mayExist(problem, interpretation, source); | ||
25640 | find mayExist(problem, interpretation, target); | ||
25641 | // Type consistency | ||
25642 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
25643 | find mayInstanceOfFAMTerminator_class(problem,interpretation,target); | ||
25644 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
25645 | // the upper bound of the multiplicity should be considered. | ||
25646 | numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); | ||
25647 | check(numberOfExistingReferences < 1); | ||
25648 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
25649 | // the upper bound of the opposite reference multiplicity should be considered. | ||
25650 | numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); | ||
25651 | check(numberOfExistingOppositeReferences < 1); | ||
25652 | // The reference is containment, then a new reference cannot be create if: | ||
25653 | // 1. Multiple parents | ||
25654 | neg find mustContains4(problem,interpretation,_,target); | ||
25655 | // 2. Circle in the containment hierarchy | ||
25656 | neg find mustTransitiveContains(source,target); | ||
25657 | } or { | ||
25658 | find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); | ||
25659 | } | ||
25660 | /** | ||
25661 | * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) | ||
25662 | */ | ||
25663 | private pattern mustInRelationinterface_reference_FunctionalData( | ||
25664 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25665 | source: DefinedElement, target:DefinedElement) | ||
25666 | { | ||
25667 | find interpretation(problem,interpretation); | ||
25668 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
25669 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); | ||
25670 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
25671 | BinaryElementRelationLink.param1(link,source); | ||
25672 | BinaryElementRelationLink.param2(link,target); | ||
25673 | } | ||
25674 | /** | ||
25675 | * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) | ||
25676 | */ | ||
25677 | private pattern mayInRelationinterface_reference_FunctionalData( | ||
25678 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25679 | source: DefinedElement, target:DefinedElement) | ||
25680 | { | ||
25681 | find interpretation(problem,interpretation); | ||
25682 | // The two endpoint of the link have to exist | ||
25683 | find mayExist(problem, interpretation, source); | ||
25684 | find mayExist(problem, interpretation, target); | ||
25685 | // Type consistency | ||
25686 | find mayInstanceOfFunctionalData_class(problem,interpretation,source); | ||
25687 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); | ||
25688 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
25689 | // the upper bound of the multiplicity should be considered. | ||
25690 | numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); | ||
25691 | check(numberOfExistingReferences < 1); | ||
25692 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
25693 | // 1. Multiple parents | ||
25694 | neg find mustContains4(problem,interpretation,source,_); | ||
25695 | // 2. Circle in the containment hierarchy | ||
25696 | neg find mustTransitiveContains(source,target); | ||
25697 | } or { | ||
25698 | find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); | ||
25699 | } | ||
25700 | /** | ||
25701 | * Matcher for detecting tuples t where []type attribute Function(source,target) | ||
25702 | */ | ||
25703 | private pattern mustInRelationtype_attribute_Function( | ||
25704 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25705 | source: DefinedElement, target:DefinedElement) | ||
25706 | { | ||
25707 | find interpretation(problem,interpretation); | ||
25708 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
25709 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
25710 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
25711 | BinaryElementRelationLink.param1(link,source); | ||
25712 | BinaryElementRelationLink.param2(link,target); | ||
25713 | } | ||
25714 | /** | ||
25715 | * Matcher for detecting tuples t where <>type attribute Function(source,target) | ||
25716 | */ | ||
25717 | private pattern mayInRelationtype_attribute_Function( | ||
25718 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25719 | source: DefinedElement, target:DefinedElement) | ||
25720 | { | ||
25721 | find interpretation(problem,interpretation); | ||
25722 | // The two endpoint of the link have to exist | ||
25723 | find mayExist(problem, interpretation, source); | ||
25724 | find mayExist(problem, interpretation, target); | ||
25725 | // Type consistency | ||
25726 | find mayInstanceOfFunction_class(problem,interpretation,source); | ||
25727 | find mayInstanceOfFunctionType_enum(problem,interpretation,target); | ||
25728 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
25729 | // the upper bound of the multiplicity should be considered. | ||
25730 | numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_); | ||
25731 | check(numberOfExistingReferences < 1); | ||
25732 | } or { | ||
25733 | find mustInRelationtype_attribute_Function(problem,interpretation,source,target); | ||
25734 | } | ||
25735 | |||
25736 | ////////// | ||
25737 | // 1.3 Relation Definition Indexers | ||
25738 | ////////// | ||
25739 | |||
25740 | ////////// | ||
25741 | // 1.4 Containment Indexer | ||
25742 | ////////// | ||
25743 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
25744 | find mustContains4(_,_,source,target); | ||
25745 | } | ||
25746 | |||
25747 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
25748 | source: DefinedElement, target: DefinedElement) | ||
25749 | { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or | ||
25750 | |||
25751 | { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or | ||
25752 | |||
25753 | { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or | ||
25754 | |||
25755 | { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or | ||
25756 | |||
25757 | { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or | ||
25758 | |||
25759 | { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } | ||
25760 | |||
25761 | private pattern mustTransitiveContains(source,target) { | ||
25762 | find mustContains2+(source,target); | ||
25763 | } | ||
25764 | |||
25765 | ////////// | ||
25766 | // 2. Invalidation Indexers | ||
25767 | ////////// | ||
25768 | // 2.1 Invalidated by WF Queries | ||
25769 | ////////// | ||
25770 | |||
25771 | ////////// | ||
25772 | // 3. Unfinishedness Indexers | ||
25773 | ////////// | ||
25774 | // 3.1 Unfinishedness Measured by Multiplicity | ||
25775 | ////////// | ||
25776 | pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
25777 | find interpretation(problem,interpretation); | ||
25778 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
25779 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
25780 | find mustInstanceOfFunctionalElement_class(problem,interpretation,object); | ||
25781 | numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_); | ||
25782 | check(numberOfExistingReferences < 1); | ||
25783 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
25784 | } | ||
25785 | pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
25786 | find interpretation(problem,interpretation); | ||
25787 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
25788 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); | ||
25789 | find mustInstanceOfInformationLink_class(problem,interpretation,object); | ||
25790 | numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); | ||
25791 | check(numberOfExistingReferences < 1); | ||
25792 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
25793 | } | ||
25794 | pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
25795 | find interpretation(problem,interpretation); | ||
25796 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
25797 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
25798 | find mustInstanceOfFunction_class(problem,interpretation,object); | ||
25799 | numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_); | ||
25800 | check(numberOfExistingReferences < 1); | ||
25801 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
25802 | } | ||
25803 | |||
25804 | ////////// | ||
25805 | // 3.2 Unfinishedness Measured by WF Queries | ||
25806 | ////////// | ||
25807 | |||
25808 | ////////// | ||
25809 | // 4. Refinement Indexers | ||
25810 | ////////// | ||
25811 | // 4.1 Object constructors | ||
25812 | ////////// | ||
25813 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
25814 | { | ||
25815 | find interpretation(problem,interpretation); | ||
25816 | find mustInstanceOfFunctionalData_class(problem,interpretation,root); | ||
25817 | find mustExist(problem, interpretation, root); | ||
25818 | }or{ | ||
25819 | find interpretation(problem,interpretation); | ||
25820 | find mustInstanceOfFunction_class(problem,interpretation,root); | ||
25821 | find mustExist(problem, interpretation, root); | ||
25822 | }or{ | ||
25823 | find interpretation(problem,interpretation); | ||
25824 | find mustInstanceOfInformationLink_class(problem,interpretation,root); | ||
25825 | find mustExist(problem, interpretation, root); | ||
25826 | }or{ | ||
25827 | find interpretation(problem,interpretation); | ||
25828 | find mustInstanceOfFunctionalElement_class(problem,interpretation,root); | ||
25829 | find mustExist(problem, interpretation, root); | ||
25830 | }or{ | ||
25831 | find interpretation(problem,interpretation); | ||
25832 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); | ||
25833 | find mustExist(problem, interpretation, root); | ||
25834 | }or{ | ||
25835 | find interpretation(problem,interpretation); | ||
25836 | find mustInstanceOfFunctionalInput_class(problem,interpretation,root); | ||
25837 | find mustExist(problem, interpretation, root); | ||
25838 | }or{ | ||
25839 | find interpretation(problem,interpretation); | ||
25840 | find mustInstanceOfFAMTerminator_class(problem,interpretation,root); | ||
25841 | find mustExist(problem, interpretation, root); | ||
25842 | }or{ | ||
25843 | find interpretation(problem,interpretation); | ||
25844 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); | ||
25845 | find mustExist(problem, interpretation, root); | ||
25846 | }or{ | ||
25847 | find interpretation(problem,interpretation); | ||
25848 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); | ||
25849 | find mustExist(problem, interpretation, root); | ||
25850 | }or{ | ||
25851 | find interpretation(problem,interpretation); | ||
25852 | find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); | ||
25853 | find mustExist(problem, interpretation, root); | ||
25854 | }or{ | ||
25855 | find interpretation(problem,interpretation); | ||
25856 | find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); | ||
25857 | find mustExist(problem, interpretation, root); | ||
25858 | } | ||
25859 | pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( | ||
25860 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25861 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
25862 | container:DefinedElement) | ||
25863 | { | ||
25864 | find interpretation(problem,interpretation); | ||
25865 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
25866 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
25867 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
25868 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); | ||
25869 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); | ||
25870 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
25871 | find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); | ||
25872 | find mustExist(problem, interpretation, container); | ||
25873 | neg find mustExist(problem, interpretation, newObject); | ||
25874 | } | ||
25875 | pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( | ||
25876 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25877 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
25878 | container:DefinedElement) | ||
25879 | { | ||
25880 | find interpretation(problem,interpretation); | ||
25881 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
25882 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
25883 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
25884 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); | ||
25885 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
25886 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); | ||
25887 | find mustInstanceOfFunction_class(problem,interpretation,container); | ||
25888 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
25889 | find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); | ||
25890 | find mustExist(problem, interpretation, container); | ||
25891 | neg find mustExist(problem, interpretation, newObject); | ||
25892 | } | ||
25893 | pattern createObject_Function_class( | ||
25894 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25895 | typeInterpretation:PartialComplexTypeInterpretation) | ||
25896 | { | ||
25897 | find interpretation(problem,interpretation); | ||
25898 | neg find hasElementInContainment(problem,interpretation); | ||
25899 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
25900 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); | ||
25901 | find mayInstanceOfFunction_class(problem,interpretation,newObject); | ||
25902 | find mayExist(problem, interpretation, newObject); | ||
25903 | neg find mustExist(problem, interpretation, newObject); | ||
25904 | } | ||
25905 | pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( | ||
25906 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25907 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
25908 | container:DefinedElement) | ||
25909 | { | ||
25910 | find interpretation(problem,interpretation); | ||
25911 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
25912 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
25913 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
25914 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); | ||
25915 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
25916 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); | ||
25917 | find mustInstanceOfFunctionalData_class(problem,interpretation,container); | ||
25918 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
25919 | find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); | ||
25920 | find mustExist(problem, interpretation, container); | ||
25921 | neg find mustExist(problem, interpretation, newObject); | ||
25922 | } | ||
25923 | pattern createObject_FAMTerminator_class( | ||
25924 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25925 | typeInterpretation:PartialComplexTypeInterpretation) | ||
25926 | { | ||
25927 | find interpretation(problem,interpretation); | ||
25928 | neg find hasElementInContainment(problem,interpretation); | ||
25929 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
25930 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); | ||
25931 | find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); | ||
25932 | find mayExist(problem, interpretation, newObject); | ||
25933 | neg find mustExist(problem, interpretation, newObject); | ||
25934 | } | ||
25935 | pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
25936 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25937 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
25938 | container:DefinedElement) | ||
25939 | { | ||
25940 | find interpretation(problem,interpretation); | ||
25941 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
25942 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
25943 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
25944 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
25945 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
25946 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
25947 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
25948 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
25949 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
25950 | find mustExist(problem, interpretation, container); | ||
25951 | neg find mustExist(problem, interpretation, newObject); | ||
25952 | } | ||
25953 | pattern createObject_FunctionalOutput_class( | ||
25954 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25955 | typeInterpretation:PartialComplexTypeInterpretation) | ||
25956 | { | ||
25957 | find interpretation(problem,interpretation); | ||
25958 | neg find hasElementInContainment(problem,interpretation); | ||
25959 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
25960 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); | ||
25961 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); | ||
25962 | find mayExist(problem, interpretation, newObject); | ||
25963 | neg find mustExist(problem, interpretation, newObject); | ||
25964 | } | ||
25965 | pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( | ||
25966 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25967 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
25968 | container:DefinedElement) | ||
25969 | { | ||
25970 | find interpretation(problem,interpretation); | ||
25971 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
25972 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
25973 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
25974 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); | ||
25975 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
25976 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); | ||
25977 | find mustInstanceOfFunctionalElement_class(problem,interpretation,container); | ||
25978 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
25979 | find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); | ||
25980 | find mustExist(problem, interpretation, container); | ||
25981 | neg find mustExist(problem, interpretation, newObject); | ||
25982 | } | ||
25983 | pattern createObject_FunctionalInterface_class( | ||
25984 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25985 | typeInterpretation:PartialComplexTypeInterpretation) | ||
25986 | { | ||
25987 | find interpretation(problem,interpretation); | ||
25988 | neg find hasElementInContainment(problem,interpretation); | ||
25989 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
25990 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); | ||
25991 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); | ||
25992 | find mayExist(problem, interpretation, newObject); | ||
25993 | neg find mustExist(problem, interpretation, newObject); | ||
25994 | } | ||
25995 | pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( | ||
25996 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
25997 | typeInterpretation:PartialComplexTypeInterpretation) | ||
25998 | { | ||
25999 | find interpretation(problem,interpretation); | ||
26000 | neg find hasElementInContainment(problem,interpretation); | ||
26001 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
26002 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); | ||
26003 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); | ||
26004 | find mayExist(problem, interpretation, newObject); | ||
26005 | neg find mustExist(problem, interpretation, newObject); | ||
26006 | } | ||
26007 | pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( | ||
26008 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
26009 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
26010 | container:DefinedElement) | ||
26011 | { | ||
26012 | find interpretation(problem,interpretation); | ||
26013 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
26014 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
26015 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
26016 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); | ||
26017 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
26018 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); | ||
26019 | find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); | ||
26020 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
26021 | find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); | ||
26022 | find mustExist(problem, interpretation, container); | ||
26023 | neg find mustExist(problem, interpretation, newObject); | ||
26024 | } | ||
26025 | pattern createObject_FunctionalInput_class( | ||
26026 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
26027 | typeInterpretation:PartialComplexTypeInterpretation) | ||
26028 | { | ||
26029 | find interpretation(problem,interpretation); | ||
26030 | neg find hasElementInContainment(problem,interpretation); | ||
26031 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
26032 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); | ||
26033 | find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); | ||
26034 | find mayExist(problem, interpretation, newObject); | ||
26035 | neg find mustExist(problem, interpretation, newObject); | ||
26036 | } | ||
26037 | pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( | ||
26038 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
26039 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
26040 | container:DefinedElement) | ||
26041 | { | ||
26042 | find interpretation(problem,interpretation); | ||
26043 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
26044 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
26045 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
26046 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); | ||
26047 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
26048 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); | ||
26049 | find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); | ||
26050 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
26051 | find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); | ||
26052 | find mustExist(problem, interpretation, container); | ||
26053 | neg find mustExist(problem, interpretation, newObject); | ||
26054 | } | ||
26055 | pattern createObject_InformationLink_class( | ||
26056 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
26057 | typeInterpretation:PartialComplexTypeInterpretation) | ||
26058 | { | ||
26059 | find interpretation(problem,interpretation); | ||
26060 | neg find hasElementInContainment(problem,interpretation); | ||
26061 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
26062 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); | ||
26063 | find mayInstanceOfInformationLink_class(problem,interpretation,newObject); | ||
26064 | find mayExist(problem, interpretation, newObject); | ||
26065 | neg find mustExist(problem, interpretation, newObject); | ||
26066 | } | ||
26067 | |||
26068 | ////////// | ||
26069 | // 4.2 Type refinement | ||
26070 | ////////// | ||
26071 | pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
26072 | find interpretation(problem,interpretation); | ||
26073 | PartialInterpretation.newElements(interpretation,element); | ||
26074 | find mayInstanceOfFunction_class(problem,interpretation,element); | ||
26075 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
26076 | neg find mustInstanceOfFunction_class(problem,interpretation,element); | ||
26077 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
26078 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
26079 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
26080 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
26081 | } | ||
26082 | pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
26083 | find interpretation(problem,interpretation); | ||
26084 | PartialInterpretation.newElements(interpretation,element); | ||
26085 | find mayInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
26086 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
26087 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
26088 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
26089 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
26090 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
26091 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
26092 | } | ||
26093 | pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
26094 | find interpretation(problem,interpretation); | ||
26095 | PartialInterpretation.newElements(interpretation,element); | ||
26096 | find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
26097 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
26098 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
26099 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
26100 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
26101 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
26102 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
26103 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
26104 | } | ||
26105 | pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
26106 | find interpretation(problem,interpretation); | ||
26107 | PartialInterpretation.newElements(interpretation,element); | ||
26108 | find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
26109 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
26110 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
26111 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
26112 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
26113 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
26114 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
26115 | } | ||
26116 | pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
26117 | find interpretation(problem,interpretation); | ||
26118 | PartialInterpretation.newElements(interpretation,element); | ||
26119 | find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
26120 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
26121 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
26122 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
26123 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
26124 | neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); | ||
26125 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
26126 | } | ||
26127 | pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
26128 | find interpretation(problem,interpretation); | ||
26129 | PartialInterpretation.newElements(interpretation,element); | ||
26130 | find mayInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
26131 | neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); | ||
26132 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
26133 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
26134 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
26135 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
26136 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
26137 | neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); | ||
26138 | } | ||
26139 | pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
26140 | find interpretation(problem,interpretation); | ||
26141 | PartialInterpretation.newElements(interpretation,element); | ||
26142 | find mayInstanceOfInformationLink_class(problem,interpretation,element); | ||
26143 | neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); | ||
26144 | neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); | ||
26145 | neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); | ||
26146 | neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); | ||
26147 | neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); | ||
26148 | neg find mustInstanceOfInformationLink_class(problem,interpretation,element); | ||
26149 | } | ||
26150 | |||
26151 | ////////// | ||
26152 | // 4.3 Relation refinement | ||
26153 | ////////// | ||
26154 | pattern refineRelation_model_reference_FunctionalElement( | ||
26155 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
26156 | relationIterpretation:PartialRelationInterpretation, | ||
26157 | from: DefinedElement, to: DefinedElement) | ||
26158 | { | ||
26159 | find interpretation(problem,interpretation); | ||
26160 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
26161 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); | ||
26162 | find mustExist(problem, interpretation, from); | ||
26163 | find mustExist(problem, interpretation, to); | ||
26164 | find mustInstanceOfFunctionalElement_class(problem,interpretation,from); | ||
26165 | find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); | ||
26166 | find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
26167 | neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); | ||
26168 | } | ||
26169 | pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( | ||
26170 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
26171 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
26172 | from: DefinedElement, to: DefinedElement) | ||
26173 | { | ||
26174 | find interpretation(problem,interpretation); | ||
26175 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
26176 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); | ||
26177 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
26178 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); | ||
26179 | find mustExist(problem, interpretation, from); | ||
26180 | find mustExist(problem, interpretation, to); | ||
26181 | find mustInstanceOfFunctionalInput_class(problem,interpretation,from); | ||
26182 | find mustInstanceOfInformationLink_class(problem,interpretation,to); | ||
26183 | find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
26184 | neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); | ||
26185 | } | ||
26186 | pattern refineRelation_type_attribute_Function( | ||
26187 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
26188 | relationIterpretation:PartialRelationInterpretation, | ||
26189 | from: DefinedElement, to: DefinedElement) | ||
26190 | { | ||
26191 | find interpretation(problem,interpretation); | ||
26192 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
26193 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); | ||
26194 | find mustExist(problem, interpretation, from); | ||
26195 | find mustExist(problem, interpretation, to); | ||
26196 | find mustInstanceOfFunction_class(problem,interpretation,from); | ||
26197 | find mustInstanceOfFunctionType_enum(problem,interpretation,to); | ||
26198 | find mayInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
26199 | neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); | ||
26200 | } | ||
26201 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
26202 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
26203 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
26204 | |||
26205 | ////////// | ||
26206 | // 0. Util | ||
26207 | ////////// | ||
26208 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
26209 | PartialInterpretation.problem(interpretation,problem); | ||
26210 | } | ||
26211 | |||
26212 | ///////////////////////// | ||
26213 | // 0.1 Existence | ||
26214 | ///////////////////////// | ||
26215 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
26216 | find interpretation(problem,interpretation); | ||
26217 | LogicProblem.elements(problem,element); | ||
26218 | } or { | ||
26219 | find interpretation(problem,interpretation); | ||
26220 | PartialInterpretation.newElements(interpretation,element); | ||
26221 | } | ||
26222 | |||
26223 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
26224 | find mustExist(problem,interpretation,element); | ||
26225 | } or { | ||
26226 | find interpretation(problem,interpretation); | ||
26227 | neg find elementCloseWorld(element); | ||
26228 | PartialInterpretation.openWorldElements(interpretation,element); | ||
26229 | } | ||
26230 | |||
26231 | private pattern elementCloseWorld(element:DefinedElement) { | ||
26232 | PartialInterpretation.openWorldElements(i,element); | ||
26233 | PartialInterpretation.maxNewElements(i,0); | ||
26234 | } or { | ||
26235 | Scope.targetTypeInterpretation(scope,interpretation); | ||
26236 | PartialTypeInterpratation.elements(interpretation,element); | ||
26237 | Scope.maxNewElements(scope,0); | ||
26238 | } | ||
26239 | |||
26240 | //////////////////////// | ||
26241 | // 0.2 Equivalence | ||
26242 | //////////////////////// | ||
26243 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
26244 | find mayExist(problem,interpretation,a); | ||
26245 | find mayExist(problem,interpretation,b); | ||
26246 | a == b; | ||
26247 | } | ||
26248 | |||
26249 | //////////////////////// | ||
26250 | // 0.3 Required Patterns by TypeIndexer | ||
26251 | //////////////////////// | ||
26252 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
26253 | find interpretation(problem,interpretation); | ||
26254 | LogicProblem.types(problem,type); | ||
26255 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
26256 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
26257 | } | ||
26258 | |||
26259 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
26260 | find interpretation(problem,interpretation); | ||
26261 | LogicProblem.types(problem,type); | ||
26262 | TypeDefinition.elements(type,element); | ||
26263 | } or { | ||
26264 | find interpretation(problem,interpretation); | ||
26265 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
26266 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
26267 | } | ||
26268 | |||
26269 | private pattern isPrimitive(element: PrimitiveElement) { | ||
26270 | PrimitiveElement(element); | ||
26271 | } | ||
26272 | |||
26273 | ////////// | ||
26274 | // 1. Problem-Specific Base Indexers | ||
26275 | ////////// | ||
26276 | // 1.1 Type Indexers | ||
26277 | ////////// | ||
26278 | // 1.1.1 primitive Type Indexers | ||
26279 | ////////// | ||
26280 | |||
26281 | ////////// | ||
26282 | // 1.1.2 domain-specific Type Indexers | ||
26283 | ////////// | ||
26284 | /** | ||
26285 | * An element must be an instance of type "EAttribute class". | ||
26286 | */ | ||
26287 | private pattern mustInstanceOfEAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
26288 | Type.name(type,"EAttribute class"); | ||
26289 | find directInstanceOf(problem,interpretation,element,type); | ||
26290 | } | ||
26291 | private pattern scopeDisallowsNewEAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
26292 | find interpretation(problem,interpretation); | ||
26293 | PartialInterpretation.scopes(interpretation,scope); | ||
26294 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
26295 | Scope.maxNewElements(scope,0); | ||
26296 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
26297 | Type.name(type,"EAttribute class"); | ||
26298 | } | ||
26299 | |||
26300 | /** | ||
26301 | * An element may be an instance of type "EAttribute class". | ||
26302 | */ | ||
26303 | private pattern mayInstanceOfEAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
26304 | { | ||
26305 | find interpretation(problem,interpretation); | ||
26306 | PartialInterpretation.newElements(interpretation,element); | ||
26307 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26308 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
26309 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
26310 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26311 | neg find mustInstanceOfEOperation_class(problem,interpretation,element); | ||
26312 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
26313 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
26314 | neg find mustInstanceOfEReference_class(problem,interpretation,element); | ||
26315 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26316 | neg find mustInstanceOfEParameter_class(problem,interpretation,element); | ||
26317 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
26318 | neg find scopeDisallowsNewEAttribute_class(problem, interpretation); | ||
26319 | neg find isPrimitive(element); | ||
26320 | } or { | ||
26321 | find interpretation(problem,interpretation); | ||
26322 | PartialInterpretation.openWorldElements(interpretation,element); | ||
26323 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26324 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
26325 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
26326 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26327 | neg find mustInstanceOfEOperation_class(problem,interpretation,element); | ||
26328 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
26329 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
26330 | neg find mustInstanceOfEReference_class(problem,interpretation,element); | ||
26331 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26332 | neg find mustInstanceOfEParameter_class(problem,interpretation,element); | ||
26333 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
26334 | neg find scopeDisallowsNewEAttribute_class(problem, interpretation); | ||
26335 | neg find isPrimitive(element); | ||
26336 | } or | ||
26337 | { find mustInstanceOfEAttribute_class(problem,interpretation,element); } | ||
26338 | /** | ||
26339 | * An element must be an instance of type "EAnnotation class". | ||
26340 | */ | ||
26341 | private pattern mustInstanceOfEAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
26342 | Type.name(type,"EAnnotation class"); | ||
26343 | find directInstanceOf(problem,interpretation,element,type); | ||
26344 | } | ||
26345 | private pattern scopeDisallowsNewEAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
26346 | find interpretation(problem,interpretation); | ||
26347 | PartialInterpretation.scopes(interpretation,scope); | ||
26348 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
26349 | Scope.maxNewElements(scope,0); | ||
26350 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
26351 | Type.name(type,"EAnnotation class"); | ||
26352 | } | ||
26353 | |||
26354 | /** | ||
26355 | * An element may be an instance of type "EAnnotation class". | ||
26356 | */ | ||
26357 | private pattern mayInstanceOfEAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
26358 | { | ||
26359 | find interpretation(problem,interpretation); | ||
26360 | PartialInterpretation.newElements(interpretation,element); | ||
26361 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26362 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26363 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26364 | neg find mustInstanceOfENamedElement_class(problem,interpretation,element); | ||
26365 | neg find scopeDisallowsNewEAnnotation_class(problem, interpretation); | ||
26366 | neg find isPrimitive(element); | ||
26367 | } or { | ||
26368 | find interpretation(problem,interpretation); | ||
26369 | PartialInterpretation.openWorldElements(interpretation,element); | ||
26370 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26371 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26372 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26373 | neg find mustInstanceOfENamedElement_class(problem,interpretation,element); | ||
26374 | neg find scopeDisallowsNewEAnnotation_class(problem, interpretation); | ||
26375 | neg find isPrimitive(element); | ||
26376 | } or | ||
26377 | { find mustInstanceOfEAnnotation_class(problem,interpretation,element); } | ||
26378 | /** | ||
26379 | * An element must be an instance of type "EClass class". | ||
26380 | */ | ||
26381 | private pattern mustInstanceOfEClass_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
26382 | Type.name(type,"EClass class"); | ||
26383 | find directInstanceOf(problem,interpretation,element,type); | ||
26384 | } | ||
26385 | private pattern scopeDisallowsNewEClass_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
26386 | find interpretation(problem,interpretation); | ||
26387 | PartialInterpretation.scopes(interpretation,scope); | ||
26388 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
26389 | Scope.maxNewElements(scope,0); | ||
26390 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
26391 | Type.name(type,"EClass class"); | ||
26392 | } | ||
26393 | |||
26394 | /** | ||
26395 | * An element may be an instance of type "EClass class". | ||
26396 | */ | ||
26397 | private pattern mayInstanceOfEClass_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
26398 | { | ||
26399 | find interpretation(problem,interpretation); | ||
26400 | PartialInterpretation.newElements(interpretation,element); | ||
26401 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26402 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
26403 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
26404 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26405 | neg find mustInstanceOfEDataType_class(problem,interpretation,element); | ||
26406 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
26407 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
26408 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26409 | neg find mustInstanceOfETypedElement_class(problem,interpretation,element); | ||
26410 | neg find scopeDisallowsNewEClass_class(problem, interpretation); | ||
26411 | neg find isPrimitive(element); | ||
26412 | } or { | ||
26413 | find interpretation(problem,interpretation); | ||
26414 | PartialInterpretation.openWorldElements(interpretation,element); | ||
26415 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26416 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
26417 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
26418 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26419 | neg find mustInstanceOfEDataType_class(problem,interpretation,element); | ||
26420 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
26421 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
26422 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26423 | neg find mustInstanceOfETypedElement_class(problem,interpretation,element); | ||
26424 | neg find scopeDisallowsNewEClass_class(problem, interpretation); | ||
26425 | neg find isPrimitive(element); | ||
26426 | } or | ||
26427 | { find mustInstanceOfEClass_class(problem,interpretation,element); } | ||
26428 | /** | ||
26429 | * An element must be an instance of type "EClassifier class". | ||
26430 | */ | ||
26431 | private pattern mustInstanceOfEClassifier_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
26432 | Type.name(type,"EClassifier class"); | ||
26433 | find directInstanceOf(problem,interpretation,element,type); | ||
26434 | } | ||
26435 | private pattern scopeDisallowsNewEClassifier_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
26436 | find interpretation(problem,interpretation); | ||
26437 | PartialInterpretation.scopes(interpretation,scope); | ||
26438 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
26439 | Scope.maxNewElements(scope,0); | ||
26440 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
26441 | Type.name(type,"EClassifier class"); | ||
26442 | } | ||
26443 | |||
26444 | /** | ||
26445 | * An element may be an instance of type "EClassifier class". | ||
26446 | */ | ||
26447 | private pattern mayInstanceOfEClassifier_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
26448 | { | ||
26449 | find interpretation(problem,interpretation); | ||
26450 | PartialInterpretation.newElements(interpretation,element); | ||
26451 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26452 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
26453 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
26454 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26455 | neg find mustInstanceOfEDataType_class(problem,interpretation,element); | ||
26456 | neg find mustInstanceOfEClass_class(problem,interpretation,element); | ||
26457 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
26458 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
26459 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26460 | neg find mustInstanceOfETypedElement_class(problem,interpretation,element); | ||
26461 | neg find scopeDisallowsNewEClassifier_class(problem, interpretation); | ||
26462 | neg find isPrimitive(element); | ||
26463 | } or { | ||
26464 | find interpretation(problem,interpretation); | ||
26465 | PartialInterpretation.openWorldElements(interpretation,element); | ||
26466 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26467 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
26468 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
26469 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26470 | neg find mustInstanceOfEDataType_class(problem,interpretation,element); | ||
26471 | neg find mustInstanceOfEClass_class(problem,interpretation,element); | ||
26472 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
26473 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
26474 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26475 | neg find mustInstanceOfETypedElement_class(problem,interpretation,element); | ||
26476 | neg find scopeDisallowsNewEClassifier_class(problem, interpretation); | ||
26477 | neg find isPrimitive(element); | ||
26478 | } or | ||
26479 | { find mustInstanceOfEClassifier_class(problem,interpretation,element); } | ||
26480 | /** | ||
26481 | * An element must be an instance of type "EDataType class". | ||
26482 | */ | ||
26483 | private pattern mustInstanceOfEDataType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
26484 | Type.name(type,"EDataType class"); | ||
26485 | find directInstanceOf(problem,interpretation,element,type); | ||
26486 | } | ||
26487 | private pattern scopeDisallowsNewEDataType_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
26488 | find interpretation(problem,interpretation); | ||
26489 | PartialInterpretation.scopes(interpretation,scope); | ||
26490 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
26491 | Scope.maxNewElements(scope,0); | ||
26492 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
26493 | Type.name(type,"EDataType class"); | ||
26494 | } | ||
26495 | |||
26496 | /** | ||
26497 | * An element may be an instance of type "EDataType class". | ||
26498 | */ | ||
26499 | private pattern mayInstanceOfEDataType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
26500 | { | ||
26501 | find interpretation(problem,interpretation); | ||
26502 | PartialInterpretation.newElements(interpretation,element); | ||
26503 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26504 | neg find mustInstanceOfEEnum_class(problem,interpretation,element); | ||
26505 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
26506 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
26507 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26508 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
26509 | neg find mustInstanceOfEClass_class(problem,interpretation,element); | ||
26510 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
26511 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26512 | neg find mustInstanceOfETypedElement_class(problem,interpretation,element); | ||
26513 | neg find scopeDisallowsNewEDataType_class(problem, interpretation); | ||
26514 | neg find isPrimitive(element); | ||
26515 | } or { | ||
26516 | find interpretation(problem,interpretation); | ||
26517 | PartialInterpretation.openWorldElements(interpretation,element); | ||
26518 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26519 | neg find mustInstanceOfEEnum_class(problem,interpretation,element); | ||
26520 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
26521 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
26522 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26523 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
26524 | neg find mustInstanceOfEClass_class(problem,interpretation,element); | ||
26525 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
26526 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26527 | neg find mustInstanceOfETypedElement_class(problem,interpretation,element); | ||
26528 | neg find scopeDisallowsNewEDataType_class(problem, interpretation); | ||
26529 | neg find isPrimitive(element); | ||
26530 | } or | ||
26531 | { find mustInstanceOfEDataType_class(problem,interpretation,element); } | ||
26532 | /** | ||
26533 | * An element must be an instance of type "EEnum class". | ||
26534 | */ | ||
26535 | private pattern mustInstanceOfEEnum_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
26536 | Type.name(type,"EEnum class"); | ||
26537 | find directInstanceOf(problem,interpretation,element,type); | ||
26538 | } | ||
26539 | private pattern scopeDisallowsNewEEnum_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
26540 | find interpretation(problem,interpretation); | ||
26541 | PartialInterpretation.scopes(interpretation,scope); | ||
26542 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
26543 | Scope.maxNewElements(scope,0); | ||
26544 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
26545 | Type.name(type,"EEnum class"); | ||
26546 | } | ||
26547 | |||
26548 | /** | ||
26549 | * An element may be an instance of type "EEnum class". | ||
26550 | */ | ||
26551 | private pattern mayInstanceOfEEnum_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
26552 | { | ||
26553 | find interpretation(problem,interpretation); | ||
26554 | PartialInterpretation.newElements(interpretation,element); | ||
26555 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26556 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
26557 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
26558 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26559 | neg find mustInstanceOfEClass_class(problem,interpretation,element); | ||
26560 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
26561 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
26562 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26563 | neg find mustInstanceOfETypedElement_class(problem,interpretation,element); | ||
26564 | neg find scopeDisallowsNewEEnum_class(problem, interpretation); | ||
26565 | neg find isPrimitive(element); | ||
26566 | } or { | ||
26567 | find interpretation(problem,interpretation); | ||
26568 | PartialInterpretation.openWorldElements(interpretation,element); | ||
26569 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26570 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
26571 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
26572 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26573 | neg find mustInstanceOfEClass_class(problem,interpretation,element); | ||
26574 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
26575 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
26576 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26577 | neg find mustInstanceOfETypedElement_class(problem,interpretation,element); | ||
26578 | neg find scopeDisallowsNewEEnum_class(problem, interpretation); | ||
26579 | neg find isPrimitive(element); | ||
26580 | } or | ||
26581 | { find mustInstanceOfEEnum_class(problem,interpretation,element); } | ||
26582 | /** | ||
26583 | * An element must be an instance of type "EEnumLiteral class". | ||
26584 | */ | ||
26585 | private pattern mustInstanceOfEEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
26586 | Type.name(type,"EEnumLiteral class"); | ||
26587 | find directInstanceOf(problem,interpretation,element,type); | ||
26588 | } | ||
26589 | private pattern scopeDisallowsNewEEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
26590 | find interpretation(problem,interpretation); | ||
26591 | PartialInterpretation.scopes(interpretation,scope); | ||
26592 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
26593 | Scope.maxNewElements(scope,0); | ||
26594 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
26595 | Type.name(type,"EEnumLiteral class"); | ||
26596 | } | ||
26597 | |||
26598 | /** | ||
26599 | * An element may be an instance of type "EEnumLiteral class". | ||
26600 | */ | ||
26601 | private pattern mayInstanceOfEEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
26602 | { | ||
26603 | find interpretation(problem,interpretation); | ||
26604 | PartialInterpretation.newElements(interpretation,element); | ||
26605 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26606 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
26607 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26608 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
26609 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
26610 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26611 | neg find mustInstanceOfETypedElement_class(problem,interpretation,element); | ||
26612 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
26613 | neg find scopeDisallowsNewEEnumLiteral_class(problem, interpretation); | ||
26614 | neg find isPrimitive(element); | ||
26615 | } or { | ||
26616 | find interpretation(problem,interpretation); | ||
26617 | PartialInterpretation.openWorldElements(interpretation,element); | ||
26618 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26619 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
26620 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26621 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
26622 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
26623 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26624 | neg find mustInstanceOfETypedElement_class(problem,interpretation,element); | ||
26625 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
26626 | neg find scopeDisallowsNewEEnumLiteral_class(problem, interpretation); | ||
26627 | neg find isPrimitive(element); | ||
26628 | } or | ||
26629 | { find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); } | ||
26630 | /** | ||
26631 | * An element must be an instance of type "EModelElement class". | ||
26632 | */ | ||
26633 | private pattern mustInstanceOfEModelElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
26634 | Type.name(type,"EModelElement class"); | ||
26635 | find directInstanceOf(problem,interpretation,element,type); | ||
26636 | } | ||
26637 | private pattern scopeDisallowsNewEModelElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
26638 | find interpretation(problem,interpretation); | ||
26639 | PartialInterpretation.scopes(interpretation,scope); | ||
26640 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
26641 | Scope.maxNewElements(scope,0); | ||
26642 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
26643 | Type.name(type,"EModelElement class"); | ||
26644 | } | ||
26645 | |||
26646 | /** | ||
26647 | * An element may be an instance of type "EModelElement class". | ||
26648 | */ | ||
26649 | private pattern mayInstanceOfEModelElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
26650 | { | ||
26651 | find interpretation(problem,interpretation); | ||
26652 | PartialInterpretation.newElements(interpretation,element); | ||
26653 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26654 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26655 | neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); | ||
26656 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26657 | neg find mustInstanceOfENamedElement_class(problem,interpretation,element); | ||
26658 | neg find scopeDisallowsNewEModelElement_class(problem, interpretation); | ||
26659 | neg find isPrimitive(element); | ||
26660 | } or { | ||
26661 | find interpretation(problem,interpretation); | ||
26662 | PartialInterpretation.openWorldElements(interpretation,element); | ||
26663 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26664 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26665 | neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); | ||
26666 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26667 | neg find mustInstanceOfENamedElement_class(problem,interpretation,element); | ||
26668 | neg find scopeDisallowsNewEModelElement_class(problem, interpretation); | ||
26669 | neg find isPrimitive(element); | ||
26670 | } or | ||
26671 | { find mustInstanceOfEModelElement_class(problem,interpretation,element); } | ||
26672 | /** | ||
26673 | * An element must be an instance of type "ENamedElement class". | ||
26674 | */ | ||
26675 | private pattern mustInstanceOfENamedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
26676 | Type.name(type,"ENamedElement class"); | ||
26677 | find directInstanceOf(problem,interpretation,element,type); | ||
26678 | } | ||
26679 | private pattern scopeDisallowsNewENamedElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
26680 | find interpretation(problem,interpretation); | ||
26681 | PartialInterpretation.scopes(interpretation,scope); | ||
26682 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
26683 | Scope.maxNewElements(scope,0); | ||
26684 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
26685 | Type.name(type,"ENamedElement class"); | ||
26686 | } | ||
26687 | |||
26688 | /** | ||
26689 | * An element may be an instance of type "ENamedElement class". | ||
26690 | */ | ||
26691 | private pattern mayInstanceOfENamedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
26692 | { | ||
26693 | find interpretation(problem,interpretation); | ||
26694 | PartialInterpretation.newElements(interpretation,element); | ||
26695 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26696 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26697 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
26698 | neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); | ||
26699 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26700 | neg find scopeDisallowsNewENamedElement_class(problem, interpretation); | ||
26701 | neg find isPrimitive(element); | ||
26702 | } or { | ||
26703 | find interpretation(problem,interpretation); | ||
26704 | PartialInterpretation.openWorldElements(interpretation,element); | ||
26705 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26706 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26707 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
26708 | neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); | ||
26709 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26710 | neg find scopeDisallowsNewENamedElement_class(problem, interpretation); | ||
26711 | neg find isPrimitive(element); | ||
26712 | } or | ||
26713 | { find mustInstanceOfENamedElement_class(problem,interpretation,element); } | ||
26714 | /** | ||
26715 | * An element must be an instance of type "EObject class". | ||
26716 | */ | ||
26717 | private pattern mustInstanceOfEObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
26718 | Type.name(type,"EObject class"); | ||
26719 | find directInstanceOf(problem,interpretation,element,type); | ||
26720 | } | ||
26721 | private pattern scopeDisallowsNewEObject_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
26722 | find interpretation(problem,interpretation); | ||
26723 | PartialInterpretation.scopes(interpretation,scope); | ||
26724 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
26725 | Scope.maxNewElements(scope,0); | ||
26726 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
26727 | Type.name(type,"EObject class"); | ||
26728 | } | ||
26729 | |||
26730 | /** | ||
26731 | * An element may be an instance of type "EObject class". | ||
26732 | */ | ||
26733 | private pattern mayInstanceOfEObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
26734 | { | ||
26735 | find interpretation(problem,interpretation); | ||
26736 | PartialInterpretation.newElements(interpretation,element); | ||
26737 | neg find mustInstanceOfEModelElement_class(problem,interpretation,element); | ||
26738 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26739 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26740 | neg find scopeDisallowsNewEObject_class(problem, interpretation); | ||
26741 | neg find isPrimitive(element); | ||
26742 | } or { | ||
26743 | find interpretation(problem,interpretation); | ||
26744 | PartialInterpretation.openWorldElements(interpretation,element); | ||
26745 | neg find mustInstanceOfEModelElement_class(problem,interpretation,element); | ||
26746 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26747 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26748 | neg find scopeDisallowsNewEObject_class(problem, interpretation); | ||
26749 | neg find isPrimitive(element); | ||
26750 | } or | ||
26751 | { find mustInstanceOfEObject_class(problem,interpretation,element); } | ||
26752 | /** | ||
26753 | * An element must be an instance of type "EOperation class". | ||
26754 | */ | ||
26755 | private pattern mustInstanceOfEOperation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
26756 | Type.name(type,"EOperation class"); | ||
26757 | find directInstanceOf(problem,interpretation,element,type); | ||
26758 | } | ||
26759 | private pattern scopeDisallowsNewEOperation_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
26760 | find interpretation(problem,interpretation); | ||
26761 | PartialInterpretation.scopes(interpretation,scope); | ||
26762 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
26763 | Scope.maxNewElements(scope,0); | ||
26764 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
26765 | Type.name(type,"EOperation class"); | ||
26766 | } | ||
26767 | |||
26768 | /** | ||
26769 | * An element may be an instance of type "EOperation class". | ||
26770 | */ | ||
26771 | private pattern mayInstanceOfEOperation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
26772 | { | ||
26773 | find interpretation(problem,interpretation); | ||
26774 | PartialInterpretation.newElements(interpretation,element); | ||
26775 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26776 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
26777 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
26778 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26779 | neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); | ||
26780 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
26781 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
26782 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26783 | neg find mustInstanceOfEParameter_class(problem,interpretation,element); | ||
26784 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
26785 | neg find scopeDisallowsNewEOperation_class(problem, interpretation); | ||
26786 | neg find isPrimitive(element); | ||
26787 | } or { | ||
26788 | find interpretation(problem,interpretation); | ||
26789 | PartialInterpretation.openWorldElements(interpretation,element); | ||
26790 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26791 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
26792 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
26793 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26794 | neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); | ||
26795 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
26796 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
26797 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26798 | neg find mustInstanceOfEParameter_class(problem,interpretation,element); | ||
26799 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
26800 | neg find scopeDisallowsNewEOperation_class(problem, interpretation); | ||
26801 | neg find isPrimitive(element); | ||
26802 | } or | ||
26803 | { find mustInstanceOfEOperation_class(problem,interpretation,element); } | ||
26804 | /** | ||
26805 | * An element must be an instance of type "EPackage class". | ||
26806 | */ | ||
26807 | private pattern mustInstanceOfEPackage_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
26808 | Type.name(type,"EPackage class"); | ||
26809 | find directInstanceOf(problem,interpretation,element,type); | ||
26810 | } | ||
26811 | private pattern scopeDisallowsNewEPackage_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
26812 | find interpretation(problem,interpretation); | ||
26813 | PartialInterpretation.scopes(interpretation,scope); | ||
26814 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
26815 | Scope.maxNewElements(scope,0); | ||
26816 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
26817 | Type.name(type,"EPackage class"); | ||
26818 | } | ||
26819 | |||
26820 | /** | ||
26821 | * An element may be an instance of type "EPackage class". | ||
26822 | */ | ||
26823 | private pattern mayInstanceOfEPackage_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
26824 | { | ||
26825 | find interpretation(problem,interpretation); | ||
26826 | PartialInterpretation.newElements(interpretation,element); | ||
26827 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26828 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26829 | neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); | ||
26830 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26831 | neg find scopeDisallowsNewEPackage_class(problem, interpretation); | ||
26832 | neg find isPrimitive(element); | ||
26833 | } or { | ||
26834 | find interpretation(problem,interpretation); | ||
26835 | PartialInterpretation.openWorldElements(interpretation,element); | ||
26836 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26837 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26838 | neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); | ||
26839 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26840 | neg find scopeDisallowsNewEPackage_class(problem, interpretation); | ||
26841 | neg find isPrimitive(element); | ||
26842 | } or | ||
26843 | { find mustInstanceOfEPackage_class(problem,interpretation,element); } | ||
26844 | /** | ||
26845 | * An element must be an instance of type "EParameter class". | ||
26846 | */ | ||
26847 | private pattern mustInstanceOfEParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
26848 | Type.name(type,"EParameter class"); | ||
26849 | find directInstanceOf(problem,interpretation,element,type); | ||
26850 | } | ||
26851 | private pattern scopeDisallowsNewEParameter_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
26852 | find interpretation(problem,interpretation); | ||
26853 | PartialInterpretation.scopes(interpretation,scope); | ||
26854 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
26855 | Scope.maxNewElements(scope,0); | ||
26856 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
26857 | Type.name(type,"EParameter class"); | ||
26858 | } | ||
26859 | |||
26860 | /** | ||
26861 | * An element may be an instance of type "EParameter class". | ||
26862 | */ | ||
26863 | private pattern mayInstanceOfEParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
26864 | { | ||
26865 | find interpretation(problem,interpretation); | ||
26866 | PartialInterpretation.newElements(interpretation,element); | ||
26867 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26868 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
26869 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
26870 | neg find mustInstanceOfEOperation_class(problem,interpretation,element); | ||
26871 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26872 | neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); | ||
26873 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
26874 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
26875 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26876 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
26877 | neg find scopeDisallowsNewEParameter_class(problem, interpretation); | ||
26878 | neg find isPrimitive(element); | ||
26879 | } or { | ||
26880 | find interpretation(problem,interpretation); | ||
26881 | PartialInterpretation.openWorldElements(interpretation,element); | ||
26882 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26883 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
26884 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
26885 | neg find mustInstanceOfEOperation_class(problem,interpretation,element); | ||
26886 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26887 | neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); | ||
26888 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
26889 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
26890 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26891 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
26892 | neg find scopeDisallowsNewEParameter_class(problem, interpretation); | ||
26893 | neg find isPrimitive(element); | ||
26894 | } or | ||
26895 | { find mustInstanceOfEParameter_class(problem,interpretation,element); } | ||
26896 | /** | ||
26897 | * An element must be an instance of type "EReference class". | ||
26898 | */ | ||
26899 | private pattern mustInstanceOfEReference_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
26900 | Type.name(type,"EReference class"); | ||
26901 | find directInstanceOf(problem,interpretation,element,type); | ||
26902 | } | ||
26903 | private pattern scopeDisallowsNewEReference_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
26904 | find interpretation(problem,interpretation); | ||
26905 | PartialInterpretation.scopes(interpretation,scope); | ||
26906 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
26907 | Scope.maxNewElements(scope,0); | ||
26908 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
26909 | Type.name(type,"EReference class"); | ||
26910 | } | ||
26911 | |||
26912 | /** | ||
26913 | * An element may be an instance of type "EReference class". | ||
26914 | */ | ||
26915 | private pattern mayInstanceOfEReference_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
26916 | { | ||
26917 | find interpretation(problem,interpretation); | ||
26918 | PartialInterpretation.newElements(interpretation,element); | ||
26919 | neg find mustInstanceOfEAttribute_class(problem,interpretation,element); | ||
26920 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26921 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
26922 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
26923 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26924 | neg find mustInstanceOfEOperation_class(problem,interpretation,element); | ||
26925 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
26926 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
26927 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26928 | neg find mustInstanceOfEParameter_class(problem,interpretation,element); | ||
26929 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
26930 | neg find scopeDisallowsNewEReference_class(problem, interpretation); | ||
26931 | neg find isPrimitive(element); | ||
26932 | } or { | ||
26933 | find interpretation(problem,interpretation); | ||
26934 | PartialInterpretation.openWorldElements(interpretation,element); | ||
26935 | neg find mustInstanceOfEAttribute_class(problem,interpretation,element); | ||
26936 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26937 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
26938 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
26939 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26940 | neg find mustInstanceOfEOperation_class(problem,interpretation,element); | ||
26941 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
26942 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
26943 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26944 | neg find mustInstanceOfEParameter_class(problem,interpretation,element); | ||
26945 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
26946 | neg find scopeDisallowsNewEReference_class(problem, interpretation); | ||
26947 | neg find isPrimitive(element); | ||
26948 | } or | ||
26949 | { find mustInstanceOfEReference_class(problem,interpretation,element); } | ||
26950 | /** | ||
26951 | * An element must be an instance of type "EStructuralFeature class". | ||
26952 | */ | ||
26953 | private pattern mustInstanceOfEStructuralFeature_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
26954 | Type.name(type,"EStructuralFeature class"); | ||
26955 | find directInstanceOf(problem,interpretation,element,type); | ||
26956 | } | ||
26957 | private pattern scopeDisallowsNewEStructuralFeature_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
26958 | find interpretation(problem,interpretation); | ||
26959 | PartialInterpretation.scopes(interpretation,scope); | ||
26960 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
26961 | Scope.maxNewElements(scope,0); | ||
26962 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
26963 | Type.name(type,"EStructuralFeature class"); | ||
26964 | } | ||
26965 | |||
26966 | /** | ||
26967 | * An element may be an instance of type "EStructuralFeature class". | ||
26968 | */ | ||
26969 | private pattern mayInstanceOfEStructuralFeature_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
26970 | { | ||
26971 | find interpretation(problem,interpretation); | ||
26972 | PartialInterpretation.newElements(interpretation,element); | ||
26973 | neg find mustInstanceOfEAttribute_class(problem,interpretation,element); | ||
26974 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26975 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
26976 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
26977 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26978 | neg find mustInstanceOfEOperation_class(problem,interpretation,element); | ||
26979 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
26980 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
26981 | neg find mustInstanceOfEReference_class(problem,interpretation,element); | ||
26982 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
26983 | neg find mustInstanceOfEParameter_class(problem,interpretation,element); | ||
26984 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
26985 | neg find scopeDisallowsNewEStructuralFeature_class(problem, interpretation); | ||
26986 | neg find isPrimitive(element); | ||
26987 | } or { | ||
26988 | find interpretation(problem,interpretation); | ||
26989 | PartialInterpretation.openWorldElements(interpretation,element); | ||
26990 | neg find mustInstanceOfEAttribute_class(problem,interpretation,element); | ||
26991 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
26992 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
26993 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
26994 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
26995 | neg find mustInstanceOfEOperation_class(problem,interpretation,element); | ||
26996 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
26997 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
26998 | neg find mustInstanceOfEReference_class(problem,interpretation,element); | ||
26999 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
27000 | neg find mustInstanceOfEParameter_class(problem,interpretation,element); | ||
27001 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
27002 | neg find scopeDisallowsNewEStructuralFeature_class(problem, interpretation); | ||
27003 | neg find isPrimitive(element); | ||
27004 | } or | ||
27005 | { find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); } | ||
27006 | /** | ||
27007 | * An element must be an instance of type "ETypedElement class". | ||
27008 | */ | ||
27009 | private pattern mustInstanceOfETypedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
27010 | Type.name(type,"ETypedElement class"); | ||
27011 | find directInstanceOf(problem,interpretation,element,type); | ||
27012 | } | ||
27013 | private pattern scopeDisallowsNewETypedElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
27014 | find interpretation(problem,interpretation); | ||
27015 | PartialInterpretation.scopes(interpretation,scope); | ||
27016 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
27017 | Scope.maxNewElements(scope,0); | ||
27018 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
27019 | Type.name(type,"ETypedElement class"); | ||
27020 | } | ||
27021 | |||
27022 | /** | ||
27023 | * An element may be an instance of type "ETypedElement class". | ||
27024 | */ | ||
27025 | private pattern mayInstanceOfETypedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
27026 | { | ||
27027 | find interpretation(problem,interpretation); | ||
27028 | PartialInterpretation.newElements(interpretation,element); | ||
27029 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
27030 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
27031 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
27032 | neg find mustInstanceOfEOperation_class(problem,interpretation,element); | ||
27033 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
27034 | neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); | ||
27035 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
27036 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
27037 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
27038 | neg find mustInstanceOfEParameter_class(problem,interpretation,element); | ||
27039 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
27040 | neg find scopeDisallowsNewETypedElement_class(problem, interpretation); | ||
27041 | neg find isPrimitive(element); | ||
27042 | } or { | ||
27043 | find interpretation(problem,interpretation); | ||
27044 | PartialInterpretation.openWorldElements(interpretation,element); | ||
27045 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
27046 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
27047 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
27048 | neg find mustInstanceOfEOperation_class(problem,interpretation,element); | ||
27049 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
27050 | neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); | ||
27051 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
27052 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
27053 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
27054 | neg find mustInstanceOfEParameter_class(problem,interpretation,element); | ||
27055 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
27056 | neg find scopeDisallowsNewETypedElement_class(problem, interpretation); | ||
27057 | neg find isPrimitive(element); | ||
27058 | } or | ||
27059 | { find mustInstanceOfETypedElement_class(problem,interpretation,element); } | ||
27060 | /** | ||
27061 | * An element must be an instance of type "EStringToStringMapEntry class". | ||
27062 | */ | ||
27063 | private pattern mustInstanceOfEStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
27064 | Type.name(type,"EStringToStringMapEntry class"); | ||
27065 | find directInstanceOf(problem,interpretation,element,type); | ||
27066 | } | ||
27067 | private pattern scopeDisallowsNewEStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
27068 | find interpretation(problem,interpretation); | ||
27069 | PartialInterpretation.scopes(interpretation,scope); | ||
27070 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
27071 | Scope.maxNewElements(scope,0); | ||
27072 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
27073 | Type.name(type,"EStringToStringMapEntry class"); | ||
27074 | } | ||
27075 | |||
27076 | /** | ||
27077 | * An element may be an instance of type "EStringToStringMapEntry class". | ||
27078 | */ | ||
27079 | private pattern mayInstanceOfEStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
27080 | { | ||
27081 | find interpretation(problem,interpretation); | ||
27082 | PartialInterpretation.newElements(interpretation,element); | ||
27083 | neg find mustInstanceOfEModelElement_class(problem,interpretation,element); | ||
27084 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
27085 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
27086 | neg find scopeDisallowsNewEStringToStringMapEntry_class(problem, interpretation); | ||
27087 | neg find isPrimitive(element); | ||
27088 | } or { | ||
27089 | find interpretation(problem,interpretation); | ||
27090 | PartialInterpretation.openWorldElements(interpretation,element); | ||
27091 | neg find mustInstanceOfEModelElement_class(problem,interpretation,element); | ||
27092 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
27093 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
27094 | neg find scopeDisallowsNewEStringToStringMapEntry_class(problem, interpretation); | ||
27095 | neg find isPrimitive(element); | ||
27096 | } or | ||
27097 | { find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); } | ||
27098 | /** | ||
27099 | * An element must be an instance of type "EGenericType class". | ||
27100 | */ | ||
27101 | private pattern mustInstanceOfEGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
27102 | Type.name(type,"EGenericType class"); | ||
27103 | find directInstanceOf(problem,interpretation,element,type); | ||
27104 | } | ||
27105 | private pattern scopeDisallowsNewEGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
27106 | find interpretation(problem,interpretation); | ||
27107 | PartialInterpretation.scopes(interpretation,scope); | ||
27108 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
27109 | Scope.maxNewElements(scope,0); | ||
27110 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
27111 | Type.name(type,"EGenericType class"); | ||
27112 | } | ||
27113 | |||
27114 | /** | ||
27115 | * An element may be an instance of type "EGenericType class". | ||
27116 | */ | ||
27117 | private pattern mayInstanceOfEGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
27118 | { | ||
27119 | find interpretation(problem,interpretation); | ||
27120 | PartialInterpretation.newElements(interpretation,element); | ||
27121 | neg find mustInstanceOfEModelElement_class(problem,interpretation,element); | ||
27122 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
27123 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
27124 | neg find scopeDisallowsNewEGenericType_class(problem, interpretation); | ||
27125 | neg find isPrimitive(element); | ||
27126 | } or { | ||
27127 | find interpretation(problem,interpretation); | ||
27128 | PartialInterpretation.openWorldElements(interpretation,element); | ||
27129 | neg find mustInstanceOfEModelElement_class(problem,interpretation,element); | ||
27130 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
27131 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
27132 | neg find scopeDisallowsNewEGenericType_class(problem, interpretation); | ||
27133 | neg find isPrimitive(element); | ||
27134 | } or | ||
27135 | { find mustInstanceOfEGenericType_class(problem,interpretation,element); } | ||
27136 | /** | ||
27137 | * An element must be an instance of type "ETypeParameter class". | ||
27138 | */ | ||
27139 | private pattern mustInstanceOfETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
27140 | Type.name(type,"ETypeParameter class"); | ||
27141 | find directInstanceOf(problem,interpretation,element,type); | ||
27142 | } | ||
27143 | private pattern scopeDisallowsNewETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
27144 | find interpretation(problem,interpretation); | ||
27145 | PartialInterpretation.scopes(interpretation,scope); | ||
27146 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
27147 | Scope.maxNewElements(scope,0); | ||
27148 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
27149 | Type.name(type,"ETypeParameter class"); | ||
27150 | } | ||
27151 | |||
27152 | /** | ||
27153 | * An element may be an instance of type "ETypeParameter class". | ||
27154 | */ | ||
27155 | private pattern mayInstanceOfETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
27156 | { | ||
27157 | find interpretation(problem,interpretation); | ||
27158 | PartialInterpretation.newElements(interpretation,element); | ||
27159 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
27160 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
27161 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
27162 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
27163 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
27164 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
27165 | neg find mustInstanceOfETypedElement_class(problem,interpretation,element); | ||
27166 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
27167 | neg find scopeDisallowsNewETypeParameter_class(problem, interpretation); | ||
27168 | neg find isPrimitive(element); | ||
27169 | } or { | ||
27170 | find interpretation(problem,interpretation); | ||
27171 | PartialInterpretation.openWorldElements(interpretation,element); | ||
27172 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
27173 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
27174 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
27175 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
27176 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
27177 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
27178 | neg find mustInstanceOfETypedElement_class(problem,interpretation,element); | ||
27179 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
27180 | neg find scopeDisallowsNewETypeParameter_class(problem, interpretation); | ||
27181 | neg find isPrimitive(element); | ||
27182 | } or | ||
27183 | { find mustInstanceOfETypeParameter_class(problem,interpretation,element); } | ||
27184 | /** | ||
27185 | * An element must be an instance of type "EModelElement class DefinedPart". | ||
27186 | */ | ||
27187 | private pattern mustInstanceOfEModelElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
27188 | Type.name(type,"EModelElement class DefinedPart"); | ||
27189 | find directInstanceOf(problem,interpretation,element,type); | ||
27190 | } | ||
27191 | private pattern scopeDisallowsNewEModelElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
27192 | find interpretation(problem,interpretation); | ||
27193 | PartialInterpretation.scopes(interpretation,scope); | ||
27194 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
27195 | Scope.maxNewElements(scope,0); | ||
27196 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
27197 | Type.name(type,"EModelElement class DefinedPart"); | ||
27198 | } | ||
27199 | |||
27200 | /** | ||
27201 | * An element may be an instance of type "EModelElement class DefinedPart". | ||
27202 | */ | ||
27203 | private pattern mayInstanceOfEModelElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
27204 | { find mustInstanceOfEModelElement_class_DefinedPart(problem,interpretation,element); } | ||
27205 | /** | ||
27206 | * An element must be an instance of type "EModelElement class UndefinedPart". | ||
27207 | */ | ||
27208 | private pattern mustInstanceOfEModelElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
27209 | Type.name(type,"EModelElement class UndefinedPart"); | ||
27210 | find directInstanceOf(problem,interpretation,element,type); | ||
27211 | } | ||
27212 | private pattern scopeDisallowsNewEModelElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
27213 | find interpretation(problem,interpretation); | ||
27214 | PartialInterpretation.scopes(interpretation,scope); | ||
27215 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
27216 | Scope.maxNewElements(scope,0); | ||
27217 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
27218 | Type.name(type,"EModelElement class UndefinedPart"); | ||
27219 | } | ||
27220 | |||
27221 | /** | ||
27222 | * An element may be an instance of type "EModelElement class UndefinedPart". | ||
27223 | */ | ||
27224 | private pattern mayInstanceOfEModelElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
27225 | { | ||
27226 | find interpretation(problem,interpretation); | ||
27227 | PartialInterpretation.newElements(interpretation,element); | ||
27228 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
27229 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
27230 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
27231 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
27232 | neg find mustInstanceOfENamedElement_class(problem,interpretation,element); | ||
27233 | neg find scopeDisallowsNewEModelElement_class_UndefinedPart(problem, interpretation); | ||
27234 | neg find isPrimitive(element); | ||
27235 | } or { | ||
27236 | find interpretation(problem,interpretation); | ||
27237 | PartialInterpretation.openWorldElements(interpretation,element); | ||
27238 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
27239 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
27240 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
27241 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
27242 | neg find mustInstanceOfENamedElement_class(problem,interpretation,element); | ||
27243 | neg find scopeDisallowsNewEModelElement_class_UndefinedPart(problem, interpretation); | ||
27244 | neg find isPrimitive(element); | ||
27245 | } or | ||
27246 | { find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); } | ||
27247 | /** | ||
27248 | * An element must be an instance of type "ENamedElement class DefinedPart". | ||
27249 | */ | ||
27250 | private pattern mustInstanceOfENamedElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
27251 | Type.name(type,"ENamedElement class DefinedPart"); | ||
27252 | find directInstanceOf(problem,interpretation,element,type); | ||
27253 | } | ||
27254 | private pattern scopeDisallowsNewENamedElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
27255 | find interpretation(problem,interpretation); | ||
27256 | PartialInterpretation.scopes(interpretation,scope); | ||
27257 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
27258 | Scope.maxNewElements(scope,0); | ||
27259 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
27260 | Type.name(type,"ENamedElement class DefinedPart"); | ||
27261 | } | ||
27262 | |||
27263 | /** | ||
27264 | * An element may be an instance of type "ENamedElement class DefinedPart". | ||
27265 | */ | ||
27266 | private pattern mayInstanceOfENamedElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
27267 | { find mustInstanceOfENamedElement_class_DefinedPart(problem,interpretation,element); } | ||
27268 | /** | ||
27269 | * An element must be an instance of type "ENamedElement class UndefinedPart". | ||
27270 | */ | ||
27271 | private pattern mustInstanceOfENamedElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
27272 | Type.name(type,"ENamedElement class UndefinedPart"); | ||
27273 | find directInstanceOf(problem,interpretation,element,type); | ||
27274 | } | ||
27275 | private pattern scopeDisallowsNewENamedElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
27276 | find interpretation(problem,interpretation); | ||
27277 | PartialInterpretation.scopes(interpretation,scope); | ||
27278 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
27279 | Scope.maxNewElements(scope,0); | ||
27280 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
27281 | Type.name(type,"ENamedElement class UndefinedPart"); | ||
27282 | } | ||
27283 | |||
27284 | /** | ||
27285 | * An element may be an instance of type "ENamedElement class UndefinedPart". | ||
27286 | */ | ||
27287 | private pattern mayInstanceOfENamedElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
27288 | { | ||
27289 | find interpretation(problem,interpretation); | ||
27290 | PartialInterpretation.newElements(interpretation,element); | ||
27291 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
27292 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
27293 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
27294 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
27295 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
27296 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
27297 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
27298 | neg find mustInstanceOfETypedElement_class(problem,interpretation,element); | ||
27299 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
27300 | neg find scopeDisallowsNewENamedElement_class_UndefinedPart(problem, interpretation); | ||
27301 | neg find isPrimitive(element); | ||
27302 | } or { | ||
27303 | find interpretation(problem,interpretation); | ||
27304 | PartialInterpretation.openWorldElements(interpretation,element); | ||
27305 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
27306 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
27307 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
27308 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
27309 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
27310 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
27311 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
27312 | neg find mustInstanceOfETypedElement_class(problem,interpretation,element); | ||
27313 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
27314 | neg find scopeDisallowsNewENamedElement_class_UndefinedPart(problem, interpretation); | ||
27315 | neg find isPrimitive(element); | ||
27316 | } or | ||
27317 | { find mustInstanceOfENamedElement_class_UndefinedPart(problem,interpretation,element); } | ||
27318 | /** | ||
27319 | * An element must be an instance of type "EPackage class DefinedPart". | ||
27320 | */ | ||
27321 | private pattern mustInstanceOfEPackage_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
27322 | Type.name(type,"EPackage class DefinedPart"); | ||
27323 | find directInstanceOf(problem,interpretation,element,type); | ||
27324 | } | ||
27325 | private pattern scopeDisallowsNewEPackage_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
27326 | find interpretation(problem,interpretation); | ||
27327 | PartialInterpretation.scopes(interpretation,scope); | ||
27328 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
27329 | Scope.maxNewElements(scope,0); | ||
27330 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
27331 | Type.name(type,"EPackage class DefinedPart"); | ||
27332 | } | ||
27333 | |||
27334 | /** | ||
27335 | * An element may be an instance of type "EPackage class DefinedPart". | ||
27336 | */ | ||
27337 | private pattern mayInstanceOfEPackage_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
27338 | { find mustInstanceOfEPackage_class_DefinedPart(problem,interpretation,element); } | ||
27339 | /** | ||
27340 | * An element must be an instance of type "EPackage class UndefinedPart". | ||
27341 | */ | ||
27342 | private pattern mustInstanceOfEPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
27343 | Type.name(type,"EPackage class UndefinedPart"); | ||
27344 | find directInstanceOf(problem,interpretation,element,type); | ||
27345 | } | ||
27346 | private pattern scopeDisallowsNewEPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
27347 | find interpretation(problem,interpretation); | ||
27348 | PartialInterpretation.scopes(interpretation,scope); | ||
27349 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
27350 | Scope.maxNewElements(scope,0); | ||
27351 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
27352 | Type.name(type,"EPackage class UndefinedPart"); | ||
27353 | } | ||
27354 | |||
27355 | /** | ||
27356 | * An element may be an instance of type "EPackage class UndefinedPart". | ||
27357 | */ | ||
27358 | private pattern mayInstanceOfEPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
27359 | { | ||
27360 | find interpretation(problem,interpretation); | ||
27361 | PartialInterpretation.newElements(interpretation,element); | ||
27362 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
27363 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
27364 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
27365 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
27366 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
27367 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
27368 | neg find mustInstanceOfETypedElement_class(problem,interpretation,element); | ||
27369 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
27370 | neg find scopeDisallowsNewEPackage_class_UndefinedPart(problem, interpretation); | ||
27371 | neg find isPrimitive(element); | ||
27372 | } or { | ||
27373 | find interpretation(problem,interpretation); | ||
27374 | PartialInterpretation.openWorldElements(interpretation,element); | ||
27375 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
27376 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
27377 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
27378 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
27379 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
27380 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
27381 | neg find mustInstanceOfETypedElement_class(problem,interpretation,element); | ||
27382 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
27383 | neg find scopeDisallowsNewEPackage_class_UndefinedPart(problem, interpretation); | ||
27384 | neg find isPrimitive(element); | ||
27385 | } or | ||
27386 | { find mustInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element); } | ||
27387 | |||
27388 | ////////// | ||
27389 | // 1.2 Relation Declaration Indexers | ||
27390 | ////////// | ||
27391 | /** | ||
27392 | * Matcher for detecting tuples t where []eAttributeType reference EAttribute(source,target) | ||
27393 | */ | ||
27394 | private pattern mustInRelationeAttributeType_reference_EAttribute( | ||
27395 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27396 | source: DefinedElement, target:DefinedElement) | ||
27397 | { | ||
27398 | find interpretation(problem,interpretation); | ||
27399 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
27400 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributeType reference EAttribute"); | ||
27401 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
27402 | BinaryElementRelationLink.param1(link,source); | ||
27403 | BinaryElementRelationLink.param2(link,target); | ||
27404 | } | ||
27405 | /** | ||
27406 | * Matcher for detecting tuples t where <>eAttributeType reference EAttribute(source,target) | ||
27407 | */ | ||
27408 | private pattern mayInRelationeAttributeType_reference_EAttribute( | ||
27409 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27410 | source: DefinedElement, target:DefinedElement) | ||
27411 | { | ||
27412 | find interpretation(problem,interpretation); | ||
27413 | // The two endpoint of the link have to exist | ||
27414 | find mayExist(problem, interpretation, source); | ||
27415 | find mayExist(problem, interpretation, target); | ||
27416 | // Type consistency | ||
27417 | find mayInstanceOfEAttribute_class(problem,interpretation,source); | ||
27418 | find mayInstanceOfEDataType_class(problem,interpretation,target); | ||
27419 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
27420 | // the upper bound of the multiplicity should be considered. | ||
27421 | numberOfExistingReferences == count find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,source,_); | ||
27422 | check(numberOfExistingReferences < 1); | ||
27423 | } or { | ||
27424 | find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,source,target); | ||
27425 | } | ||
27426 | /** | ||
27427 | * Matcher for detecting tuples t where []details reference EAnnotation(source,target) | ||
27428 | */ | ||
27429 | private pattern mustInRelationdetails_reference_EAnnotation( | ||
27430 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27431 | source: DefinedElement, target:DefinedElement) | ||
27432 | { | ||
27433 | find interpretation(problem,interpretation); | ||
27434 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
27435 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"details reference EAnnotation"); | ||
27436 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
27437 | BinaryElementRelationLink.param1(link,source); | ||
27438 | BinaryElementRelationLink.param2(link,target); | ||
27439 | } | ||
27440 | /** | ||
27441 | * Matcher for detecting tuples t where <>details reference EAnnotation(source,target) | ||
27442 | */ | ||
27443 | private pattern mayInRelationdetails_reference_EAnnotation( | ||
27444 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27445 | source: DefinedElement, target:DefinedElement) | ||
27446 | { | ||
27447 | find interpretation(problem,interpretation); | ||
27448 | // The two endpoint of the link have to exist | ||
27449 | find mayExist(problem, interpretation, source); | ||
27450 | find mayExist(problem, interpretation, target); | ||
27451 | // Type consistency | ||
27452 | find mayInstanceOfEAnnotation_class(problem,interpretation,source); | ||
27453 | find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,target); | ||
27454 | // The reference is containment, then a new reference cannot be create if: | ||
27455 | // 1. Multiple parents | ||
27456 | neg find mustContains4(problem,interpretation,_,target); | ||
27457 | // 2. Circle in the containment hierarchy | ||
27458 | neg find mustTransitiveContains(source,target); | ||
27459 | } or { | ||
27460 | find mustInRelationdetails_reference_EAnnotation(problem,interpretation,source,target); | ||
27461 | } | ||
27462 | /** | ||
27463 | * Matcher for detecting tuples t where []eModelElement reference EAnnotation(source,target) | ||
27464 | */ | ||
27465 | private pattern mustInRelationeModelElement_reference_EAnnotation( | ||
27466 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27467 | source: DefinedElement, target:DefinedElement) | ||
27468 | { | ||
27469 | find interpretation(problem,interpretation); | ||
27470 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
27471 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eModelElement reference EAnnotation"); | ||
27472 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
27473 | BinaryElementRelationLink.param1(link,source); | ||
27474 | BinaryElementRelationLink.param2(link,target); | ||
27475 | } | ||
27476 | /** | ||
27477 | * Matcher for detecting tuples t where <>eModelElement reference EAnnotation(source,target) | ||
27478 | */ | ||
27479 | private pattern mayInRelationeModelElement_reference_EAnnotation( | ||
27480 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27481 | source: DefinedElement, target:DefinedElement) | ||
27482 | { | ||
27483 | find interpretation(problem,interpretation); | ||
27484 | // The two endpoint of the link have to exist | ||
27485 | find mayExist(problem, interpretation, source); | ||
27486 | find mayExist(problem, interpretation, target); | ||
27487 | // Type consistency | ||
27488 | find mayInstanceOfEAnnotation_class(problem,interpretation,source); | ||
27489 | find mayInstanceOfEModelElement_class(problem,interpretation,target); | ||
27490 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
27491 | // the upper bound of the multiplicity should be considered. | ||
27492 | numberOfExistingReferences == count find mustInRelationeModelElement_reference_EAnnotation(problem,interpretation,source,_); | ||
27493 | check(numberOfExistingReferences < 1); | ||
27494 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
27495 | // 1. Multiple parents | ||
27496 | neg find mustContains4(problem,interpretation,source,_); | ||
27497 | // 2. Circle in the containment hierarchy | ||
27498 | neg find mustTransitiveContains(source,target); | ||
27499 | } or { | ||
27500 | find mustInRelationeModelElement_reference_EAnnotation(problem,interpretation,source,target); | ||
27501 | } | ||
27502 | /** | ||
27503 | * Matcher for detecting tuples t where []contents reference EAnnotation(source,target) | ||
27504 | */ | ||
27505 | private pattern mustInRelationcontents_reference_EAnnotation( | ||
27506 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27507 | source: DefinedElement, target:DefinedElement) | ||
27508 | { | ||
27509 | find interpretation(problem,interpretation); | ||
27510 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
27511 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"contents reference EAnnotation"); | ||
27512 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
27513 | BinaryElementRelationLink.param1(link,source); | ||
27514 | BinaryElementRelationLink.param2(link,target); | ||
27515 | } | ||
27516 | /** | ||
27517 | * Matcher for detecting tuples t where <>contents reference EAnnotation(source,target) | ||
27518 | */ | ||
27519 | private pattern mayInRelationcontents_reference_EAnnotation( | ||
27520 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27521 | source: DefinedElement, target:DefinedElement) | ||
27522 | { | ||
27523 | find interpretation(problem,interpretation); | ||
27524 | // The two endpoint of the link have to exist | ||
27525 | find mayExist(problem, interpretation, source); | ||
27526 | find mayExist(problem, interpretation, target); | ||
27527 | // Type consistency | ||
27528 | find mayInstanceOfEAnnotation_class(problem,interpretation,source); | ||
27529 | find mayInstanceOfEObject_class(problem,interpretation,target); | ||
27530 | // The reference is containment, then a new reference cannot be create if: | ||
27531 | // 1. Multiple parents | ||
27532 | neg find mustContains4(problem,interpretation,_,target); | ||
27533 | // 2. Circle in the containment hierarchy | ||
27534 | neg find mustTransitiveContains(source,target); | ||
27535 | } or { | ||
27536 | find mustInRelationcontents_reference_EAnnotation(problem,interpretation,source,target); | ||
27537 | } | ||
27538 | /** | ||
27539 | * Matcher for detecting tuples t where []references reference EAnnotation(source,target) | ||
27540 | */ | ||
27541 | private pattern mustInRelationreferences_reference_EAnnotation( | ||
27542 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27543 | source: DefinedElement, target:DefinedElement) | ||
27544 | { | ||
27545 | find interpretation(problem,interpretation); | ||
27546 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
27547 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"references reference EAnnotation"); | ||
27548 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
27549 | BinaryElementRelationLink.param1(link,source); | ||
27550 | BinaryElementRelationLink.param2(link,target); | ||
27551 | } | ||
27552 | /** | ||
27553 | * Matcher for detecting tuples t where <>references reference EAnnotation(source,target) | ||
27554 | */ | ||
27555 | private pattern mayInRelationreferences_reference_EAnnotation( | ||
27556 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27557 | source: DefinedElement, target:DefinedElement) | ||
27558 | { | ||
27559 | find interpretation(problem,interpretation); | ||
27560 | // The two endpoint of the link have to exist | ||
27561 | find mayExist(problem, interpretation, source); | ||
27562 | find mayExist(problem, interpretation, target); | ||
27563 | // Type consistency | ||
27564 | find mayInstanceOfEAnnotation_class(problem,interpretation,source); | ||
27565 | find mayInstanceOfEObject_class(problem,interpretation,target); | ||
27566 | } or { | ||
27567 | find mustInRelationreferences_reference_EAnnotation(problem,interpretation,source,target); | ||
27568 | } | ||
27569 | /** | ||
27570 | * Matcher for detecting tuples t where []eSuperTypes reference EClass(source,target) | ||
27571 | */ | ||
27572 | private pattern mustInRelationeSuperTypes_reference_EClass( | ||
27573 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27574 | source: DefinedElement, target:DefinedElement) | ||
27575 | { | ||
27576 | find interpretation(problem,interpretation); | ||
27577 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
27578 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSuperTypes reference EClass"); | ||
27579 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
27580 | BinaryElementRelationLink.param1(link,source); | ||
27581 | BinaryElementRelationLink.param2(link,target); | ||
27582 | } | ||
27583 | /** | ||
27584 | * Matcher for detecting tuples t where <>eSuperTypes reference EClass(source,target) | ||
27585 | */ | ||
27586 | private pattern mayInRelationeSuperTypes_reference_EClass( | ||
27587 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27588 | source: DefinedElement, target:DefinedElement) | ||
27589 | { | ||
27590 | find interpretation(problem,interpretation); | ||
27591 | // The two endpoint of the link have to exist | ||
27592 | find mayExist(problem, interpretation, source); | ||
27593 | find mayExist(problem, interpretation, target); | ||
27594 | // Type consistency | ||
27595 | find mayInstanceOfEClass_class(problem,interpretation,source); | ||
27596 | find mayInstanceOfEClass_class(problem,interpretation,target); | ||
27597 | } or { | ||
27598 | find mustInRelationeSuperTypes_reference_EClass(problem,interpretation,source,target); | ||
27599 | } | ||
27600 | /** | ||
27601 | * Matcher for detecting tuples t where []eOperations reference EClass(source,target) | ||
27602 | */ | ||
27603 | private pattern mustInRelationeOperations_reference_EClass( | ||
27604 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27605 | source: DefinedElement, target:DefinedElement) | ||
27606 | { | ||
27607 | find interpretation(problem,interpretation); | ||
27608 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
27609 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOperations reference EClass"); | ||
27610 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
27611 | BinaryElementRelationLink.param1(link,source); | ||
27612 | BinaryElementRelationLink.param2(link,target); | ||
27613 | } | ||
27614 | /** | ||
27615 | * Matcher for detecting tuples t where <>eOperations reference EClass(source,target) | ||
27616 | */ | ||
27617 | private pattern mayInRelationeOperations_reference_EClass( | ||
27618 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27619 | source: DefinedElement, target:DefinedElement) | ||
27620 | { | ||
27621 | find interpretation(problem,interpretation); | ||
27622 | // The two endpoint of the link have to exist | ||
27623 | find mayExist(problem, interpretation, source); | ||
27624 | find mayExist(problem, interpretation, target); | ||
27625 | // Type consistency | ||
27626 | find mayInstanceOfEClass_class(problem,interpretation,source); | ||
27627 | find mayInstanceOfEOperation_class(problem,interpretation,target); | ||
27628 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
27629 | // the upper bound of the opposite reference multiplicity should be considered. | ||
27630 | numberOfExistingOppositeReferences == count find mustInRelationeContainingClass_reference_EOperation(problem,interpretation,target,_); | ||
27631 | check(numberOfExistingOppositeReferences < 1); | ||
27632 | // The reference is containment, then a new reference cannot be create if: | ||
27633 | // 1. Multiple parents | ||
27634 | neg find mustContains4(problem,interpretation,_,target); | ||
27635 | // 2. Circle in the containment hierarchy | ||
27636 | neg find mustTransitiveContains(source,target); | ||
27637 | } or { | ||
27638 | find mustInRelationeOperations_reference_EClass(problem,interpretation,source,target); | ||
27639 | } | ||
27640 | /** | ||
27641 | * Matcher for detecting tuples t where []eAllAttributes reference EClass(source,target) | ||
27642 | */ | ||
27643 | private pattern mustInRelationeAllAttributes_reference_EClass( | ||
27644 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27645 | source: DefinedElement, target:DefinedElement) | ||
27646 | { | ||
27647 | find interpretation(problem,interpretation); | ||
27648 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
27649 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllAttributes reference EClass"); | ||
27650 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
27651 | BinaryElementRelationLink.param1(link,source); | ||
27652 | BinaryElementRelationLink.param2(link,target); | ||
27653 | } | ||
27654 | /** | ||
27655 | * Matcher for detecting tuples t where <>eAllAttributes reference EClass(source,target) | ||
27656 | */ | ||
27657 | private pattern mayInRelationeAllAttributes_reference_EClass( | ||
27658 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27659 | source: DefinedElement, target:DefinedElement) | ||
27660 | { | ||
27661 | find interpretation(problem,interpretation); | ||
27662 | // The two endpoint of the link have to exist | ||
27663 | find mayExist(problem, interpretation, source); | ||
27664 | find mayExist(problem, interpretation, target); | ||
27665 | // Type consistency | ||
27666 | find mayInstanceOfEClass_class(problem,interpretation,source); | ||
27667 | find mayInstanceOfEAttribute_class(problem,interpretation,target); | ||
27668 | } or { | ||
27669 | find mustInRelationeAllAttributes_reference_EClass(problem,interpretation,source,target); | ||
27670 | } | ||
27671 | /** | ||
27672 | * Matcher for detecting tuples t where []eAllReferences reference EClass(source,target) | ||
27673 | */ | ||
27674 | private pattern mustInRelationeAllReferences_reference_EClass( | ||
27675 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27676 | source: DefinedElement, target:DefinedElement) | ||
27677 | { | ||
27678 | find interpretation(problem,interpretation); | ||
27679 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
27680 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllReferences reference EClass"); | ||
27681 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
27682 | BinaryElementRelationLink.param1(link,source); | ||
27683 | BinaryElementRelationLink.param2(link,target); | ||
27684 | } | ||
27685 | /** | ||
27686 | * Matcher for detecting tuples t where <>eAllReferences reference EClass(source,target) | ||
27687 | */ | ||
27688 | private pattern mayInRelationeAllReferences_reference_EClass( | ||
27689 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27690 | source: DefinedElement, target:DefinedElement) | ||
27691 | { | ||
27692 | find interpretation(problem,interpretation); | ||
27693 | // The two endpoint of the link have to exist | ||
27694 | find mayExist(problem, interpretation, source); | ||
27695 | find mayExist(problem, interpretation, target); | ||
27696 | // Type consistency | ||
27697 | find mayInstanceOfEClass_class(problem,interpretation,source); | ||
27698 | find mayInstanceOfEReference_class(problem,interpretation,target); | ||
27699 | } or { | ||
27700 | find mustInRelationeAllReferences_reference_EClass(problem,interpretation,source,target); | ||
27701 | } | ||
27702 | /** | ||
27703 | * Matcher for detecting tuples t where []eReferences reference EClass(source,target) | ||
27704 | */ | ||
27705 | private pattern mustInRelationeReferences_reference_EClass( | ||
27706 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27707 | source: DefinedElement, target:DefinedElement) | ||
27708 | { | ||
27709 | find interpretation(problem,interpretation); | ||
27710 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
27711 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferences reference EClass"); | ||
27712 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
27713 | BinaryElementRelationLink.param1(link,source); | ||
27714 | BinaryElementRelationLink.param2(link,target); | ||
27715 | } | ||
27716 | /** | ||
27717 | * Matcher for detecting tuples t where <>eReferences reference EClass(source,target) | ||
27718 | */ | ||
27719 | private pattern mayInRelationeReferences_reference_EClass( | ||
27720 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27721 | source: DefinedElement, target:DefinedElement) | ||
27722 | { | ||
27723 | find interpretation(problem,interpretation); | ||
27724 | // The two endpoint of the link have to exist | ||
27725 | find mayExist(problem, interpretation, source); | ||
27726 | find mayExist(problem, interpretation, target); | ||
27727 | // Type consistency | ||
27728 | find mayInstanceOfEClass_class(problem,interpretation,source); | ||
27729 | find mayInstanceOfEReference_class(problem,interpretation,target); | ||
27730 | } or { | ||
27731 | find mustInRelationeReferences_reference_EClass(problem,interpretation,source,target); | ||
27732 | } | ||
27733 | /** | ||
27734 | * Matcher for detecting tuples t where []eAttributes reference EClass(source,target) | ||
27735 | */ | ||
27736 | private pattern mustInRelationeAttributes_reference_EClass( | ||
27737 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27738 | source: DefinedElement, target:DefinedElement) | ||
27739 | { | ||
27740 | find interpretation(problem,interpretation); | ||
27741 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
27742 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributes reference EClass"); | ||
27743 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
27744 | BinaryElementRelationLink.param1(link,source); | ||
27745 | BinaryElementRelationLink.param2(link,target); | ||
27746 | } | ||
27747 | /** | ||
27748 | * Matcher for detecting tuples t where <>eAttributes reference EClass(source,target) | ||
27749 | */ | ||
27750 | private pattern mayInRelationeAttributes_reference_EClass( | ||
27751 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27752 | source: DefinedElement, target:DefinedElement) | ||
27753 | { | ||
27754 | find interpretation(problem,interpretation); | ||
27755 | // The two endpoint of the link have to exist | ||
27756 | find mayExist(problem, interpretation, source); | ||
27757 | find mayExist(problem, interpretation, target); | ||
27758 | // Type consistency | ||
27759 | find mayInstanceOfEClass_class(problem,interpretation,source); | ||
27760 | find mayInstanceOfEAttribute_class(problem,interpretation,target); | ||
27761 | } or { | ||
27762 | find mustInRelationeAttributes_reference_EClass(problem,interpretation,source,target); | ||
27763 | } | ||
27764 | /** | ||
27765 | * Matcher for detecting tuples t where []eAllContainments reference EClass(source,target) | ||
27766 | */ | ||
27767 | private pattern mustInRelationeAllContainments_reference_EClass( | ||
27768 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27769 | source: DefinedElement, target:DefinedElement) | ||
27770 | { | ||
27771 | find interpretation(problem,interpretation); | ||
27772 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
27773 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllContainments reference EClass"); | ||
27774 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
27775 | BinaryElementRelationLink.param1(link,source); | ||
27776 | BinaryElementRelationLink.param2(link,target); | ||
27777 | } | ||
27778 | /** | ||
27779 | * Matcher for detecting tuples t where <>eAllContainments reference EClass(source,target) | ||
27780 | */ | ||
27781 | private pattern mayInRelationeAllContainments_reference_EClass( | ||
27782 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27783 | source: DefinedElement, target:DefinedElement) | ||
27784 | { | ||
27785 | find interpretation(problem,interpretation); | ||
27786 | // The two endpoint of the link have to exist | ||
27787 | find mayExist(problem, interpretation, source); | ||
27788 | find mayExist(problem, interpretation, target); | ||
27789 | // Type consistency | ||
27790 | find mayInstanceOfEClass_class(problem,interpretation,source); | ||
27791 | find mayInstanceOfEReference_class(problem,interpretation,target); | ||
27792 | } or { | ||
27793 | find mustInRelationeAllContainments_reference_EClass(problem,interpretation,source,target); | ||
27794 | } | ||
27795 | /** | ||
27796 | * Matcher for detecting tuples t where []eAllOperations reference EClass(source,target) | ||
27797 | */ | ||
27798 | private pattern mustInRelationeAllOperations_reference_EClass( | ||
27799 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27800 | source: DefinedElement, target:DefinedElement) | ||
27801 | { | ||
27802 | find interpretation(problem,interpretation); | ||
27803 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
27804 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllOperations reference EClass"); | ||
27805 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
27806 | BinaryElementRelationLink.param1(link,source); | ||
27807 | BinaryElementRelationLink.param2(link,target); | ||
27808 | } | ||
27809 | /** | ||
27810 | * Matcher for detecting tuples t where <>eAllOperations reference EClass(source,target) | ||
27811 | */ | ||
27812 | private pattern mayInRelationeAllOperations_reference_EClass( | ||
27813 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27814 | source: DefinedElement, target:DefinedElement) | ||
27815 | { | ||
27816 | find interpretation(problem,interpretation); | ||
27817 | // The two endpoint of the link have to exist | ||
27818 | find mayExist(problem, interpretation, source); | ||
27819 | find mayExist(problem, interpretation, target); | ||
27820 | // Type consistency | ||
27821 | find mayInstanceOfEClass_class(problem,interpretation,source); | ||
27822 | find mayInstanceOfEOperation_class(problem,interpretation,target); | ||
27823 | } or { | ||
27824 | find mustInRelationeAllOperations_reference_EClass(problem,interpretation,source,target); | ||
27825 | } | ||
27826 | /** | ||
27827 | * Matcher for detecting tuples t where []eAllStructuralFeatures reference EClass(source,target) | ||
27828 | */ | ||
27829 | private pattern mustInRelationeAllStructuralFeatures_reference_EClass( | ||
27830 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27831 | source: DefinedElement, target:DefinedElement) | ||
27832 | { | ||
27833 | find interpretation(problem,interpretation); | ||
27834 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
27835 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllStructuralFeatures reference EClass"); | ||
27836 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
27837 | BinaryElementRelationLink.param1(link,source); | ||
27838 | BinaryElementRelationLink.param2(link,target); | ||
27839 | } | ||
27840 | /** | ||
27841 | * Matcher for detecting tuples t where <>eAllStructuralFeatures reference EClass(source,target) | ||
27842 | */ | ||
27843 | private pattern mayInRelationeAllStructuralFeatures_reference_EClass( | ||
27844 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27845 | source: DefinedElement, target:DefinedElement) | ||
27846 | { | ||
27847 | find interpretation(problem,interpretation); | ||
27848 | // The two endpoint of the link have to exist | ||
27849 | find mayExist(problem, interpretation, source); | ||
27850 | find mayExist(problem, interpretation, target); | ||
27851 | // Type consistency | ||
27852 | find mayInstanceOfEClass_class(problem,interpretation,source); | ||
27853 | find mayInstanceOfEStructuralFeature_class(problem,interpretation,target); | ||
27854 | } or { | ||
27855 | find mustInRelationeAllStructuralFeatures_reference_EClass(problem,interpretation,source,target); | ||
27856 | } | ||
27857 | /** | ||
27858 | * Matcher for detecting tuples t where []eAllSuperTypes reference EClass(source,target) | ||
27859 | */ | ||
27860 | private pattern mustInRelationeAllSuperTypes_reference_EClass( | ||
27861 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27862 | source: DefinedElement, target:DefinedElement) | ||
27863 | { | ||
27864 | find interpretation(problem,interpretation); | ||
27865 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
27866 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllSuperTypes reference EClass"); | ||
27867 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
27868 | BinaryElementRelationLink.param1(link,source); | ||
27869 | BinaryElementRelationLink.param2(link,target); | ||
27870 | } | ||
27871 | /** | ||
27872 | * Matcher for detecting tuples t where <>eAllSuperTypes reference EClass(source,target) | ||
27873 | */ | ||
27874 | private pattern mayInRelationeAllSuperTypes_reference_EClass( | ||
27875 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27876 | source: DefinedElement, target:DefinedElement) | ||
27877 | { | ||
27878 | find interpretation(problem,interpretation); | ||
27879 | // The two endpoint of the link have to exist | ||
27880 | find mayExist(problem, interpretation, source); | ||
27881 | find mayExist(problem, interpretation, target); | ||
27882 | // Type consistency | ||
27883 | find mayInstanceOfEClass_class(problem,interpretation,source); | ||
27884 | find mayInstanceOfEClass_class(problem,interpretation,target); | ||
27885 | } or { | ||
27886 | find mustInRelationeAllSuperTypes_reference_EClass(problem,interpretation,source,target); | ||
27887 | } | ||
27888 | /** | ||
27889 | * Matcher for detecting tuples t where []eIDAttribute reference EClass(source,target) | ||
27890 | */ | ||
27891 | private pattern mustInRelationeIDAttribute_reference_EClass( | ||
27892 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27893 | source: DefinedElement, target:DefinedElement) | ||
27894 | { | ||
27895 | find interpretation(problem,interpretation); | ||
27896 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
27897 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eIDAttribute reference EClass"); | ||
27898 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
27899 | BinaryElementRelationLink.param1(link,source); | ||
27900 | BinaryElementRelationLink.param2(link,target); | ||
27901 | } | ||
27902 | /** | ||
27903 | * Matcher for detecting tuples t where <>eIDAttribute reference EClass(source,target) | ||
27904 | */ | ||
27905 | private pattern mayInRelationeIDAttribute_reference_EClass( | ||
27906 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27907 | source: DefinedElement, target:DefinedElement) | ||
27908 | { | ||
27909 | find interpretation(problem,interpretation); | ||
27910 | // The two endpoint of the link have to exist | ||
27911 | find mayExist(problem, interpretation, source); | ||
27912 | find mayExist(problem, interpretation, target); | ||
27913 | // Type consistency | ||
27914 | find mayInstanceOfEClass_class(problem,interpretation,source); | ||
27915 | find mayInstanceOfEAttribute_class(problem,interpretation,target); | ||
27916 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
27917 | // the upper bound of the multiplicity should be considered. | ||
27918 | numberOfExistingReferences == count find mustInRelationeIDAttribute_reference_EClass(problem,interpretation,source,_); | ||
27919 | check(numberOfExistingReferences < 1); | ||
27920 | } or { | ||
27921 | find mustInRelationeIDAttribute_reference_EClass(problem,interpretation,source,target); | ||
27922 | } | ||
27923 | /** | ||
27924 | * Matcher for detecting tuples t where []eStructuralFeatures reference EClass(source,target) | ||
27925 | */ | ||
27926 | private pattern mustInRelationeStructuralFeatures_reference_EClass( | ||
27927 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27928 | source: DefinedElement, target:DefinedElement) | ||
27929 | { | ||
27930 | find interpretation(problem,interpretation); | ||
27931 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
27932 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eStructuralFeatures reference EClass"); | ||
27933 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
27934 | BinaryElementRelationLink.param1(link,source); | ||
27935 | BinaryElementRelationLink.param2(link,target); | ||
27936 | } | ||
27937 | /** | ||
27938 | * Matcher for detecting tuples t where <>eStructuralFeatures reference EClass(source,target) | ||
27939 | */ | ||
27940 | private pattern mayInRelationeStructuralFeatures_reference_EClass( | ||
27941 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27942 | source: DefinedElement, target:DefinedElement) | ||
27943 | { | ||
27944 | find interpretation(problem,interpretation); | ||
27945 | // The two endpoint of the link have to exist | ||
27946 | find mayExist(problem, interpretation, source); | ||
27947 | find mayExist(problem, interpretation, target); | ||
27948 | // Type consistency | ||
27949 | find mayInstanceOfEClass_class(problem,interpretation,source); | ||
27950 | find mayInstanceOfEStructuralFeature_class(problem,interpretation,target); | ||
27951 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
27952 | // the upper bound of the opposite reference multiplicity should be considered. | ||
27953 | numberOfExistingOppositeReferences == count find mustInRelationeContainingClass_reference_EStructuralFeature(problem,interpretation,target,_); | ||
27954 | check(numberOfExistingOppositeReferences < 1); | ||
27955 | // The reference is containment, then a new reference cannot be create if: | ||
27956 | // 1. Multiple parents | ||
27957 | neg find mustContains4(problem,interpretation,_,target); | ||
27958 | // 2. Circle in the containment hierarchy | ||
27959 | neg find mustTransitiveContains(source,target); | ||
27960 | } or { | ||
27961 | find mustInRelationeStructuralFeatures_reference_EClass(problem,interpretation,source,target); | ||
27962 | } | ||
27963 | /** | ||
27964 | * Matcher for detecting tuples t where []eGenericSuperTypes reference EClass(source,target) | ||
27965 | */ | ||
27966 | private pattern mustInRelationeGenericSuperTypes_reference_EClass( | ||
27967 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27968 | source: DefinedElement, target:DefinedElement) | ||
27969 | { | ||
27970 | find interpretation(problem,interpretation); | ||
27971 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
27972 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eGenericSuperTypes reference EClass"); | ||
27973 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
27974 | BinaryElementRelationLink.param1(link,source); | ||
27975 | BinaryElementRelationLink.param2(link,target); | ||
27976 | } | ||
27977 | /** | ||
27978 | * Matcher for detecting tuples t where <>eGenericSuperTypes reference EClass(source,target) | ||
27979 | */ | ||
27980 | private pattern mayInRelationeGenericSuperTypes_reference_EClass( | ||
27981 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
27982 | source: DefinedElement, target:DefinedElement) | ||
27983 | { | ||
27984 | find interpretation(problem,interpretation); | ||
27985 | // The two endpoint of the link have to exist | ||
27986 | find mayExist(problem, interpretation, source); | ||
27987 | find mayExist(problem, interpretation, target); | ||
27988 | // Type consistency | ||
27989 | find mayInstanceOfEClass_class(problem,interpretation,source); | ||
27990 | find mayInstanceOfEGenericType_class(problem,interpretation,target); | ||
27991 | // The reference is containment, then a new reference cannot be create if: | ||
27992 | // 1. Multiple parents | ||
27993 | neg find mustContains4(problem,interpretation,_,target); | ||
27994 | // 2. Circle in the containment hierarchy | ||
27995 | neg find mustTransitiveContains(source,target); | ||
27996 | } or { | ||
27997 | find mustInRelationeGenericSuperTypes_reference_EClass(problem,interpretation,source,target); | ||
27998 | } | ||
27999 | /** | ||
28000 | * Matcher for detecting tuples t where []eAllGenericSuperTypes reference EClass(source,target) | ||
28001 | */ | ||
28002 | private pattern mustInRelationeAllGenericSuperTypes_reference_EClass( | ||
28003 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28004 | source: DefinedElement, target:DefinedElement) | ||
28005 | { | ||
28006 | find interpretation(problem,interpretation); | ||
28007 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28008 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllGenericSuperTypes reference EClass"); | ||
28009 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28010 | BinaryElementRelationLink.param1(link,source); | ||
28011 | BinaryElementRelationLink.param2(link,target); | ||
28012 | } | ||
28013 | /** | ||
28014 | * Matcher for detecting tuples t where <>eAllGenericSuperTypes reference EClass(source,target) | ||
28015 | */ | ||
28016 | private pattern mayInRelationeAllGenericSuperTypes_reference_EClass( | ||
28017 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28018 | source: DefinedElement, target:DefinedElement) | ||
28019 | { | ||
28020 | find interpretation(problem,interpretation); | ||
28021 | // The two endpoint of the link have to exist | ||
28022 | find mayExist(problem, interpretation, source); | ||
28023 | find mayExist(problem, interpretation, target); | ||
28024 | // Type consistency | ||
28025 | find mayInstanceOfEClass_class(problem,interpretation,source); | ||
28026 | find mayInstanceOfEGenericType_class(problem,interpretation,target); | ||
28027 | } or { | ||
28028 | find mustInRelationeAllGenericSuperTypes_reference_EClass(problem,interpretation,source,target); | ||
28029 | } | ||
28030 | /** | ||
28031 | * Matcher for detecting tuples t where []ePackage reference EClassifier(source,target) | ||
28032 | */ | ||
28033 | private pattern mustInRelationePackage_reference_EClassifier( | ||
28034 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28035 | source: DefinedElement, target:DefinedElement) | ||
28036 | { | ||
28037 | find interpretation(problem,interpretation); | ||
28038 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28039 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"ePackage reference EClassifier"); | ||
28040 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28041 | BinaryElementRelationLink.param1(link,source); | ||
28042 | BinaryElementRelationLink.param2(link,target); | ||
28043 | } | ||
28044 | /** | ||
28045 | * Matcher for detecting tuples t where <>ePackage reference EClassifier(source,target) | ||
28046 | */ | ||
28047 | private pattern mayInRelationePackage_reference_EClassifier( | ||
28048 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28049 | source: DefinedElement, target:DefinedElement) | ||
28050 | { | ||
28051 | find interpretation(problem,interpretation); | ||
28052 | // The two endpoint of the link have to exist | ||
28053 | find mayExist(problem, interpretation, source); | ||
28054 | find mayExist(problem, interpretation, target); | ||
28055 | // Type consistency | ||
28056 | find mayInstanceOfEClassifier_class(problem,interpretation,source); | ||
28057 | find mayInstanceOfEPackage_class(problem,interpretation,target); | ||
28058 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
28059 | // the upper bound of the multiplicity should be considered. | ||
28060 | numberOfExistingReferences == count find mustInRelationePackage_reference_EClassifier(problem,interpretation,source,_); | ||
28061 | check(numberOfExistingReferences < 1); | ||
28062 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
28063 | // 1. Multiple parents | ||
28064 | neg find mustContains4(problem,interpretation,source,_); | ||
28065 | // 2. Circle in the containment hierarchy | ||
28066 | neg find mustTransitiveContains(source,target); | ||
28067 | } or { | ||
28068 | find mustInRelationePackage_reference_EClassifier(problem,interpretation,source,target); | ||
28069 | } | ||
28070 | /** | ||
28071 | * Matcher for detecting tuples t where []eTypeParameters reference EClassifier(source,target) | ||
28072 | */ | ||
28073 | private pattern mustInRelationeTypeParameters_reference_EClassifier( | ||
28074 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28075 | source: DefinedElement, target:DefinedElement) | ||
28076 | { | ||
28077 | find interpretation(problem,interpretation); | ||
28078 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28079 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameters reference EClassifier"); | ||
28080 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28081 | BinaryElementRelationLink.param1(link,source); | ||
28082 | BinaryElementRelationLink.param2(link,target); | ||
28083 | } | ||
28084 | /** | ||
28085 | * Matcher for detecting tuples t where <>eTypeParameters reference EClassifier(source,target) | ||
28086 | */ | ||
28087 | private pattern mayInRelationeTypeParameters_reference_EClassifier( | ||
28088 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28089 | source: DefinedElement, target:DefinedElement) | ||
28090 | { | ||
28091 | find interpretation(problem,interpretation); | ||
28092 | // The two endpoint of the link have to exist | ||
28093 | find mayExist(problem, interpretation, source); | ||
28094 | find mayExist(problem, interpretation, target); | ||
28095 | // Type consistency | ||
28096 | find mayInstanceOfEClassifier_class(problem,interpretation,source); | ||
28097 | find mayInstanceOfETypeParameter_class(problem,interpretation,target); | ||
28098 | // The reference is containment, then a new reference cannot be create if: | ||
28099 | // 1. Multiple parents | ||
28100 | neg find mustContains4(problem,interpretation,_,target); | ||
28101 | // 2. Circle in the containment hierarchy | ||
28102 | neg find mustTransitiveContains(source,target); | ||
28103 | } or { | ||
28104 | find mustInRelationeTypeParameters_reference_EClassifier(problem,interpretation,source,target); | ||
28105 | } | ||
28106 | /** | ||
28107 | * Matcher for detecting tuples t where []eLiterals reference EEnum(source,target) | ||
28108 | */ | ||
28109 | private pattern mustInRelationeLiterals_reference_EEnum( | ||
28110 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28111 | source: DefinedElement, target:DefinedElement) | ||
28112 | { | ||
28113 | find interpretation(problem,interpretation); | ||
28114 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28115 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eLiterals reference EEnum"); | ||
28116 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28117 | BinaryElementRelationLink.param1(link,source); | ||
28118 | BinaryElementRelationLink.param2(link,target); | ||
28119 | } | ||
28120 | /** | ||
28121 | * Matcher for detecting tuples t where <>eLiterals reference EEnum(source,target) | ||
28122 | */ | ||
28123 | private pattern mayInRelationeLiterals_reference_EEnum( | ||
28124 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28125 | source: DefinedElement, target:DefinedElement) | ||
28126 | { | ||
28127 | find interpretation(problem,interpretation); | ||
28128 | // The two endpoint of the link have to exist | ||
28129 | find mayExist(problem, interpretation, source); | ||
28130 | find mayExist(problem, interpretation, target); | ||
28131 | // Type consistency | ||
28132 | find mayInstanceOfEEnum_class(problem,interpretation,source); | ||
28133 | find mayInstanceOfEEnumLiteral_class(problem,interpretation,target); | ||
28134 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
28135 | // the upper bound of the opposite reference multiplicity should be considered. | ||
28136 | numberOfExistingOppositeReferences == count find mustInRelationeEnum_reference_EEnumLiteral(problem,interpretation,target,_); | ||
28137 | check(numberOfExistingOppositeReferences < 1); | ||
28138 | // The reference is containment, then a new reference cannot be create if: | ||
28139 | // 1. Multiple parents | ||
28140 | neg find mustContains4(problem,interpretation,_,target); | ||
28141 | // 2. Circle in the containment hierarchy | ||
28142 | neg find mustTransitiveContains(source,target); | ||
28143 | } or { | ||
28144 | find mustInRelationeLiterals_reference_EEnum(problem,interpretation,source,target); | ||
28145 | } | ||
28146 | /** | ||
28147 | * Matcher for detecting tuples t where []eEnum reference EEnumLiteral(source,target) | ||
28148 | */ | ||
28149 | private pattern mustInRelationeEnum_reference_EEnumLiteral( | ||
28150 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28151 | source: DefinedElement, target:DefinedElement) | ||
28152 | { | ||
28153 | find interpretation(problem,interpretation); | ||
28154 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28155 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eEnum reference EEnumLiteral"); | ||
28156 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28157 | BinaryElementRelationLink.param1(link,source); | ||
28158 | BinaryElementRelationLink.param2(link,target); | ||
28159 | } | ||
28160 | /** | ||
28161 | * Matcher for detecting tuples t where <>eEnum reference EEnumLiteral(source,target) | ||
28162 | */ | ||
28163 | private pattern mayInRelationeEnum_reference_EEnumLiteral( | ||
28164 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28165 | source: DefinedElement, target:DefinedElement) | ||
28166 | { | ||
28167 | find interpretation(problem,interpretation); | ||
28168 | // The two endpoint of the link have to exist | ||
28169 | find mayExist(problem, interpretation, source); | ||
28170 | find mayExist(problem, interpretation, target); | ||
28171 | // Type consistency | ||
28172 | find mayInstanceOfEEnumLiteral_class(problem,interpretation,source); | ||
28173 | find mayInstanceOfEEnum_class(problem,interpretation,target); | ||
28174 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
28175 | // the upper bound of the multiplicity should be considered. | ||
28176 | numberOfExistingReferences == count find mustInRelationeEnum_reference_EEnumLiteral(problem,interpretation,source,_); | ||
28177 | check(numberOfExistingReferences < 1); | ||
28178 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
28179 | // 1. Multiple parents | ||
28180 | neg find mustContains4(problem,interpretation,source,_); | ||
28181 | // 2. Circle in the containment hierarchy | ||
28182 | neg find mustTransitiveContains(source,target); | ||
28183 | } or { | ||
28184 | find mustInRelationeEnum_reference_EEnumLiteral(problem,interpretation,source,target); | ||
28185 | } | ||
28186 | /** | ||
28187 | * Matcher for detecting tuples t where []eAnnotations reference EModelElement(source,target) | ||
28188 | */ | ||
28189 | private pattern mustInRelationeAnnotations_reference_EModelElement( | ||
28190 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28191 | source: DefinedElement, target:DefinedElement) | ||
28192 | { | ||
28193 | find interpretation(problem,interpretation); | ||
28194 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28195 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAnnotations reference EModelElement"); | ||
28196 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28197 | BinaryElementRelationLink.param1(link,source); | ||
28198 | BinaryElementRelationLink.param2(link,target); | ||
28199 | } | ||
28200 | /** | ||
28201 | * Matcher for detecting tuples t where <>eAnnotations reference EModelElement(source,target) | ||
28202 | */ | ||
28203 | private pattern mayInRelationeAnnotations_reference_EModelElement( | ||
28204 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28205 | source: DefinedElement, target:DefinedElement) | ||
28206 | { | ||
28207 | find interpretation(problem,interpretation); | ||
28208 | // The two endpoint of the link have to exist | ||
28209 | find mayExist(problem, interpretation, source); | ||
28210 | find mayExist(problem, interpretation, target); | ||
28211 | // Type consistency | ||
28212 | find mayInstanceOfEModelElement_class(problem,interpretation,source); | ||
28213 | find mayInstanceOfEAnnotation_class(problem,interpretation,target); | ||
28214 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
28215 | // the upper bound of the opposite reference multiplicity should be considered. | ||
28216 | numberOfExistingOppositeReferences == count find mustInRelationeModelElement_reference_EAnnotation(problem,interpretation,target,_); | ||
28217 | check(numberOfExistingOppositeReferences < 1); | ||
28218 | // The reference is containment, then a new reference cannot be create if: | ||
28219 | // 1. Multiple parents | ||
28220 | neg find mustContains4(problem,interpretation,_,target); | ||
28221 | // 2. Circle in the containment hierarchy | ||
28222 | neg find mustTransitiveContains(source,target); | ||
28223 | } or { | ||
28224 | find mustInRelationeAnnotations_reference_EModelElement(problem,interpretation,source,target); | ||
28225 | } | ||
28226 | /** | ||
28227 | * Matcher for detecting tuples t where []eContainingClass reference EOperation(source,target) | ||
28228 | */ | ||
28229 | private pattern mustInRelationeContainingClass_reference_EOperation( | ||
28230 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28231 | source: DefinedElement, target:DefinedElement) | ||
28232 | { | ||
28233 | find interpretation(problem,interpretation); | ||
28234 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28235 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eContainingClass reference EOperation"); | ||
28236 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28237 | BinaryElementRelationLink.param1(link,source); | ||
28238 | BinaryElementRelationLink.param2(link,target); | ||
28239 | } | ||
28240 | /** | ||
28241 | * Matcher for detecting tuples t where <>eContainingClass reference EOperation(source,target) | ||
28242 | */ | ||
28243 | private pattern mayInRelationeContainingClass_reference_EOperation( | ||
28244 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28245 | source: DefinedElement, target:DefinedElement) | ||
28246 | { | ||
28247 | find interpretation(problem,interpretation); | ||
28248 | // The two endpoint of the link have to exist | ||
28249 | find mayExist(problem, interpretation, source); | ||
28250 | find mayExist(problem, interpretation, target); | ||
28251 | // Type consistency | ||
28252 | find mayInstanceOfEOperation_class(problem,interpretation,source); | ||
28253 | find mayInstanceOfEClass_class(problem,interpretation,target); | ||
28254 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
28255 | // the upper bound of the multiplicity should be considered. | ||
28256 | numberOfExistingReferences == count find mustInRelationeContainingClass_reference_EOperation(problem,interpretation,source,_); | ||
28257 | check(numberOfExistingReferences < 1); | ||
28258 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
28259 | // 1. Multiple parents | ||
28260 | neg find mustContains4(problem,interpretation,source,_); | ||
28261 | // 2. Circle in the containment hierarchy | ||
28262 | neg find mustTransitiveContains(source,target); | ||
28263 | } or { | ||
28264 | find mustInRelationeContainingClass_reference_EOperation(problem,interpretation,source,target); | ||
28265 | } | ||
28266 | /** | ||
28267 | * Matcher for detecting tuples t where []eTypeParameters reference EOperation(source,target) | ||
28268 | */ | ||
28269 | private pattern mustInRelationeTypeParameters_reference_EOperation( | ||
28270 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28271 | source: DefinedElement, target:DefinedElement) | ||
28272 | { | ||
28273 | find interpretation(problem,interpretation); | ||
28274 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28275 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameters reference EOperation"); | ||
28276 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28277 | BinaryElementRelationLink.param1(link,source); | ||
28278 | BinaryElementRelationLink.param2(link,target); | ||
28279 | } | ||
28280 | /** | ||
28281 | * Matcher for detecting tuples t where <>eTypeParameters reference EOperation(source,target) | ||
28282 | */ | ||
28283 | private pattern mayInRelationeTypeParameters_reference_EOperation( | ||
28284 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28285 | source: DefinedElement, target:DefinedElement) | ||
28286 | { | ||
28287 | find interpretation(problem,interpretation); | ||
28288 | // The two endpoint of the link have to exist | ||
28289 | find mayExist(problem, interpretation, source); | ||
28290 | find mayExist(problem, interpretation, target); | ||
28291 | // Type consistency | ||
28292 | find mayInstanceOfEOperation_class(problem,interpretation,source); | ||
28293 | find mayInstanceOfETypeParameter_class(problem,interpretation,target); | ||
28294 | // The reference is containment, then a new reference cannot be create if: | ||
28295 | // 1. Multiple parents | ||
28296 | neg find mustContains4(problem,interpretation,_,target); | ||
28297 | // 2. Circle in the containment hierarchy | ||
28298 | neg find mustTransitiveContains(source,target); | ||
28299 | } or { | ||
28300 | find mustInRelationeTypeParameters_reference_EOperation(problem,interpretation,source,target); | ||
28301 | } | ||
28302 | /** | ||
28303 | * Matcher for detecting tuples t where []eParameters reference EOperation(source,target) | ||
28304 | */ | ||
28305 | private pattern mustInRelationeParameters_reference_EOperation( | ||
28306 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28307 | source: DefinedElement, target:DefinedElement) | ||
28308 | { | ||
28309 | find interpretation(problem,interpretation); | ||
28310 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28311 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eParameters reference EOperation"); | ||
28312 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28313 | BinaryElementRelationLink.param1(link,source); | ||
28314 | BinaryElementRelationLink.param2(link,target); | ||
28315 | } | ||
28316 | /** | ||
28317 | * Matcher for detecting tuples t where <>eParameters reference EOperation(source,target) | ||
28318 | */ | ||
28319 | private pattern mayInRelationeParameters_reference_EOperation( | ||
28320 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28321 | source: DefinedElement, target:DefinedElement) | ||
28322 | { | ||
28323 | find interpretation(problem,interpretation); | ||
28324 | // The two endpoint of the link have to exist | ||
28325 | find mayExist(problem, interpretation, source); | ||
28326 | find mayExist(problem, interpretation, target); | ||
28327 | // Type consistency | ||
28328 | find mayInstanceOfEOperation_class(problem,interpretation,source); | ||
28329 | find mayInstanceOfEParameter_class(problem,interpretation,target); | ||
28330 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
28331 | // the upper bound of the opposite reference multiplicity should be considered. | ||
28332 | numberOfExistingOppositeReferences == count find mustInRelationeOperation_reference_EParameter(problem,interpretation,target,_); | ||
28333 | check(numberOfExistingOppositeReferences < 1); | ||
28334 | // The reference is containment, then a new reference cannot be create if: | ||
28335 | // 1. Multiple parents | ||
28336 | neg find mustContains4(problem,interpretation,_,target); | ||
28337 | // 2. Circle in the containment hierarchy | ||
28338 | neg find mustTransitiveContains(source,target); | ||
28339 | } or { | ||
28340 | find mustInRelationeParameters_reference_EOperation(problem,interpretation,source,target); | ||
28341 | } | ||
28342 | /** | ||
28343 | * Matcher for detecting tuples t where []eExceptions reference EOperation(source,target) | ||
28344 | */ | ||
28345 | private pattern mustInRelationeExceptions_reference_EOperation( | ||
28346 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28347 | source: DefinedElement, target:DefinedElement) | ||
28348 | { | ||
28349 | find interpretation(problem,interpretation); | ||
28350 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28351 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eExceptions reference EOperation"); | ||
28352 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28353 | BinaryElementRelationLink.param1(link,source); | ||
28354 | BinaryElementRelationLink.param2(link,target); | ||
28355 | } | ||
28356 | /** | ||
28357 | * Matcher for detecting tuples t where <>eExceptions reference EOperation(source,target) | ||
28358 | */ | ||
28359 | private pattern mayInRelationeExceptions_reference_EOperation( | ||
28360 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28361 | source: DefinedElement, target:DefinedElement) | ||
28362 | { | ||
28363 | find interpretation(problem,interpretation); | ||
28364 | // The two endpoint of the link have to exist | ||
28365 | find mayExist(problem, interpretation, source); | ||
28366 | find mayExist(problem, interpretation, target); | ||
28367 | // Type consistency | ||
28368 | find mayInstanceOfEOperation_class(problem,interpretation,source); | ||
28369 | find mayInstanceOfEClassifier_class(problem,interpretation,target); | ||
28370 | } or { | ||
28371 | find mustInRelationeExceptions_reference_EOperation(problem,interpretation,source,target); | ||
28372 | } | ||
28373 | /** | ||
28374 | * Matcher for detecting tuples t where []eGenericExceptions reference EOperation(source,target) | ||
28375 | */ | ||
28376 | private pattern mustInRelationeGenericExceptions_reference_EOperation( | ||
28377 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28378 | source: DefinedElement, target:DefinedElement) | ||
28379 | { | ||
28380 | find interpretation(problem,interpretation); | ||
28381 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28382 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eGenericExceptions reference EOperation"); | ||
28383 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28384 | BinaryElementRelationLink.param1(link,source); | ||
28385 | BinaryElementRelationLink.param2(link,target); | ||
28386 | } | ||
28387 | /** | ||
28388 | * Matcher for detecting tuples t where <>eGenericExceptions reference EOperation(source,target) | ||
28389 | */ | ||
28390 | private pattern mayInRelationeGenericExceptions_reference_EOperation( | ||
28391 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28392 | source: DefinedElement, target:DefinedElement) | ||
28393 | { | ||
28394 | find interpretation(problem,interpretation); | ||
28395 | // The two endpoint of the link have to exist | ||
28396 | find mayExist(problem, interpretation, source); | ||
28397 | find mayExist(problem, interpretation, target); | ||
28398 | // Type consistency | ||
28399 | find mayInstanceOfEOperation_class(problem,interpretation,source); | ||
28400 | find mayInstanceOfEGenericType_class(problem,interpretation,target); | ||
28401 | // The reference is containment, then a new reference cannot be create if: | ||
28402 | // 1. Multiple parents | ||
28403 | neg find mustContains4(problem,interpretation,_,target); | ||
28404 | // 2. Circle in the containment hierarchy | ||
28405 | neg find mustTransitiveContains(source,target); | ||
28406 | } or { | ||
28407 | find mustInRelationeGenericExceptions_reference_EOperation(problem,interpretation,source,target); | ||
28408 | } | ||
28409 | /** | ||
28410 | * Matcher for detecting tuples t where []eClassifiers reference EPackage(source,target) | ||
28411 | */ | ||
28412 | private pattern mustInRelationeClassifiers_reference_EPackage( | ||
28413 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28414 | source: DefinedElement, target:DefinedElement) | ||
28415 | { | ||
28416 | find interpretation(problem,interpretation); | ||
28417 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28418 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eClassifiers reference EPackage"); | ||
28419 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28420 | BinaryElementRelationLink.param1(link,source); | ||
28421 | BinaryElementRelationLink.param2(link,target); | ||
28422 | } | ||
28423 | /** | ||
28424 | * Matcher for detecting tuples t where <>eClassifiers reference EPackage(source,target) | ||
28425 | */ | ||
28426 | private pattern mayInRelationeClassifiers_reference_EPackage( | ||
28427 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28428 | source: DefinedElement, target:DefinedElement) | ||
28429 | { | ||
28430 | find interpretation(problem,interpretation); | ||
28431 | // The two endpoint of the link have to exist | ||
28432 | find mayExist(problem, interpretation, source); | ||
28433 | find mayExist(problem, interpretation, target); | ||
28434 | // Type consistency | ||
28435 | find mayInstanceOfEPackage_class(problem,interpretation,source); | ||
28436 | find mayInstanceOfEClassifier_class(problem,interpretation,target); | ||
28437 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
28438 | // the upper bound of the opposite reference multiplicity should be considered. | ||
28439 | numberOfExistingOppositeReferences == count find mustInRelationePackage_reference_EClassifier(problem,interpretation,target,_); | ||
28440 | check(numberOfExistingOppositeReferences < 1); | ||
28441 | // The reference is containment, then a new reference cannot be create if: | ||
28442 | // 1. Multiple parents | ||
28443 | neg find mustContains4(problem,interpretation,_,target); | ||
28444 | // 2. Circle in the containment hierarchy | ||
28445 | neg find mustTransitiveContains(source,target); | ||
28446 | } or { | ||
28447 | find mustInRelationeClassifiers_reference_EPackage(problem,interpretation,source,target); | ||
28448 | } | ||
28449 | /** | ||
28450 | * Matcher for detecting tuples t where []eSubpackages reference EPackage(source,target) | ||
28451 | */ | ||
28452 | private pattern mustInRelationeSubpackages_reference_EPackage( | ||
28453 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28454 | source: DefinedElement, target:DefinedElement) | ||
28455 | { | ||
28456 | find interpretation(problem,interpretation); | ||
28457 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28458 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSubpackages reference EPackage"); | ||
28459 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28460 | BinaryElementRelationLink.param1(link,source); | ||
28461 | BinaryElementRelationLink.param2(link,target); | ||
28462 | } | ||
28463 | /** | ||
28464 | * Matcher for detecting tuples t where <>eSubpackages reference EPackage(source,target) | ||
28465 | */ | ||
28466 | private pattern mayInRelationeSubpackages_reference_EPackage( | ||
28467 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28468 | source: DefinedElement, target:DefinedElement) | ||
28469 | { | ||
28470 | find interpretation(problem,interpretation); | ||
28471 | // The two endpoint of the link have to exist | ||
28472 | find mayExist(problem, interpretation, source); | ||
28473 | find mayExist(problem, interpretation, target); | ||
28474 | // Type consistency | ||
28475 | find mayInstanceOfEPackage_class(problem,interpretation,source); | ||
28476 | find mayInstanceOfEPackage_class(problem,interpretation,target); | ||
28477 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
28478 | // the upper bound of the opposite reference multiplicity should be considered. | ||
28479 | numberOfExistingOppositeReferences == count find mustInRelationeSuperPackage_reference_EPackage(problem,interpretation,target,_); | ||
28480 | check(numberOfExistingOppositeReferences < 1); | ||
28481 | // The reference is containment, then a new reference cannot be create if: | ||
28482 | // 1. Multiple parents | ||
28483 | neg find mustContains4(problem,interpretation,_,target); | ||
28484 | // 2. Circle in the containment hierarchy | ||
28485 | neg find mustTransitiveContains(source,target); | ||
28486 | } or { | ||
28487 | find mustInRelationeSubpackages_reference_EPackage(problem,interpretation,source,target); | ||
28488 | } | ||
28489 | /** | ||
28490 | * Matcher for detecting tuples t where []eSuperPackage reference EPackage(source,target) | ||
28491 | */ | ||
28492 | private pattern mustInRelationeSuperPackage_reference_EPackage( | ||
28493 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28494 | source: DefinedElement, target:DefinedElement) | ||
28495 | { | ||
28496 | find interpretation(problem,interpretation); | ||
28497 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28498 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSuperPackage reference EPackage"); | ||
28499 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28500 | BinaryElementRelationLink.param1(link,source); | ||
28501 | BinaryElementRelationLink.param2(link,target); | ||
28502 | } | ||
28503 | /** | ||
28504 | * Matcher for detecting tuples t where <>eSuperPackage reference EPackage(source,target) | ||
28505 | */ | ||
28506 | private pattern mayInRelationeSuperPackage_reference_EPackage( | ||
28507 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28508 | source: DefinedElement, target:DefinedElement) | ||
28509 | { | ||
28510 | find interpretation(problem,interpretation); | ||
28511 | // The two endpoint of the link have to exist | ||
28512 | find mayExist(problem, interpretation, source); | ||
28513 | find mayExist(problem, interpretation, target); | ||
28514 | // Type consistency | ||
28515 | find mayInstanceOfEPackage_class(problem,interpretation,source); | ||
28516 | find mayInstanceOfEPackage_class(problem,interpretation,target); | ||
28517 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
28518 | // the upper bound of the multiplicity should be considered. | ||
28519 | numberOfExistingReferences == count find mustInRelationeSuperPackage_reference_EPackage(problem,interpretation,source,_); | ||
28520 | check(numberOfExistingReferences < 1); | ||
28521 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
28522 | // 1. Multiple parents | ||
28523 | neg find mustContains4(problem,interpretation,source,_); | ||
28524 | // 2. Circle in the containment hierarchy | ||
28525 | neg find mustTransitiveContains(source,target); | ||
28526 | } or { | ||
28527 | find mustInRelationeSuperPackage_reference_EPackage(problem,interpretation,source,target); | ||
28528 | } | ||
28529 | /** | ||
28530 | * Matcher for detecting tuples t where []eOperation reference EParameter(source,target) | ||
28531 | */ | ||
28532 | private pattern mustInRelationeOperation_reference_EParameter( | ||
28533 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28534 | source: DefinedElement, target:DefinedElement) | ||
28535 | { | ||
28536 | find interpretation(problem,interpretation); | ||
28537 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28538 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOperation reference EParameter"); | ||
28539 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28540 | BinaryElementRelationLink.param1(link,source); | ||
28541 | BinaryElementRelationLink.param2(link,target); | ||
28542 | } | ||
28543 | /** | ||
28544 | * Matcher for detecting tuples t where <>eOperation reference EParameter(source,target) | ||
28545 | */ | ||
28546 | private pattern mayInRelationeOperation_reference_EParameter( | ||
28547 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28548 | source: DefinedElement, target:DefinedElement) | ||
28549 | { | ||
28550 | find interpretation(problem,interpretation); | ||
28551 | // The two endpoint of the link have to exist | ||
28552 | find mayExist(problem, interpretation, source); | ||
28553 | find mayExist(problem, interpretation, target); | ||
28554 | // Type consistency | ||
28555 | find mayInstanceOfEParameter_class(problem,interpretation,source); | ||
28556 | find mayInstanceOfEOperation_class(problem,interpretation,target); | ||
28557 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
28558 | // the upper bound of the multiplicity should be considered. | ||
28559 | numberOfExistingReferences == count find mustInRelationeOperation_reference_EParameter(problem,interpretation,source,_); | ||
28560 | check(numberOfExistingReferences < 1); | ||
28561 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
28562 | // 1. Multiple parents | ||
28563 | neg find mustContains4(problem,interpretation,source,_); | ||
28564 | // 2. Circle in the containment hierarchy | ||
28565 | neg find mustTransitiveContains(source,target); | ||
28566 | } or { | ||
28567 | find mustInRelationeOperation_reference_EParameter(problem,interpretation,source,target); | ||
28568 | } | ||
28569 | /** | ||
28570 | * Matcher for detecting tuples t where []eOpposite reference EReference(source,target) | ||
28571 | */ | ||
28572 | private pattern mustInRelationeOpposite_reference_EReference( | ||
28573 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28574 | source: DefinedElement, target:DefinedElement) | ||
28575 | { | ||
28576 | find interpretation(problem,interpretation); | ||
28577 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28578 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOpposite reference EReference"); | ||
28579 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28580 | BinaryElementRelationLink.param1(link,source); | ||
28581 | BinaryElementRelationLink.param2(link,target); | ||
28582 | } | ||
28583 | /** | ||
28584 | * Matcher for detecting tuples t where <>eOpposite reference EReference(source,target) | ||
28585 | */ | ||
28586 | private pattern mayInRelationeOpposite_reference_EReference( | ||
28587 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28588 | source: DefinedElement, target:DefinedElement) | ||
28589 | { | ||
28590 | find interpretation(problem,interpretation); | ||
28591 | // The two endpoint of the link have to exist | ||
28592 | find mayExist(problem, interpretation, source); | ||
28593 | find mayExist(problem, interpretation, target); | ||
28594 | // Type consistency | ||
28595 | find mayInstanceOfEReference_class(problem,interpretation,source); | ||
28596 | find mayInstanceOfEReference_class(problem,interpretation,target); | ||
28597 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
28598 | // the upper bound of the multiplicity should be considered. | ||
28599 | numberOfExistingReferences == count find mustInRelationeOpposite_reference_EReference(problem,interpretation,source,_); | ||
28600 | check(numberOfExistingReferences < 1); | ||
28601 | } or { | ||
28602 | find mustInRelationeOpposite_reference_EReference(problem,interpretation,source,target); | ||
28603 | } | ||
28604 | /** | ||
28605 | * Matcher for detecting tuples t where []eReferenceType reference EReference(source,target) | ||
28606 | */ | ||
28607 | private pattern mustInRelationeReferenceType_reference_EReference( | ||
28608 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28609 | source: DefinedElement, target:DefinedElement) | ||
28610 | { | ||
28611 | find interpretation(problem,interpretation); | ||
28612 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28613 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferenceType reference EReference"); | ||
28614 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28615 | BinaryElementRelationLink.param1(link,source); | ||
28616 | BinaryElementRelationLink.param2(link,target); | ||
28617 | } | ||
28618 | /** | ||
28619 | * Matcher for detecting tuples t where <>eReferenceType reference EReference(source,target) | ||
28620 | */ | ||
28621 | private pattern mayInRelationeReferenceType_reference_EReference( | ||
28622 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28623 | source: DefinedElement, target:DefinedElement) | ||
28624 | { | ||
28625 | find interpretation(problem,interpretation); | ||
28626 | // The two endpoint of the link have to exist | ||
28627 | find mayExist(problem, interpretation, source); | ||
28628 | find mayExist(problem, interpretation, target); | ||
28629 | // Type consistency | ||
28630 | find mayInstanceOfEReference_class(problem,interpretation,source); | ||
28631 | find mayInstanceOfEClass_class(problem,interpretation,target); | ||
28632 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
28633 | // the upper bound of the multiplicity should be considered. | ||
28634 | numberOfExistingReferences == count find mustInRelationeReferenceType_reference_EReference(problem,interpretation,source,_); | ||
28635 | check(numberOfExistingReferences < 1); | ||
28636 | } or { | ||
28637 | find mustInRelationeReferenceType_reference_EReference(problem,interpretation,source,target); | ||
28638 | } | ||
28639 | /** | ||
28640 | * Matcher for detecting tuples t where []eKeys reference EReference(source,target) | ||
28641 | */ | ||
28642 | private pattern mustInRelationeKeys_reference_EReference( | ||
28643 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28644 | source: DefinedElement, target:DefinedElement) | ||
28645 | { | ||
28646 | find interpretation(problem,interpretation); | ||
28647 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28648 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eKeys reference EReference"); | ||
28649 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28650 | BinaryElementRelationLink.param1(link,source); | ||
28651 | BinaryElementRelationLink.param2(link,target); | ||
28652 | } | ||
28653 | /** | ||
28654 | * Matcher for detecting tuples t where <>eKeys reference EReference(source,target) | ||
28655 | */ | ||
28656 | private pattern mayInRelationeKeys_reference_EReference( | ||
28657 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28658 | source: DefinedElement, target:DefinedElement) | ||
28659 | { | ||
28660 | find interpretation(problem,interpretation); | ||
28661 | // The two endpoint of the link have to exist | ||
28662 | find mayExist(problem, interpretation, source); | ||
28663 | find mayExist(problem, interpretation, target); | ||
28664 | // Type consistency | ||
28665 | find mayInstanceOfEReference_class(problem,interpretation,source); | ||
28666 | find mayInstanceOfEAttribute_class(problem,interpretation,target); | ||
28667 | } or { | ||
28668 | find mustInRelationeKeys_reference_EReference(problem,interpretation,source,target); | ||
28669 | } | ||
28670 | /** | ||
28671 | * Matcher for detecting tuples t where []eContainingClass reference EStructuralFeature(source,target) | ||
28672 | */ | ||
28673 | private pattern mustInRelationeContainingClass_reference_EStructuralFeature( | ||
28674 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28675 | source: DefinedElement, target:DefinedElement) | ||
28676 | { | ||
28677 | find interpretation(problem,interpretation); | ||
28678 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28679 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eContainingClass reference EStructuralFeature"); | ||
28680 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28681 | BinaryElementRelationLink.param1(link,source); | ||
28682 | BinaryElementRelationLink.param2(link,target); | ||
28683 | } | ||
28684 | /** | ||
28685 | * Matcher for detecting tuples t where <>eContainingClass reference EStructuralFeature(source,target) | ||
28686 | */ | ||
28687 | private pattern mayInRelationeContainingClass_reference_EStructuralFeature( | ||
28688 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28689 | source: DefinedElement, target:DefinedElement) | ||
28690 | { | ||
28691 | find interpretation(problem,interpretation); | ||
28692 | // The two endpoint of the link have to exist | ||
28693 | find mayExist(problem, interpretation, source); | ||
28694 | find mayExist(problem, interpretation, target); | ||
28695 | // Type consistency | ||
28696 | find mayInstanceOfEStructuralFeature_class(problem,interpretation,source); | ||
28697 | find mayInstanceOfEClass_class(problem,interpretation,target); | ||
28698 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
28699 | // the upper bound of the multiplicity should be considered. | ||
28700 | numberOfExistingReferences == count find mustInRelationeContainingClass_reference_EStructuralFeature(problem,interpretation,source,_); | ||
28701 | check(numberOfExistingReferences < 1); | ||
28702 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
28703 | // 1. Multiple parents | ||
28704 | neg find mustContains4(problem,interpretation,source,_); | ||
28705 | // 2. Circle in the containment hierarchy | ||
28706 | neg find mustTransitiveContains(source,target); | ||
28707 | } or { | ||
28708 | find mustInRelationeContainingClass_reference_EStructuralFeature(problem,interpretation,source,target); | ||
28709 | } | ||
28710 | /** | ||
28711 | * Matcher for detecting tuples t where []eType reference ETypedElement(source,target) | ||
28712 | */ | ||
28713 | private pattern mustInRelationeType_reference_ETypedElement( | ||
28714 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28715 | source: DefinedElement, target:DefinedElement) | ||
28716 | { | ||
28717 | find interpretation(problem,interpretation); | ||
28718 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28719 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eType reference ETypedElement"); | ||
28720 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28721 | BinaryElementRelationLink.param1(link,source); | ||
28722 | BinaryElementRelationLink.param2(link,target); | ||
28723 | } | ||
28724 | /** | ||
28725 | * Matcher for detecting tuples t where <>eType reference ETypedElement(source,target) | ||
28726 | */ | ||
28727 | private pattern mayInRelationeType_reference_ETypedElement( | ||
28728 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28729 | source: DefinedElement, target:DefinedElement) | ||
28730 | { | ||
28731 | find interpretation(problem,interpretation); | ||
28732 | // The two endpoint of the link have to exist | ||
28733 | find mayExist(problem, interpretation, source); | ||
28734 | find mayExist(problem, interpretation, target); | ||
28735 | // Type consistency | ||
28736 | find mayInstanceOfETypedElement_class(problem,interpretation,source); | ||
28737 | find mayInstanceOfEClassifier_class(problem,interpretation,target); | ||
28738 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
28739 | // the upper bound of the multiplicity should be considered. | ||
28740 | numberOfExistingReferences == count find mustInRelationeType_reference_ETypedElement(problem,interpretation,source,_); | ||
28741 | check(numberOfExistingReferences < 1); | ||
28742 | } or { | ||
28743 | find mustInRelationeType_reference_ETypedElement(problem,interpretation,source,target); | ||
28744 | } | ||
28745 | /** | ||
28746 | * Matcher for detecting tuples t where []eGenericType reference ETypedElement(source,target) | ||
28747 | */ | ||
28748 | private pattern mustInRelationeGenericType_reference_ETypedElement( | ||
28749 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28750 | source: DefinedElement, target:DefinedElement) | ||
28751 | { | ||
28752 | find interpretation(problem,interpretation); | ||
28753 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28754 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eGenericType reference ETypedElement"); | ||
28755 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28756 | BinaryElementRelationLink.param1(link,source); | ||
28757 | BinaryElementRelationLink.param2(link,target); | ||
28758 | } | ||
28759 | /** | ||
28760 | * Matcher for detecting tuples t where <>eGenericType reference ETypedElement(source,target) | ||
28761 | */ | ||
28762 | private pattern mayInRelationeGenericType_reference_ETypedElement( | ||
28763 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28764 | source: DefinedElement, target:DefinedElement) | ||
28765 | { | ||
28766 | find interpretation(problem,interpretation); | ||
28767 | // The two endpoint of the link have to exist | ||
28768 | find mayExist(problem, interpretation, source); | ||
28769 | find mayExist(problem, interpretation, target); | ||
28770 | // Type consistency | ||
28771 | find mayInstanceOfETypedElement_class(problem,interpretation,source); | ||
28772 | find mayInstanceOfEGenericType_class(problem,interpretation,target); | ||
28773 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
28774 | // the upper bound of the multiplicity should be considered. | ||
28775 | numberOfExistingReferences == count find mustInRelationeGenericType_reference_ETypedElement(problem,interpretation,source,_); | ||
28776 | check(numberOfExistingReferences < 1); | ||
28777 | // The reference is containment, then a new reference cannot be create if: | ||
28778 | // 1. Multiple parents | ||
28779 | neg find mustContains4(problem,interpretation,_,target); | ||
28780 | // 2. Circle in the containment hierarchy | ||
28781 | neg find mustTransitiveContains(source,target); | ||
28782 | } or { | ||
28783 | find mustInRelationeGenericType_reference_ETypedElement(problem,interpretation,source,target); | ||
28784 | } | ||
28785 | /** | ||
28786 | * Matcher for detecting tuples t where []eUpperBound reference EGenericType(source,target) | ||
28787 | */ | ||
28788 | private pattern mustInRelationeUpperBound_reference_EGenericType( | ||
28789 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28790 | source: DefinedElement, target:DefinedElement) | ||
28791 | { | ||
28792 | find interpretation(problem,interpretation); | ||
28793 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28794 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eUpperBound reference EGenericType"); | ||
28795 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28796 | BinaryElementRelationLink.param1(link,source); | ||
28797 | BinaryElementRelationLink.param2(link,target); | ||
28798 | } | ||
28799 | /** | ||
28800 | * Matcher for detecting tuples t where <>eUpperBound reference EGenericType(source,target) | ||
28801 | */ | ||
28802 | private pattern mayInRelationeUpperBound_reference_EGenericType( | ||
28803 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28804 | source: DefinedElement, target:DefinedElement) | ||
28805 | { | ||
28806 | find interpretation(problem,interpretation); | ||
28807 | // The two endpoint of the link have to exist | ||
28808 | find mayExist(problem, interpretation, source); | ||
28809 | find mayExist(problem, interpretation, target); | ||
28810 | // Type consistency | ||
28811 | find mayInstanceOfEGenericType_class(problem,interpretation,source); | ||
28812 | find mayInstanceOfEGenericType_class(problem,interpretation,target); | ||
28813 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
28814 | // the upper bound of the multiplicity should be considered. | ||
28815 | numberOfExistingReferences == count find mustInRelationeUpperBound_reference_EGenericType(problem,interpretation,source,_); | ||
28816 | check(numberOfExistingReferences < 1); | ||
28817 | // The reference is containment, then a new reference cannot be create if: | ||
28818 | // 1. Multiple parents | ||
28819 | neg find mustContains4(problem,interpretation,_,target); | ||
28820 | // 2. Circle in the containment hierarchy | ||
28821 | neg find mustTransitiveContains(source,target); | ||
28822 | } or { | ||
28823 | find mustInRelationeUpperBound_reference_EGenericType(problem,interpretation,source,target); | ||
28824 | } | ||
28825 | /** | ||
28826 | * Matcher for detecting tuples t where []eTypeArguments reference EGenericType(source,target) | ||
28827 | */ | ||
28828 | private pattern mustInRelationeTypeArguments_reference_EGenericType( | ||
28829 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28830 | source: DefinedElement, target:DefinedElement) | ||
28831 | { | ||
28832 | find interpretation(problem,interpretation); | ||
28833 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28834 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeArguments reference EGenericType"); | ||
28835 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28836 | BinaryElementRelationLink.param1(link,source); | ||
28837 | BinaryElementRelationLink.param2(link,target); | ||
28838 | } | ||
28839 | /** | ||
28840 | * Matcher for detecting tuples t where <>eTypeArguments reference EGenericType(source,target) | ||
28841 | */ | ||
28842 | private pattern mayInRelationeTypeArguments_reference_EGenericType( | ||
28843 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28844 | source: DefinedElement, target:DefinedElement) | ||
28845 | { | ||
28846 | find interpretation(problem,interpretation); | ||
28847 | // The two endpoint of the link have to exist | ||
28848 | find mayExist(problem, interpretation, source); | ||
28849 | find mayExist(problem, interpretation, target); | ||
28850 | // Type consistency | ||
28851 | find mayInstanceOfEGenericType_class(problem,interpretation,source); | ||
28852 | find mayInstanceOfEGenericType_class(problem,interpretation,target); | ||
28853 | // The reference is containment, then a new reference cannot be create if: | ||
28854 | // 1. Multiple parents | ||
28855 | neg find mustContains4(problem,interpretation,_,target); | ||
28856 | // 2. Circle in the containment hierarchy | ||
28857 | neg find mustTransitiveContains(source,target); | ||
28858 | } or { | ||
28859 | find mustInRelationeTypeArguments_reference_EGenericType(problem,interpretation,source,target); | ||
28860 | } | ||
28861 | /** | ||
28862 | * Matcher for detecting tuples t where []eRawType reference EGenericType(source,target) | ||
28863 | */ | ||
28864 | private pattern mustInRelationeRawType_reference_EGenericType( | ||
28865 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28866 | source: DefinedElement, target:DefinedElement) | ||
28867 | { | ||
28868 | find interpretation(problem,interpretation); | ||
28869 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28870 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eRawType reference EGenericType"); | ||
28871 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28872 | BinaryElementRelationLink.param1(link,source); | ||
28873 | BinaryElementRelationLink.param2(link,target); | ||
28874 | } | ||
28875 | /** | ||
28876 | * Matcher for detecting tuples t where <>eRawType reference EGenericType(source,target) | ||
28877 | */ | ||
28878 | private pattern mayInRelationeRawType_reference_EGenericType( | ||
28879 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28880 | source: DefinedElement, target:DefinedElement) | ||
28881 | { | ||
28882 | find interpretation(problem,interpretation); | ||
28883 | // The two endpoint of the link have to exist | ||
28884 | find mayExist(problem, interpretation, source); | ||
28885 | find mayExist(problem, interpretation, target); | ||
28886 | // Type consistency | ||
28887 | find mayInstanceOfEGenericType_class(problem,interpretation,source); | ||
28888 | find mayInstanceOfEClassifier_class(problem,interpretation,target); | ||
28889 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
28890 | // the upper bound of the multiplicity should be considered. | ||
28891 | numberOfExistingReferences == count find mustInRelationeRawType_reference_EGenericType(problem,interpretation,source,_); | ||
28892 | check(numberOfExistingReferences < 1); | ||
28893 | } or { | ||
28894 | find mustInRelationeRawType_reference_EGenericType(problem,interpretation,source,target); | ||
28895 | } | ||
28896 | /** | ||
28897 | * Matcher for detecting tuples t where []eLowerBound reference EGenericType(source,target) | ||
28898 | */ | ||
28899 | private pattern mustInRelationeLowerBound_reference_EGenericType( | ||
28900 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28901 | source: DefinedElement, target:DefinedElement) | ||
28902 | { | ||
28903 | find interpretation(problem,interpretation); | ||
28904 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28905 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eLowerBound reference EGenericType"); | ||
28906 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28907 | BinaryElementRelationLink.param1(link,source); | ||
28908 | BinaryElementRelationLink.param2(link,target); | ||
28909 | } | ||
28910 | /** | ||
28911 | * Matcher for detecting tuples t where <>eLowerBound reference EGenericType(source,target) | ||
28912 | */ | ||
28913 | private pattern mayInRelationeLowerBound_reference_EGenericType( | ||
28914 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28915 | source: DefinedElement, target:DefinedElement) | ||
28916 | { | ||
28917 | find interpretation(problem,interpretation); | ||
28918 | // The two endpoint of the link have to exist | ||
28919 | find mayExist(problem, interpretation, source); | ||
28920 | find mayExist(problem, interpretation, target); | ||
28921 | // Type consistency | ||
28922 | find mayInstanceOfEGenericType_class(problem,interpretation,source); | ||
28923 | find mayInstanceOfEGenericType_class(problem,interpretation,target); | ||
28924 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
28925 | // the upper bound of the multiplicity should be considered. | ||
28926 | numberOfExistingReferences == count find mustInRelationeLowerBound_reference_EGenericType(problem,interpretation,source,_); | ||
28927 | check(numberOfExistingReferences < 1); | ||
28928 | // The reference is containment, then a new reference cannot be create if: | ||
28929 | // 1. Multiple parents | ||
28930 | neg find mustContains4(problem,interpretation,_,target); | ||
28931 | // 2. Circle in the containment hierarchy | ||
28932 | neg find mustTransitiveContains(source,target); | ||
28933 | } or { | ||
28934 | find mustInRelationeLowerBound_reference_EGenericType(problem,interpretation,source,target); | ||
28935 | } | ||
28936 | /** | ||
28937 | * Matcher for detecting tuples t where []eTypeParameter reference EGenericType(source,target) | ||
28938 | */ | ||
28939 | private pattern mustInRelationeTypeParameter_reference_EGenericType( | ||
28940 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28941 | source: DefinedElement, target:DefinedElement) | ||
28942 | { | ||
28943 | find interpretation(problem,interpretation); | ||
28944 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28945 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameter reference EGenericType"); | ||
28946 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28947 | BinaryElementRelationLink.param1(link,source); | ||
28948 | BinaryElementRelationLink.param2(link,target); | ||
28949 | } | ||
28950 | /** | ||
28951 | * Matcher for detecting tuples t where <>eTypeParameter reference EGenericType(source,target) | ||
28952 | */ | ||
28953 | private pattern mayInRelationeTypeParameter_reference_EGenericType( | ||
28954 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28955 | source: DefinedElement, target:DefinedElement) | ||
28956 | { | ||
28957 | find interpretation(problem,interpretation); | ||
28958 | // The two endpoint of the link have to exist | ||
28959 | find mayExist(problem, interpretation, source); | ||
28960 | find mayExist(problem, interpretation, target); | ||
28961 | // Type consistency | ||
28962 | find mayInstanceOfEGenericType_class(problem,interpretation,source); | ||
28963 | find mayInstanceOfETypeParameter_class(problem,interpretation,target); | ||
28964 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
28965 | // the upper bound of the multiplicity should be considered. | ||
28966 | numberOfExistingReferences == count find mustInRelationeTypeParameter_reference_EGenericType(problem,interpretation,source,_); | ||
28967 | check(numberOfExistingReferences < 1); | ||
28968 | } or { | ||
28969 | find mustInRelationeTypeParameter_reference_EGenericType(problem,interpretation,source,target); | ||
28970 | } | ||
28971 | /** | ||
28972 | * Matcher for detecting tuples t where []eClassifier reference EGenericType(source,target) | ||
28973 | */ | ||
28974 | private pattern mustInRelationeClassifier_reference_EGenericType( | ||
28975 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28976 | source: DefinedElement, target:DefinedElement) | ||
28977 | { | ||
28978 | find interpretation(problem,interpretation); | ||
28979 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
28980 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eClassifier reference EGenericType"); | ||
28981 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
28982 | BinaryElementRelationLink.param1(link,source); | ||
28983 | BinaryElementRelationLink.param2(link,target); | ||
28984 | } | ||
28985 | /** | ||
28986 | * Matcher for detecting tuples t where <>eClassifier reference EGenericType(source,target) | ||
28987 | */ | ||
28988 | private pattern mayInRelationeClassifier_reference_EGenericType( | ||
28989 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
28990 | source: DefinedElement, target:DefinedElement) | ||
28991 | { | ||
28992 | find interpretation(problem,interpretation); | ||
28993 | // The two endpoint of the link have to exist | ||
28994 | find mayExist(problem, interpretation, source); | ||
28995 | find mayExist(problem, interpretation, target); | ||
28996 | // Type consistency | ||
28997 | find mayInstanceOfEGenericType_class(problem,interpretation,source); | ||
28998 | find mayInstanceOfEClassifier_class(problem,interpretation,target); | ||
28999 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29000 | // the upper bound of the multiplicity should be considered. | ||
29001 | numberOfExistingReferences == count find mustInRelationeClassifier_reference_EGenericType(problem,interpretation,source,_); | ||
29002 | check(numberOfExistingReferences < 1); | ||
29003 | } or { | ||
29004 | find mustInRelationeClassifier_reference_EGenericType(problem,interpretation,source,target); | ||
29005 | } | ||
29006 | /** | ||
29007 | * Matcher for detecting tuples t where []eBounds reference ETypeParameter(source,target) | ||
29008 | */ | ||
29009 | private pattern mustInRelationeBounds_reference_ETypeParameter( | ||
29010 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29011 | source: DefinedElement, target:DefinedElement) | ||
29012 | { | ||
29013 | find interpretation(problem,interpretation); | ||
29014 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29015 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eBounds reference ETypeParameter"); | ||
29016 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29017 | BinaryElementRelationLink.param1(link,source); | ||
29018 | BinaryElementRelationLink.param2(link,target); | ||
29019 | } | ||
29020 | /** | ||
29021 | * Matcher for detecting tuples t where <>eBounds reference ETypeParameter(source,target) | ||
29022 | */ | ||
29023 | private pattern mayInRelationeBounds_reference_ETypeParameter( | ||
29024 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29025 | source: DefinedElement, target:DefinedElement) | ||
29026 | { | ||
29027 | find interpretation(problem,interpretation); | ||
29028 | // The two endpoint of the link have to exist | ||
29029 | find mayExist(problem, interpretation, source); | ||
29030 | find mayExist(problem, interpretation, target); | ||
29031 | // Type consistency | ||
29032 | find mayInstanceOfETypeParameter_class(problem,interpretation,source); | ||
29033 | find mayInstanceOfEGenericType_class(problem,interpretation,target); | ||
29034 | // The reference is containment, then a new reference cannot be create if: | ||
29035 | // 1. Multiple parents | ||
29036 | neg find mustContains4(problem,interpretation,_,target); | ||
29037 | // 2. Circle in the containment hierarchy | ||
29038 | neg find mustTransitiveContains(source,target); | ||
29039 | } or { | ||
29040 | find mustInRelationeBounds_reference_ETypeParameter(problem,interpretation,source,target); | ||
29041 | } | ||
29042 | /** | ||
29043 | * Matcher for detecting tuples t where []iD attribute EAttribute(source,target) | ||
29044 | */ | ||
29045 | private pattern mustInRelationiD_attribute_EAttribute( | ||
29046 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29047 | source: DefinedElement, target:DefinedElement) | ||
29048 | { | ||
29049 | find interpretation(problem,interpretation); | ||
29050 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29051 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"iD attribute EAttribute"); | ||
29052 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29053 | BinaryElementRelationLink.param1(link,source); | ||
29054 | BinaryElementRelationLink.param2(link,target); | ||
29055 | } | ||
29056 | /** | ||
29057 | * Matcher for detecting tuples t where <>iD attribute EAttribute(source,target) | ||
29058 | */ | ||
29059 | private pattern mayInRelationiD_attribute_EAttribute( | ||
29060 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29061 | source: DefinedElement, target:DefinedElement) | ||
29062 | { | ||
29063 | find interpretation(problem,interpretation); | ||
29064 | // The two endpoint of the link have to exist | ||
29065 | find mayExist(problem, interpretation, source); | ||
29066 | find mayExist(problem, interpretation, target); | ||
29067 | // Type consistency | ||
29068 | find mayInstanceOfEAttribute_class(problem,interpretation,source); | ||
29069 | BooleanElement(target); | ||
29070 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29071 | // the upper bound of the multiplicity should be considered. | ||
29072 | numberOfExistingReferences == count find mustInRelationiD_attribute_EAttribute(problem,interpretation,source,_); | ||
29073 | check(numberOfExistingReferences < 1); | ||
29074 | } or { | ||
29075 | find mustInRelationiD_attribute_EAttribute(problem,interpretation,source,target); | ||
29076 | } | ||
29077 | /** | ||
29078 | * Matcher for detecting tuples t where []source attribute EAnnotation(source,target) | ||
29079 | */ | ||
29080 | private pattern mustInRelationsource_attribute_EAnnotation( | ||
29081 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29082 | source: DefinedElement, target:DefinedElement) | ||
29083 | { | ||
29084 | find interpretation(problem,interpretation); | ||
29085 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29086 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source attribute EAnnotation"); | ||
29087 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29088 | BinaryElementRelationLink.param1(link,source); | ||
29089 | BinaryElementRelationLink.param2(link,target); | ||
29090 | } | ||
29091 | /** | ||
29092 | * Matcher for detecting tuples t where <>source attribute EAnnotation(source,target) | ||
29093 | */ | ||
29094 | private pattern mayInRelationsource_attribute_EAnnotation( | ||
29095 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29096 | source: DefinedElement, target:DefinedElement) | ||
29097 | { | ||
29098 | find interpretation(problem,interpretation); | ||
29099 | // The two endpoint of the link have to exist | ||
29100 | find mayExist(problem, interpretation, source); | ||
29101 | find mayExist(problem, interpretation, target); | ||
29102 | // Type consistency | ||
29103 | find mayInstanceOfEAnnotation_class(problem,interpretation,source); | ||
29104 | StringElement(target); | ||
29105 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29106 | // the upper bound of the multiplicity should be considered. | ||
29107 | numberOfExistingReferences == count find mustInRelationsource_attribute_EAnnotation(problem,interpretation,source,_); | ||
29108 | check(numberOfExistingReferences < 1); | ||
29109 | } or { | ||
29110 | find mustInRelationsource_attribute_EAnnotation(problem,interpretation,source,target); | ||
29111 | } | ||
29112 | /** | ||
29113 | * Matcher for detecting tuples t where []abstract attribute EClass(source,target) | ||
29114 | */ | ||
29115 | private pattern mustInRelationabstract_attribute_EClass( | ||
29116 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29117 | source: DefinedElement, target:DefinedElement) | ||
29118 | { | ||
29119 | find interpretation(problem,interpretation); | ||
29120 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29121 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"abstract attribute EClass"); | ||
29122 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29123 | BinaryElementRelationLink.param1(link,source); | ||
29124 | BinaryElementRelationLink.param2(link,target); | ||
29125 | } | ||
29126 | /** | ||
29127 | * Matcher for detecting tuples t where <>abstract attribute EClass(source,target) | ||
29128 | */ | ||
29129 | private pattern mayInRelationabstract_attribute_EClass( | ||
29130 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29131 | source: DefinedElement, target:DefinedElement) | ||
29132 | { | ||
29133 | find interpretation(problem,interpretation); | ||
29134 | // The two endpoint of the link have to exist | ||
29135 | find mayExist(problem, interpretation, source); | ||
29136 | find mayExist(problem, interpretation, target); | ||
29137 | // Type consistency | ||
29138 | find mayInstanceOfEClass_class(problem,interpretation,source); | ||
29139 | BooleanElement(target); | ||
29140 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29141 | // the upper bound of the multiplicity should be considered. | ||
29142 | numberOfExistingReferences == count find mustInRelationabstract_attribute_EClass(problem,interpretation,source,_); | ||
29143 | check(numberOfExistingReferences < 1); | ||
29144 | } or { | ||
29145 | find mustInRelationabstract_attribute_EClass(problem,interpretation,source,target); | ||
29146 | } | ||
29147 | /** | ||
29148 | * Matcher for detecting tuples t where []interface attribute EClass(source,target) | ||
29149 | */ | ||
29150 | private pattern mustInRelationinterface_attribute_EClass( | ||
29151 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29152 | source: DefinedElement, target:DefinedElement) | ||
29153 | { | ||
29154 | find interpretation(problem,interpretation); | ||
29155 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29156 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface attribute EClass"); | ||
29157 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29158 | BinaryElementRelationLink.param1(link,source); | ||
29159 | BinaryElementRelationLink.param2(link,target); | ||
29160 | } | ||
29161 | /** | ||
29162 | * Matcher for detecting tuples t where <>interface attribute EClass(source,target) | ||
29163 | */ | ||
29164 | private pattern mayInRelationinterface_attribute_EClass( | ||
29165 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29166 | source: DefinedElement, target:DefinedElement) | ||
29167 | { | ||
29168 | find interpretation(problem,interpretation); | ||
29169 | // The two endpoint of the link have to exist | ||
29170 | find mayExist(problem, interpretation, source); | ||
29171 | find mayExist(problem, interpretation, target); | ||
29172 | // Type consistency | ||
29173 | find mayInstanceOfEClass_class(problem,interpretation,source); | ||
29174 | BooleanElement(target); | ||
29175 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29176 | // the upper bound of the multiplicity should be considered. | ||
29177 | numberOfExistingReferences == count find mustInRelationinterface_attribute_EClass(problem,interpretation,source,_); | ||
29178 | check(numberOfExistingReferences < 1); | ||
29179 | } or { | ||
29180 | find mustInRelationinterface_attribute_EClass(problem,interpretation,source,target); | ||
29181 | } | ||
29182 | /** | ||
29183 | * Matcher for detecting tuples t where []instanceClassName attribute EClassifier(source,target) | ||
29184 | */ | ||
29185 | private pattern mustInRelationinstanceClassName_attribute_EClassifier( | ||
29186 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29187 | source: DefinedElement, target:DefinedElement) | ||
29188 | { | ||
29189 | find interpretation(problem,interpretation); | ||
29190 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29191 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceClassName attribute EClassifier"); | ||
29192 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29193 | BinaryElementRelationLink.param1(link,source); | ||
29194 | BinaryElementRelationLink.param2(link,target); | ||
29195 | } | ||
29196 | /** | ||
29197 | * Matcher for detecting tuples t where <>instanceClassName attribute EClassifier(source,target) | ||
29198 | */ | ||
29199 | private pattern mayInRelationinstanceClassName_attribute_EClassifier( | ||
29200 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29201 | source: DefinedElement, target:DefinedElement) | ||
29202 | { | ||
29203 | find interpretation(problem,interpretation); | ||
29204 | // The two endpoint of the link have to exist | ||
29205 | find mayExist(problem, interpretation, source); | ||
29206 | find mayExist(problem, interpretation, target); | ||
29207 | // Type consistency | ||
29208 | find mayInstanceOfEClassifier_class(problem,interpretation,source); | ||
29209 | StringElement(target); | ||
29210 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29211 | // the upper bound of the multiplicity should be considered. | ||
29212 | numberOfExistingReferences == count find mustInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,source,_); | ||
29213 | check(numberOfExistingReferences < 1); | ||
29214 | } or { | ||
29215 | find mustInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,source,target); | ||
29216 | } | ||
29217 | /** | ||
29218 | * Matcher for detecting tuples t where []instanceTypeName attribute EClassifier(source,target) | ||
29219 | */ | ||
29220 | private pattern mustInRelationinstanceTypeName_attribute_EClassifier( | ||
29221 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29222 | source: DefinedElement, target:DefinedElement) | ||
29223 | { | ||
29224 | find interpretation(problem,interpretation); | ||
29225 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29226 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceTypeName attribute EClassifier"); | ||
29227 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29228 | BinaryElementRelationLink.param1(link,source); | ||
29229 | BinaryElementRelationLink.param2(link,target); | ||
29230 | } | ||
29231 | /** | ||
29232 | * Matcher for detecting tuples t where <>instanceTypeName attribute EClassifier(source,target) | ||
29233 | */ | ||
29234 | private pattern mayInRelationinstanceTypeName_attribute_EClassifier( | ||
29235 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29236 | source: DefinedElement, target:DefinedElement) | ||
29237 | { | ||
29238 | find interpretation(problem,interpretation); | ||
29239 | // The two endpoint of the link have to exist | ||
29240 | find mayExist(problem, interpretation, source); | ||
29241 | find mayExist(problem, interpretation, target); | ||
29242 | // Type consistency | ||
29243 | find mayInstanceOfEClassifier_class(problem,interpretation,source); | ||
29244 | StringElement(target); | ||
29245 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29246 | // the upper bound of the multiplicity should be considered. | ||
29247 | numberOfExistingReferences == count find mustInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,source,_); | ||
29248 | check(numberOfExistingReferences < 1); | ||
29249 | } or { | ||
29250 | find mustInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,source,target); | ||
29251 | } | ||
29252 | /** | ||
29253 | * Matcher for detecting tuples t where []serializable attribute EDataType(source,target) | ||
29254 | */ | ||
29255 | private pattern mustInRelationserializable_attribute_EDataType( | ||
29256 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29257 | source: DefinedElement, target:DefinedElement) | ||
29258 | { | ||
29259 | find interpretation(problem,interpretation); | ||
29260 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29261 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"serializable attribute EDataType"); | ||
29262 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29263 | BinaryElementRelationLink.param1(link,source); | ||
29264 | BinaryElementRelationLink.param2(link,target); | ||
29265 | } | ||
29266 | /** | ||
29267 | * Matcher for detecting tuples t where <>serializable attribute EDataType(source,target) | ||
29268 | */ | ||
29269 | private pattern mayInRelationserializable_attribute_EDataType( | ||
29270 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29271 | source: DefinedElement, target:DefinedElement) | ||
29272 | { | ||
29273 | find interpretation(problem,interpretation); | ||
29274 | // The two endpoint of the link have to exist | ||
29275 | find mayExist(problem, interpretation, source); | ||
29276 | find mayExist(problem, interpretation, target); | ||
29277 | // Type consistency | ||
29278 | find mayInstanceOfEDataType_class(problem,interpretation,source); | ||
29279 | BooleanElement(target); | ||
29280 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29281 | // the upper bound of the multiplicity should be considered. | ||
29282 | numberOfExistingReferences == count find mustInRelationserializable_attribute_EDataType(problem,interpretation,source,_); | ||
29283 | check(numberOfExistingReferences < 1); | ||
29284 | } or { | ||
29285 | find mustInRelationserializable_attribute_EDataType(problem,interpretation,source,target); | ||
29286 | } | ||
29287 | /** | ||
29288 | * Matcher for detecting tuples t where []value attribute EEnumLiteral(source,target) | ||
29289 | */ | ||
29290 | private pattern mustInRelationvalue_attribute_EEnumLiteral( | ||
29291 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29292 | source: DefinedElement, target:DefinedElement) | ||
29293 | { | ||
29294 | find interpretation(problem,interpretation); | ||
29295 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29296 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EEnumLiteral"); | ||
29297 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29298 | BinaryElementRelationLink.param1(link,source); | ||
29299 | BinaryElementRelationLink.param2(link,target); | ||
29300 | } | ||
29301 | /** | ||
29302 | * Matcher for detecting tuples t where <>value attribute EEnumLiteral(source,target) | ||
29303 | */ | ||
29304 | private pattern mayInRelationvalue_attribute_EEnumLiteral( | ||
29305 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29306 | source: DefinedElement, target:DefinedElement) | ||
29307 | { | ||
29308 | find interpretation(problem,interpretation); | ||
29309 | // The two endpoint of the link have to exist | ||
29310 | find mayExist(problem, interpretation, source); | ||
29311 | find mayExist(problem, interpretation, target); | ||
29312 | // Type consistency | ||
29313 | find mayInstanceOfEEnumLiteral_class(problem,interpretation,source); | ||
29314 | IntegerElement(target); | ||
29315 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29316 | // the upper bound of the multiplicity should be considered. | ||
29317 | numberOfExistingReferences == count find mustInRelationvalue_attribute_EEnumLiteral(problem,interpretation,source,_); | ||
29318 | check(numberOfExistingReferences < 1); | ||
29319 | } or { | ||
29320 | find mustInRelationvalue_attribute_EEnumLiteral(problem,interpretation,source,target); | ||
29321 | } | ||
29322 | /** | ||
29323 | * Matcher for detecting tuples t where []literal attribute EEnumLiteral(source,target) | ||
29324 | */ | ||
29325 | private pattern mustInRelationliteral_attribute_EEnumLiteral( | ||
29326 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29327 | source: DefinedElement, target:DefinedElement) | ||
29328 | { | ||
29329 | find interpretation(problem,interpretation); | ||
29330 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29331 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"literal attribute EEnumLiteral"); | ||
29332 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29333 | BinaryElementRelationLink.param1(link,source); | ||
29334 | BinaryElementRelationLink.param2(link,target); | ||
29335 | } | ||
29336 | /** | ||
29337 | * Matcher for detecting tuples t where <>literal attribute EEnumLiteral(source,target) | ||
29338 | */ | ||
29339 | private pattern mayInRelationliteral_attribute_EEnumLiteral( | ||
29340 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29341 | source: DefinedElement, target:DefinedElement) | ||
29342 | { | ||
29343 | find interpretation(problem,interpretation); | ||
29344 | // The two endpoint of the link have to exist | ||
29345 | find mayExist(problem, interpretation, source); | ||
29346 | find mayExist(problem, interpretation, target); | ||
29347 | // Type consistency | ||
29348 | find mayInstanceOfEEnumLiteral_class(problem,interpretation,source); | ||
29349 | StringElement(target); | ||
29350 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29351 | // the upper bound of the multiplicity should be considered. | ||
29352 | numberOfExistingReferences == count find mustInRelationliteral_attribute_EEnumLiteral(problem,interpretation,source,_); | ||
29353 | check(numberOfExistingReferences < 1); | ||
29354 | } or { | ||
29355 | find mustInRelationliteral_attribute_EEnumLiteral(problem,interpretation,source,target); | ||
29356 | } | ||
29357 | /** | ||
29358 | * Matcher for detecting tuples t where []name attribute ENamedElement(source,target) | ||
29359 | */ | ||
29360 | private pattern mustInRelationname_attribute_ENamedElement( | ||
29361 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29362 | source: DefinedElement, target:DefinedElement) | ||
29363 | { | ||
29364 | find interpretation(problem,interpretation); | ||
29365 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29366 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"name attribute ENamedElement"); | ||
29367 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29368 | BinaryElementRelationLink.param1(link,source); | ||
29369 | BinaryElementRelationLink.param2(link,target); | ||
29370 | } | ||
29371 | /** | ||
29372 | * Matcher for detecting tuples t where <>name attribute ENamedElement(source,target) | ||
29373 | */ | ||
29374 | private pattern mayInRelationname_attribute_ENamedElement( | ||
29375 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29376 | source: DefinedElement, target:DefinedElement) | ||
29377 | { | ||
29378 | find interpretation(problem,interpretation); | ||
29379 | // The two endpoint of the link have to exist | ||
29380 | find mayExist(problem, interpretation, source); | ||
29381 | find mayExist(problem, interpretation, target); | ||
29382 | // Type consistency | ||
29383 | find mayInstanceOfENamedElement_class(problem,interpretation,source); | ||
29384 | StringElement(target); | ||
29385 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29386 | // the upper bound of the multiplicity should be considered. | ||
29387 | numberOfExistingReferences == count find mustInRelationname_attribute_ENamedElement(problem,interpretation,source,_); | ||
29388 | check(numberOfExistingReferences < 1); | ||
29389 | } or { | ||
29390 | find mustInRelationname_attribute_ENamedElement(problem,interpretation,source,target); | ||
29391 | } | ||
29392 | /** | ||
29393 | * Matcher for detecting tuples t where []nsURI attribute EPackage(source,target) | ||
29394 | */ | ||
29395 | private pattern mustInRelationnsURI_attribute_EPackage( | ||
29396 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29397 | source: DefinedElement, target:DefinedElement) | ||
29398 | { | ||
29399 | find interpretation(problem,interpretation); | ||
29400 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29401 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsURI attribute EPackage"); | ||
29402 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29403 | BinaryElementRelationLink.param1(link,source); | ||
29404 | BinaryElementRelationLink.param2(link,target); | ||
29405 | } | ||
29406 | /** | ||
29407 | * Matcher for detecting tuples t where <>nsURI attribute EPackage(source,target) | ||
29408 | */ | ||
29409 | private pattern mayInRelationnsURI_attribute_EPackage( | ||
29410 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29411 | source: DefinedElement, target:DefinedElement) | ||
29412 | { | ||
29413 | find interpretation(problem,interpretation); | ||
29414 | // The two endpoint of the link have to exist | ||
29415 | find mayExist(problem, interpretation, source); | ||
29416 | find mayExist(problem, interpretation, target); | ||
29417 | // Type consistency | ||
29418 | find mayInstanceOfEPackage_class(problem,interpretation,source); | ||
29419 | StringElement(target); | ||
29420 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29421 | // the upper bound of the multiplicity should be considered. | ||
29422 | numberOfExistingReferences == count find mustInRelationnsURI_attribute_EPackage(problem,interpretation,source,_); | ||
29423 | check(numberOfExistingReferences < 1); | ||
29424 | } or { | ||
29425 | find mustInRelationnsURI_attribute_EPackage(problem,interpretation,source,target); | ||
29426 | } | ||
29427 | /** | ||
29428 | * Matcher for detecting tuples t where []nsPrefix attribute EPackage(source,target) | ||
29429 | */ | ||
29430 | private pattern mustInRelationnsPrefix_attribute_EPackage( | ||
29431 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29432 | source: DefinedElement, target:DefinedElement) | ||
29433 | { | ||
29434 | find interpretation(problem,interpretation); | ||
29435 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29436 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsPrefix attribute EPackage"); | ||
29437 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29438 | BinaryElementRelationLink.param1(link,source); | ||
29439 | BinaryElementRelationLink.param2(link,target); | ||
29440 | } | ||
29441 | /** | ||
29442 | * Matcher for detecting tuples t where <>nsPrefix attribute EPackage(source,target) | ||
29443 | */ | ||
29444 | private pattern mayInRelationnsPrefix_attribute_EPackage( | ||
29445 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29446 | source: DefinedElement, target:DefinedElement) | ||
29447 | { | ||
29448 | find interpretation(problem,interpretation); | ||
29449 | // The two endpoint of the link have to exist | ||
29450 | find mayExist(problem, interpretation, source); | ||
29451 | find mayExist(problem, interpretation, target); | ||
29452 | // Type consistency | ||
29453 | find mayInstanceOfEPackage_class(problem,interpretation,source); | ||
29454 | StringElement(target); | ||
29455 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29456 | // the upper bound of the multiplicity should be considered. | ||
29457 | numberOfExistingReferences == count find mustInRelationnsPrefix_attribute_EPackage(problem,interpretation,source,_); | ||
29458 | check(numberOfExistingReferences < 1); | ||
29459 | } or { | ||
29460 | find mustInRelationnsPrefix_attribute_EPackage(problem,interpretation,source,target); | ||
29461 | } | ||
29462 | /** | ||
29463 | * Matcher for detecting tuples t where []containment attribute EReference(source,target) | ||
29464 | */ | ||
29465 | private pattern mustInRelationcontainment_attribute_EReference( | ||
29466 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29467 | source: DefinedElement, target:DefinedElement) | ||
29468 | { | ||
29469 | find interpretation(problem,interpretation); | ||
29470 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29471 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"containment attribute EReference"); | ||
29472 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29473 | BinaryElementRelationLink.param1(link,source); | ||
29474 | BinaryElementRelationLink.param2(link,target); | ||
29475 | } | ||
29476 | /** | ||
29477 | * Matcher for detecting tuples t where <>containment attribute EReference(source,target) | ||
29478 | */ | ||
29479 | private pattern mayInRelationcontainment_attribute_EReference( | ||
29480 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29481 | source: DefinedElement, target:DefinedElement) | ||
29482 | { | ||
29483 | find interpretation(problem,interpretation); | ||
29484 | // The two endpoint of the link have to exist | ||
29485 | find mayExist(problem, interpretation, source); | ||
29486 | find mayExist(problem, interpretation, target); | ||
29487 | // Type consistency | ||
29488 | find mayInstanceOfEReference_class(problem,interpretation,source); | ||
29489 | BooleanElement(target); | ||
29490 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29491 | // the upper bound of the multiplicity should be considered. | ||
29492 | numberOfExistingReferences == count find mustInRelationcontainment_attribute_EReference(problem,interpretation,source,_); | ||
29493 | check(numberOfExistingReferences < 1); | ||
29494 | } or { | ||
29495 | find mustInRelationcontainment_attribute_EReference(problem,interpretation,source,target); | ||
29496 | } | ||
29497 | /** | ||
29498 | * Matcher for detecting tuples t where []container attribute EReference(source,target) | ||
29499 | */ | ||
29500 | private pattern mustInRelationcontainer_attribute_EReference( | ||
29501 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29502 | source: DefinedElement, target:DefinedElement) | ||
29503 | { | ||
29504 | find interpretation(problem,interpretation); | ||
29505 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29506 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"container attribute EReference"); | ||
29507 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29508 | BinaryElementRelationLink.param1(link,source); | ||
29509 | BinaryElementRelationLink.param2(link,target); | ||
29510 | } | ||
29511 | /** | ||
29512 | * Matcher for detecting tuples t where <>container attribute EReference(source,target) | ||
29513 | */ | ||
29514 | private pattern mayInRelationcontainer_attribute_EReference( | ||
29515 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29516 | source: DefinedElement, target:DefinedElement) | ||
29517 | { | ||
29518 | find interpretation(problem,interpretation); | ||
29519 | // The two endpoint of the link have to exist | ||
29520 | find mayExist(problem, interpretation, source); | ||
29521 | find mayExist(problem, interpretation, target); | ||
29522 | // Type consistency | ||
29523 | find mayInstanceOfEReference_class(problem,interpretation,source); | ||
29524 | BooleanElement(target); | ||
29525 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29526 | // the upper bound of the multiplicity should be considered. | ||
29527 | numberOfExistingReferences == count find mustInRelationcontainer_attribute_EReference(problem,interpretation,source,_); | ||
29528 | check(numberOfExistingReferences < 1); | ||
29529 | } or { | ||
29530 | find mustInRelationcontainer_attribute_EReference(problem,interpretation,source,target); | ||
29531 | } | ||
29532 | /** | ||
29533 | * Matcher for detecting tuples t where []resolveProxies attribute EReference(source,target) | ||
29534 | */ | ||
29535 | private pattern mustInRelationresolveProxies_attribute_EReference( | ||
29536 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29537 | source: DefinedElement, target:DefinedElement) | ||
29538 | { | ||
29539 | find interpretation(problem,interpretation); | ||
29540 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29541 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"resolveProxies attribute EReference"); | ||
29542 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29543 | BinaryElementRelationLink.param1(link,source); | ||
29544 | BinaryElementRelationLink.param2(link,target); | ||
29545 | } | ||
29546 | /** | ||
29547 | * Matcher for detecting tuples t where <>resolveProxies attribute EReference(source,target) | ||
29548 | */ | ||
29549 | private pattern mayInRelationresolveProxies_attribute_EReference( | ||
29550 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29551 | source: DefinedElement, target:DefinedElement) | ||
29552 | { | ||
29553 | find interpretation(problem,interpretation); | ||
29554 | // The two endpoint of the link have to exist | ||
29555 | find mayExist(problem, interpretation, source); | ||
29556 | find mayExist(problem, interpretation, target); | ||
29557 | // Type consistency | ||
29558 | find mayInstanceOfEReference_class(problem,interpretation,source); | ||
29559 | BooleanElement(target); | ||
29560 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29561 | // the upper bound of the multiplicity should be considered. | ||
29562 | numberOfExistingReferences == count find mustInRelationresolveProxies_attribute_EReference(problem,interpretation,source,_); | ||
29563 | check(numberOfExistingReferences < 1); | ||
29564 | } or { | ||
29565 | find mustInRelationresolveProxies_attribute_EReference(problem,interpretation,source,target); | ||
29566 | } | ||
29567 | /** | ||
29568 | * Matcher for detecting tuples t where []changeable attribute EStructuralFeature(source,target) | ||
29569 | */ | ||
29570 | private pattern mustInRelationchangeable_attribute_EStructuralFeature( | ||
29571 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29572 | source: DefinedElement, target:DefinedElement) | ||
29573 | { | ||
29574 | find interpretation(problem,interpretation); | ||
29575 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29576 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"changeable attribute EStructuralFeature"); | ||
29577 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29578 | BinaryElementRelationLink.param1(link,source); | ||
29579 | BinaryElementRelationLink.param2(link,target); | ||
29580 | } | ||
29581 | /** | ||
29582 | * Matcher for detecting tuples t where <>changeable attribute EStructuralFeature(source,target) | ||
29583 | */ | ||
29584 | private pattern mayInRelationchangeable_attribute_EStructuralFeature( | ||
29585 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29586 | source: DefinedElement, target:DefinedElement) | ||
29587 | { | ||
29588 | find interpretation(problem,interpretation); | ||
29589 | // The two endpoint of the link have to exist | ||
29590 | find mayExist(problem, interpretation, source); | ||
29591 | find mayExist(problem, interpretation, target); | ||
29592 | // Type consistency | ||
29593 | find mayInstanceOfEStructuralFeature_class(problem,interpretation,source); | ||
29594 | BooleanElement(target); | ||
29595 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29596 | // the upper bound of the multiplicity should be considered. | ||
29597 | numberOfExistingReferences == count find mustInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,source,_); | ||
29598 | check(numberOfExistingReferences < 1); | ||
29599 | } or { | ||
29600 | find mustInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,source,target); | ||
29601 | } | ||
29602 | /** | ||
29603 | * Matcher for detecting tuples t where []volatile attribute EStructuralFeature(source,target) | ||
29604 | */ | ||
29605 | private pattern mustInRelationvolatile_attribute_EStructuralFeature( | ||
29606 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29607 | source: DefinedElement, target:DefinedElement) | ||
29608 | { | ||
29609 | find interpretation(problem,interpretation); | ||
29610 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29611 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"volatile attribute EStructuralFeature"); | ||
29612 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29613 | BinaryElementRelationLink.param1(link,source); | ||
29614 | BinaryElementRelationLink.param2(link,target); | ||
29615 | } | ||
29616 | /** | ||
29617 | * Matcher for detecting tuples t where <>volatile attribute EStructuralFeature(source,target) | ||
29618 | */ | ||
29619 | private pattern mayInRelationvolatile_attribute_EStructuralFeature( | ||
29620 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29621 | source: DefinedElement, target:DefinedElement) | ||
29622 | { | ||
29623 | find interpretation(problem,interpretation); | ||
29624 | // The two endpoint of the link have to exist | ||
29625 | find mayExist(problem, interpretation, source); | ||
29626 | find mayExist(problem, interpretation, target); | ||
29627 | // Type consistency | ||
29628 | find mayInstanceOfEStructuralFeature_class(problem,interpretation,source); | ||
29629 | BooleanElement(target); | ||
29630 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29631 | // the upper bound of the multiplicity should be considered. | ||
29632 | numberOfExistingReferences == count find mustInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,source,_); | ||
29633 | check(numberOfExistingReferences < 1); | ||
29634 | } or { | ||
29635 | find mustInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,source,target); | ||
29636 | } | ||
29637 | /** | ||
29638 | * Matcher for detecting tuples t where []transient attribute EStructuralFeature(source,target) | ||
29639 | */ | ||
29640 | private pattern mustInRelationtransient_attribute_EStructuralFeature( | ||
29641 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29642 | source: DefinedElement, target:DefinedElement) | ||
29643 | { | ||
29644 | find interpretation(problem,interpretation); | ||
29645 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29646 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"transient attribute EStructuralFeature"); | ||
29647 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29648 | BinaryElementRelationLink.param1(link,source); | ||
29649 | BinaryElementRelationLink.param2(link,target); | ||
29650 | } | ||
29651 | /** | ||
29652 | * Matcher for detecting tuples t where <>transient attribute EStructuralFeature(source,target) | ||
29653 | */ | ||
29654 | private pattern mayInRelationtransient_attribute_EStructuralFeature( | ||
29655 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29656 | source: DefinedElement, target:DefinedElement) | ||
29657 | { | ||
29658 | find interpretation(problem,interpretation); | ||
29659 | // The two endpoint of the link have to exist | ||
29660 | find mayExist(problem, interpretation, source); | ||
29661 | find mayExist(problem, interpretation, target); | ||
29662 | // Type consistency | ||
29663 | find mayInstanceOfEStructuralFeature_class(problem,interpretation,source); | ||
29664 | BooleanElement(target); | ||
29665 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29666 | // the upper bound of the multiplicity should be considered. | ||
29667 | numberOfExistingReferences == count find mustInRelationtransient_attribute_EStructuralFeature(problem,interpretation,source,_); | ||
29668 | check(numberOfExistingReferences < 1); | ||
29669 | } or { | ||
29670 | find mustInRelationtransient_attribute_EStructuralFeature(problem,interpretation,source,target); | ||
29671 | } | ||
29672 | /** | ||
29673 | * Matcher for detecting tuples t where []defaultValueLiteral attribute EStructuralFeature(source,target) | ||
29674 | */ | ||
29675 | private pattern mustInRelationdefaultValueLiteral_attribute_EStructuralFeature( | ||
29676 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29677 | source: DefinedElement, target:DefinedElement) | ||
29678 | { | ||
29679 | find interpretation(problem,interpretation); | ||
29680 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29681 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"defaultValueLiteral attribute EStructuralFeature"); | ||
29682 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29683 | BinaryElementRelationLink.param1(link,source); | ||
29684 | BinaryElementRelationLink.param2(link,target); | ||
29685 | } | ||
29686 | /** | ||
29687 | * Matcher for detecting tuples t where <>defaultValueLiteral attribute EStructuralFeature(source,target) | ||
29688 | */ | ||
29689 | private pattern mayInRelationdefaultValueLiteral_attribute_EStructuralFeature( | ||
29690 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29691 | source: DefinedElement, target:DefinedElement) | ||
29692 | { | ||
29693 | find interpretation(problem,interpretation); | ||
29694 | // The two endpoint of the link have to exist | ||
29695 | find mayExist(problem, interpretation, source); | ||
29696 | find mayExist(problem, interpretation, target); | ||
29697 | // Type consistency | ||
29698 | find mayInstanceOfEStructuralFeature_class(problem,interpretation,source); | ||
29699 | StringElement(target); | ||
29700 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29701 | // the upper bound of the multiplicity should be considered. | ||
29702 | numberOfExistingReferences == count find mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,source,_); | ||
29703 | check(numberOfExistingReferences < 1); | ||
29704 | } or { | ||
29705 | find mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,source,target); | ||
29706 | } | ||
29707 | /** | ||
29708 | * Matcher for detecting tuples t where []unsettable attribute EStructuralFeature(source,target) | ||
29709 | */ | ||
29710 | private pattern mustInRelationunsettable_attribute_EStructuralFeature( | ||
29711 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29712 | source: DefinedElement, target:DefinedElement) | ||
29713 | { | ||
29714 | find interpretation(problem,interpretation); | ||
29715 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29716 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unsettable attribute EStructuralFeature"); | ||
29717 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29718 | BinaryElementRelationLink.param1(link,source); | ||
29719 | BinaryElementRelationLink.param2(link,target); | ||
29720 | } | ||
29721 | /** | ||
29722 | * Matcher for detecting tuples t where <>unsettable attribute EStructuralFeature(source,target) | ||
29723 | */ | ||
29724 | private pattern mayInRelationunsettable_attribute_EStructuralFeature( | ||
29725 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29726 | source: DefinedElement, target:DefinedElement) | ||
29727 | { | ||
29728 | find interpretation(problem,interpretation); | ||
29729 | // The two endpoint of the link have to exist | ||
29730 | find mayExist(problem, interpretation, source); | ||
29731 | find mayExist(problem, interpretation, target); | ||
29732 | // Type consistency | ||
29733 | find mayInstanceOfEStructuralFeature_class(problem,interpretation,source); | ||
29734 | BooleanElement(target); | ||
29735 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29736 | // the upper bound of the multiplicity should be considered. | ||
29737 | numberOfExistingReferences == count find mustInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,source,_); | ||
29738 | check(numberOfExistingReferences < 1); | ||
29739 | } or { | ||
29740 | find mustInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,source,target); | ||
29741 | } | ||
29742 | /** | ||
29743 | * Matcher for detecting tuples t where []derived attribute EStructuralFeature(source,target) | ||
29744 | */ | ||
29745 | private pattern mustInRelationderived_attribute_EStructuralFeature( | ||
29746 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29747 | source: DefinedElement, target:DefinedElement) | ||
29748 | { | ||
29749 | find interpretation(problem,interpretation); | ||
29750 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29751 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"derived attribute EStructuralFeature"); | ||
29752 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29753 | BinaryElementRelationLink.param1(link,source); | ||
29754 | BinaryElementRelationLink.param2(link,target); | ||
29755 | } | ||
29756 | /** | ||
29757 | * Matcher for detecting tuples t where <>derived attribute EStructuralFeature(source,target) | ||
29758 | */ | ||
29759 | private pattern mayInRelationderived_attribute_EStructuralFeature( | ||
29760 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29761 | source: DefinedElement, target:DefinedElement) | ||
29762 | { | ||
29763 | find interpretation(problem,interpretation); | ||
29764 | // The two endpoint of the link have to exist | ||
29765 | find mayExist(problem, interpretation, source); | ||
29766 | find mayExist(problem, interpretation, target); | ||
29767 | // Type consistency | ||
29768 | find mayInstanceOfEStructuralFeature_class(problem,interpretation,source); | ||
29769 | BooleanElement(target); | ||
29770 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29771 | // the upper bound of the multiplicity should be considered. | ||
29772 | numberOfExistingReferences == count find mustInRelationderived_attribute_EStructuralFeature(problem,interpretation,source,_); | ||
29773 | check(numberOfExistingReferences < 1); | ||
29774 | } or { | ||
29775 | find mustInRelationderived_attribute_EStructuralFeature(problem,interpretation,source,target); | ||
29776 | } | ||
29777 | /** | ||
29778 | * Matcher for detecting tuples t where []ordered attribute ETypedElement(source,target) | ||
29779 | */ | ||
29780 | private pattern mustInRelationordered_attribute_ETypedElement( | ||
29781 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29782 | source: DefinedElement, target:DefinedElement) | ||
29783 | { | ||
29784 | find interpretation(problem,interpretation); | ||
29785 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29786 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"ordered attribute ETypedElement"); | ||
29787 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29788 | BinaryElementRelationLink.param1(link,source); | ||
29789 | BinaryElementRelationLink.param2(link,target); | ||
29790 | } | ||
29791 | /** | ||
29792 | * Matcher for detecting tuples t where <>ordered attribute ETypedElement(source,target) | ||
29793 | */ | ||
29794 | private pattern mayInRelationordered_attribute_ETypedElement( | ||
29795 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29796 | source: DefinedElement, target:DefinedElement) | ||
29797 | { | ||
29798 | find interpretation(problem,interpretation); | ||
29799 | // The two endpoint of the link have to exist | ||
29800 | find mayExist(problem, interpretation, source); | ||
29801 | find mayExist(problem, interpretation, target); | ||
29802 | // Type consistency | ||
29803 | find mayInstanceOfETypedElement_class(problem,interpretation,source); | ||
29804 | BooleanElement(target); | ||
29805 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29806 | // the upper bound of the multiplicity should be considered. | ||
29807 | numberOfExistingReferences == count find mustInRelationordered_attribute_ETypedElement(problem,interpretation,source,_); | ||
29808 | check(numberOfExistingReferences < 1); | ||
29809 | } or { | ||
29810 | find mustInRelationordered_attribute_ETypedElement(problem,interpretation,source,target); | ||
29811 | } | ||
29812 | /** | ||
29813 | * Matcher for detecting tuples t where []unique attribute ETypedElement(source,target) | ||
29814 | */ | ||
29815 | private pattern mustInRelationunique_attribute_ETypedElement( | ||
29816 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29817 | source: DefinedElement, target:DefinedElement) | ||
29818 | { | ||
29819 | find interpretation(problem,interpretation); | ||
29820 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29821 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unique attribute ETypedElement"); | ||
29822 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29823 | BinaryElementRelationLink.param1(link,source); | ||
29824 | BinaryElementRelationLink.param2(link,target); | ||
29825 | } | ||
29826 | /** | ||
29827 | * Matcher for detecting tuples t where <>unique attribute ETypedElement(source,target) | ||
29828 | */ | ||
29829 | private pattern mayInRelationunique_attribute_ETypedElement( | ||
29830 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29831 | source: DefinedElement, target:DefinedElement) | ||
29832 | { | ||
29833 | find interpretation(problem,interpretation); | ||
29834 | // The two endpoint of the link have to exist | ||
29835 | find mayExist(problem, interpretation, source); | ||
29836 | find mayExist(problem, interpretation, target); | ||
29837 | // Type consistency | ||
29838 | find mayInstanceOfETypedElement_class(problem,interpretation,source); | ||
29839 | BooleanElement(target); | ||
29840 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29841 | // the upper bound of the multiplicity should be considered. | ||
29842 | numberOfExistingReferences == count find mustInRelationunique_attribute_ETypedElement(problem,interpretation,source,_); | ||
29843 | check(numberOfExistingReferences < 1); | ||
29844 | } or { | ||
29845 | find mustInRelationunique_attribute_ETypedElement(problem,interpretation,source,target); | ||
29846 | } | ||
29847 | /** | ||
29848 | * Matcher for detecting tuples t where []lowerBound attribute ETypedElement(source,target) | ||
29849 | */ | ||
29850 | private pattern mustInRelationlowerBound_attribute_ETypedElement( | ||
29851 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29852 | source: DefinedElement, target:DefinedElement) | ||
29853 | { | ||
29854 | find interpretation(problem,interpretation); | ||
29855 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29856 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"lowerBound attribute ETypedElement"); | ||
29857 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29858 | BinaryElementRelationLink.param1(link,source); | ||
29859 | BinaryElementRelationLink.param2(link,target); | ||
29860 | } | ||
29861 | /** | ||
29862 | * Matcher for detecting tuples t where <>lowerBound attribute ETypedElement(source,target) | ||
29863 | */ | ||
29864 | private pattern mayInRelationlowerBound_attribute_ETypedElement( | ||
29865 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29866 | source: DefinedElement, target:DefinedElement) | ||
29867 | { | ||
29868 | find interpretation(problem,interpretation); | ||
29869 | // The two endpoint of the link have to exist | ||
29870 | find mayExist(problem, interpretation, source); | ||
29871 | find mayExist(problem, interpretation, target); | ||
29872 | // Type consistency | ||
29873 | find mayInstanceOfETypedElement_class(problem,interpretation,source); | ||
29874 | IntegerElement(target); | ||
29875 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29876 | // the upper bound of the multiplicity should be considered. | ||
29877 | numberOfExistingReferences == count find mustInRelationlowerBound_attribute_ETypedElement(problem,interpretation,source,_); | ||
29878 | check(numberOfExistingReferences < 1); | ||
29879 | } or { | ||
29880 | find mustInRelationlowerBound_attribute_ETypedElement(problem,interpretation,source,target); | ||
29881 | } | ||
29882 | /** | ||
29883 | * Matcher for detecting tuples t where []upperBound attribute ETypedElement(source,target) | ||
29884 | */ | ||
29885 | private pattern mustInRelationupperBound_attribute_ETypedElement( | ||
29886 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29887 | source: DefinedElement, target:DefinedElement) | ||
29888 | { | ||
29889 | find interpretation(problem,interpretation); | ||
29890 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29891 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"upperBound attribute ETypedElement"); | ||
29892 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29893 | BinaryElementRelationLink.param1(link,source); | ||
29894 | BinaryElementRelationLink.param2(link,target); | ||
29895 | } | ||
29896 | /** | ||
29897 | * Matcher for detecting tuples t where <>upperBound attribute ETypedElement(source,target) | ||
29898 | */ | ||
29899 | private pattern mayInRelationupperBound_attribute_ETypedElement( | ||
29900 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29901 | source: DefinedElement, target:DefinedElement) | ||
29902 | { | ||
29903 | find interpretation(problem,interpretation); | ||
29904 | // The two endpoint of the link have to exist | ||
29905 | find mayExist(problem, interpretation, source); | ||
29906 | find mayExist(problem, interpretation, target); | ||
29907 | // Type consistency | ||
29908 | find mayInstanceOfETypedElement_class(problem,interpretation,source); | ||
29909 | IntegerElement(target); | ||
29910 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29911 | // the upper bound of the multiplicity should be considered. | ||
29912 | numberOfExistingReferences == count find mustInRelationupperBound_attribute_ETypedElement(problem,interpretation,source,_); | ||
29913 | check(numberOfExistingReferences < 1); | ||
29914 | } or { | ||
29915 | find mustInRelationupperBound_attribute_ETypedElement(problem,interpretation,source,target); | ||
29916 | } | ||
29917 | /** | ||
29918 | * Matcher for detecting tuples t where []many attribute ETypedElement(source,target) | ||
29919 | */ | ||
29920 | private pattern mustInRelationmany_attribute_ETypedElement( | ||
29921 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29922 | source: DefinedElement, target:DefinedElement) | ||
29923 | { | ||
29924 | find interpretation(problem,interpretation); | ||
29925 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29926 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"many attribute ETypedElement"); | ||
29927 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29928 | BinaryElementRelationLink.param1(link,source); | ||
29929 | BinaryElementRelationLink.param2(link,target); | ||
29930 | } | ||
29931 | /** | ||
29932 | * Matcher for detecting tuples t where <>many attribute ETypedElement(source,target) | ||
29933 | */ | ||
29934 | private pattern mayInRelationmany_attribute_ETypedElement( | ||
29935 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29936 | source: DefinedElement, target:DefinedElement) | ||
29937 | { | ||
29938 | find interpretation(problem,interpretation); | ||
29939 | // The two endpoint of the link have to exist | ||
29940 | find mayExist(problem, interpretation, source); | ||
29941 | find mayExist(problem, interpretation, target); | ||
29942 | // Type consistency | ||
29943 | find mayInstanceOfETypedElement_class(problem,interpretation,source); | ||
29944 | BooleanElement(target); | ||
29945 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29946 | // the upper bound of the multiplicity should be considered. | ||
29947 | numberOfExistingReferences == count find mustInRelationmany_attribute_ETypedElement(problem,interpretation,source,_); | ||
29948 | check(numberOfExistingReferences < 1); | ||
29949 | } or { | ||
29950 | find mustInRelationmany_attribute_ETypedElement(problem,interpretation,source,target); | ||
29951 | } | ||
29952 | /** | ||
29953 | * Matcher for detecting tuples t where []required attribute ETypedElement(source,target) | ||
29954 | */ | ||
29955 | private pattern mustInRelationrequired_attribute_ETypedElement( | ||
29956 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29957 | source: DefinedElement, target:DefinedElement) | ||
29958 | { | ||
29959 | find interpretation(problem,interpretation); | ||
29960 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29961 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"required attribute ETypedElement"); | ||
29962 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29963 | BinaryElementRelationLink.param1(link,source); | ||
29964 | BinaryElementRelationLink.param2(link,target); | ||
29965 | } | ||
29966 | /** | ||
29967 | * Matcher for detecting tuples t where <>required attribute ETypedElement(source,target) | ||
29968 | */ | ||
29969 | private pattern mayInRelationrequired_attribute_ETypedElement( | ||
29970 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29971 | source: DefinedElement, target:DefinedElement) | ||
29972 | { | ||
29973 | find interpretation(problem,interpretation); | ||
29974 | // The two endpoint of the link have to exist | ||
29975 | find mayExist(problem, interpretation, source); | ||
29976 | find mayExist(problem, interpretation, target); | ||
29977 | // Type consistency | ||
29978 | find mayInstanceOfETypedElement_class(problem,interpretation,source); | ||
29979 | BooleanElement(target); | ||
29980 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
29981 | // the upper bound of the multiplicity should be considered. | ||
29982 | numberOfExistingReferences == count find mustInRelationrequired_attribute_ETypedElement(problem,interpretation,source,_); | ||
29983 | check(numberOfExistingReferences < 1); | ||
29984 | } or { | ||
29985 | find mustInRelationrequired_attribute_ETypedElement(problem,interpretation,source,target); | ||
29986 | } | ||
29987 | /** | ||
29988 | * Matcher for detecting tuples t where []key attribute EStringToStringMapEntry(source,target) | ||
29989 | */ | ||
29990 | private pattern mustInRelationkey_attribute_EStringToStringMapEntry( | ||
29991 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
29992 | source: DefinedElement, target:DefinedElement) | ||
29993 | { | ||
29994 | find interpretation(problem,interpretation); | ||
29995 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
29996 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"key attribute EStringToStringMapEntry"); | ||
29997 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
29998 | BinaryElementRelationLink.param1(link,source); | ||
29999 | BinaryElementRelationLink.param2(link,target); | ||
30000 | } | ||
30001 | /** | ||
30002 | * Matcher for detecting tuples t where <>key attribute EStringToStringMapEntry(source,target) | ||
30003 | */ | ||
30004 | private pattern mayInRelationkey_attribute_EStringToStringMapEntry( | ||
30005 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30006 | source: DefinedElement, target:DefinedElement) | ||
30007 | { | ||
30008 | find interpretation(problem,interpretation); | ||
30009 | // The two endpoint of the link have to exist | ||
30010 | find mayExist(problem, interpretation, source); | ||
30011 | find mayExist(problem, interpretation, target); | ||
30012 | // Type consistency | ||
30013 | find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,source); | ||
30014 | StringElement(target); | ||
30015 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
30016 | // the upper bound of the multiplicity should be considered. | ||
30017 | numberOfExistingReferences == count find mustInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,source,_); | ||
30018 | check(numberOfExistingReferences < 1); | ||
30019 | } or { | ||
30020 | find mustInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,source,target); | ||
30021 | } | ||
30022 | /** | ||
30023 | * Matcher for detecting tuples t where []value attribute EStringToStringMapEntry(source,target) | ||
30024 | */ | ||
30025 | private pattern mustInRelationvalue_attribute_EStringToStringMapEntry( | ||
30026 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30027 | source: DefinedElement, target:DefinedElement) | ||
30028 | { | ||
30029 | find interpretation(problem,interpretation); | ||
30030 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
30031 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EStringToStringMapEntry"); | ||
30032 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
30033 | BinaryElementRelationLink.param1(link,source); | ||
30034 | BinaryElementRelationLink.param2(link,target); | ||
30035 | } | ||
30036 | /** | ||
30037 | * Matcher for detecting tuples t where <>value attribute EStringToStringMapEntry(source,target) | ||
30038 | */ | ||
30039 | private pattern mayInRelationvalue_attribute_EStringToStringMapEntry( | ||
30040 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30041 | source: DefinedElement, target:DefinedElement) | ||
30042 | { | ||
30043 | find interpretation(problem,interpretation); | ||
30044 | // The two endpoint of the link have to exist | ||
30045 | find mayExist(problem, interpretation, source); | ||
30046 | find mayExist(problem, interpretation, target); | ||
30047 | // Type consistency | ||
30048 | find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,source); | ||
30049 | StringElement(target); | ||
30050 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
30051 | // the upper bound of the multiplicity should be considered. | ||
30052 | numberOfExistingReferences == count find mustInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,source,_); | ||
30053 | check(numberOfExistingReferences < 1); | ||
30054 | } or { | ||
30055 | find mustInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,source,target); | ||
30056 | } | ||
30057 | |||
30058 | ////////// | ||
30059 | // 1.3 Relation Definition Indexers | ||
30060 | ////////// | ||
30061 | |||
30062 | ////////// | ||
30063 | // 1.4 Containment Indexer | ||
30064 | ////////// | ||
30065 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
30066 | find mustContains4(_,_,source,target); | ||
30067 | } | ||
30068 | |||
30069 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
30070 | source: DefinedElement, target: DefinedElement) | ||
30071 | { find mustInRelationdetails_reference_EAnnotation(problem,interpretation,source,target); }or | ||
30072 | |||
30073 | { find mustInRelationcontents_reference_EAnnotation(problem,interpretation,source,target); }or | ||
30074 | |||
30075 | { find mustInRelationeOperations_reference_EClass(problem,interpretation,source,target); }or | ||
30076 | |||
30077 | { find mustInRelationeStructuralFeatures_reference_EClass(problem,interpretation,source,target); }or | ||
30078 | |||
30079 | { find mustInRelationeGenericSuperTypes_reference_EClass(problem,interpretation,source,target); }or | ||
30080 | |||
30081 | { find mustInRelationeTypeParameters_reference_EClassifier(problem,interpretation,source,target); }or | ||
30082 | |||
30083 | { find mustInRelationeLiterals_reference_EEnum(problem,interpretation,source,target); }or | ||
30084 | |||
30085 | { find mustInRelationeAnnotations_reference_EModelElement(problem,interpretation,source,target); }or | ||
30086 | |||
30087 | { find mustInRelationeTypeParameters_reference_EOperation(problem,interpretation,source,target); }or | ||
30088 | |||
30089 | { find mustInRelationeParameters_reference_EOperation(problem,interpretation,source,target); }or | ||
30090 | |||
30091 | { find mustInRelationeGenericExceptions_reference_EOperation(problem,interpretation,source,target); }or | ||
30092 | |||
30093 | { find mustInRelationeClassifiers_reference_EPackage(problem,interpretation,source,target); }or | ||
30094 | |||
30095 | { find mustInRelationeSubpackages_reference_EPackage(problem,interpretation,source,target); }or | ||
30096 | |||
30097 | { find mustInRelationeGenericType_reference_ETypedElement(problem,interpretation,source,target); }or | ||
30098 | |||
30099 | { find mustInRelationeUpperBound_reference_EGenericType(problem,interpretation,source,target); }or | ||
30100 | |||
30101 | { find mustInRelationeTypeArguments_reference_EGenericType(problem,interpretation,source,target); }or | ||
30102 | |||
30103 | { find mustInRelationeLowerBound_reference_EGenericType(problem,interpretation,source,target); }or | ||
30104 | |||
30105 | { find mustInRelationeBounds_reference_ETypeParameter(problem,interpretation,source,target); } | ||
30106 | |||
30107 | private pattern mustTransitiveContains(source,target) { | ||
30108 | find mustContains2+(source,target); | ||
30109 | } | ||
30110 | |||
30111 | ////////// | ||
30112 | // 2. Invalidation Indexers | ||
30113 | ////////// | ||
30114 | // 2.1 Invalidated by WF Queries | ||
30115 | ////////// | ||
30116 | |||
30117 | ////////// | ||
30118 | // 3. Unfinishedness Indexers | ||
30119 | ////////// | ||
30120 | // 3.1 Unfinishedness Measured by Multiplicity | ||
30121 | ////////// | ||
30122 | pattern unfinishedLowerMultiplicity_eAttributeType_reference_EAttribute(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
30123 | find interpretation(problem,interpretation); | ||
30124 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
30125 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributeType reference EAttribute"); | ||
30126 | find mustInstanceOfEAttribute_class(problem,interpretation,object); | ||
30127 | numberOfExistingReferences == count find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,object,_); | ||
30128 | check(numberOfExistingReferences < 1); | ||
30129 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
30130 | } | ||
30131 | pattern unfinishedLowerMultiplicity_eReferenceType_reference_EReference(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
30132 | find interpretation(problem,interpretation); | ||
30133 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
30134 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferenceType reference EReference"); | ||
30135 | find mustInstanceOfEReference_class(problem,interpretation,object); | ||
30136 | numberOfExistingReferences == count find mustInRelationeReferenceType_reference_EReference(problem,interpretation,object,_); | ||
30137 | check(numberOfExistingReferences < 1); | ||
30138 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
30139 | } | ||
30140 | pattern unfinishedLowerMultiplicity_eRawType_reference_EGenericType(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
30141 | find interpretation(problem,interpretation); | ||
30142 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
30143 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eRawType reference EGenericType"); | ||
30144 | find mustInstanceOfEGenericType_class(problem,interpretation,object); | ||
30145 | numberOfExistingReferences == count find mustInRelationeRawType_reference_EGenericType(problem,interpretation,object,_); | ||
30146 | check(numberOfExistingReferences < 1); | ||
30147 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
30148 | } | ||
30149 | |||
30150 | ////////// | ||
30151 | // 3.2 Unfinishedness Measured by WF Queries | ||
30152 | ////////// | ||
30153 | |||
30154 | ////////// | ||
30155 | // 4. Refinement Indexers | ||
30156 | ////////// | ||
30157 | // 4.1 Object constructors | ||
30158 | ////////// | ||
30159 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
30160 | { | ||
30161 | find interpretation(problem,interpretation); | ||
30162 | find mustInstanceOfEModelElement_class(problem,interpretation,root); | ||
30163 | find mustExist(problem, interpretation, root); | ||
30164 | }or{ | ||
30165 | find interpretation(problem,interpretation); | ||
30166 | find mustInstanceOfEEnum_class(problem,interpretation,root); | ||
30167 | find mustExist(problem, interpretation, root); | ||
30168 | }or{ | ||
30169 | find interpretation(problem,interpretation); | ||
30170 | find mustInstanceOfEAttribute_class(problem,interpretation,root); | ||
30171 | find mustExist(problem, interpretation, root); | ||
30172 | }or{ | ||
30173 | find interpretation(problem,interpretation); | ||
30174 | find mustInstanceOfEObject_class(problem,interpretation,root); | ||
30175 | find mustExist(problem, interpretation, root); | ||
30176 | }or{ | ||
30177 | find interpretation(problem,interpretation); | ||
30178 | find mustInstanceOfEClass_class(problem,interpretation,root); | ||
30179 | find mustExist(problem, interpretation, root); | ||
30180 | }or{ | ||
30181 | find interpretation(problem,interpretation); | ||
30182 | find mustInstanceOfEClassifier_class(problem,interpretation,root); | ||
30183 | find mustExist(problem, interpretation, root); | ||
30184 | }or{ | ||
30185 | find interpretation(problem,interpretation); | ||
30186 | find mustInstanceOfEEnumLiteral_class(problem,interpretation,root); | ||
30187 | find mustExist(problem, interpretation, root); | ||
30188 | }or{ | ||
30189 | find interpretation(problem,interpretation); | ||
30190 | find mustInstanceOfEPackage_class(problem,interpretation,root); | ||
30191 | find mustExist(problem, interpretation, root); | ||
30192 | }or{ | ||
30193 | find interpretation(problem,interpretation); | ||
30194 | find mustInstanceOfEOperation_class(problem,interpretation,root); | ||
30195 | find mustExist(problem, interpretation, root); | ||
30196 | }or{ | ||
30197 | find interpretation(problem,interpretation); | ||
30198 | find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,root); | ||
30199 | find mustExist(problem, interpretation, root); | ||
30200 | }or{ | ||
30201 | find interpretation(problem,interpretation); | ||
30202 | find mustInstanceOfEReference_class(problem,interpretation,root); | ||
30203 | find mustExist(problem, interpretation, root); | ||
30204 | }or{ | ||
30205 | find interpretation(problem,interpretation); | ||
30206 | find mustInstanceOfEAnnotation_class(problem,interpretation,root); | ||
30207 | find mustExist(problem, interpretation, root); | ||
30208 | }or{ | ||
30209 | find interpretation(problem,interpretation); | ||
30210 | find mustInstanceOfETypedElement_class(problem,interpretation,root); | ||
30211 | find mustExist(problem, interpretation, root); | ||
30212 | }or{ | ||
30213 | find interpretation(problem,interpretation); | ||
30214 | find mustInstanceOfEStructuralFeature_class(problem,interpretation,root); | ||
30215 | find mustExist(problem, interpretation, root); | ||
30216 | }or{ | ||
30217 | find interpretation(problem,interpretation); | ||
30218 | find mustInstanceOfEDataType_class(problem,interpretation,root); | ||
30219 | find mustExist(problem, interpretation, root); | ||
30220 | }or{ | ||
30221 | find interpretation(problem,interpretation); | ||
30222 | find mustInstanceOfEParameter_class(problem,interpretation,root); | ||
30223 | find mustExist(problem, interpretation, root); | ||
30224 | }or{ | ||
30225 | find interpretation(problem,interpretation); | ||
30226 | find mustInstanceOfENamedElement_class(problem,interpretation,root); | ||
30227 | find mustExist(problem, interpretation, root); | ||
30228 | }or{ | ||
30229 | find interpretation(problem,interpretation); | ||
30230 | find mustInstanceOfEGenericType_class(problem,interpretation,root); | ||
30231 | find mustExist(problem, interpretation, root); | ||
30232 | }or{ | ||
30233 | find interpretation(problem,interpretation); | ||
30234 | find mustInstanceOfETypeParameter_class(problem,interpretation,root); | ||
30235 | find mustExist(problem, interpretation, root); | ||
30236 | }or{ | ||
30237 | find interpretation(problem,interpretation); | ||
30238 | find mustInstanceOfEModelElement_class_DefinedPart(problem,interpretation,root); | ||
30239 | find mustExist(problem, interpretation, root); | ||
30240 | }or{ | ||
30241 | find interpretation(problem,interpretation); | ||
30242 | find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,root); | ||
30243 | find mustExist(problem, interpretation, root); | ||
30244 | }or{ | ||
30245 | find interpretation(problem,interpretation); | ||
30246 | find mustInstanceOfENamedElement_class_DefinedPart(problem,interpretation,root); | ||
30247 | find mustExist(problem, interpretation, root); | ||
30248 | }or{ | ||
30249 | find interpretation(problem,interpretation); | ||
30250 | find mustInstanceOfENamedElement_class_UndefinedPart(problem,interpretation,root); | ||
30251 | find mustExist(problem, interpretation, root); | ||
30252 | }or{ | ||
30253 | find interpretation(problem,interpretation); | ||
30254 | find mustInstanceOfEPackage_class_DefinedPart(problem,interpretation,root); | ||
30255 | find mustExist(problem, interpretation, root); | ||
30256 | }or{ | ||
30257 | find interpretation(problem,interpretation); | ||
30258 | find mustInstanceOfEPackage_class_UndefinedPart(problem,interpretation,root); | ||
30259 | find mustExist(problem, interpretation, root); | ||
30260 | } | ||
30261 | pattern createObject_EAttribute_class_by_eStructuralFeatures_reference_EClass_with_eContainingClass_reference_EStructuralFeature( | ||
30262 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30263 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
30264 | container:DefinedElement) | ||
30265 | { | ||
30266 | find interpretation(problem,interpretation); | ||
30267 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30268 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAttribute class"); | ||
30269 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
30270 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eStructuralFeatures reference EClass"); | ||
30271 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
30272 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eContainingClass reference EStructuralFeature"); | ||
30273 | find mustInstanceOfEClass_class(problem,interpretation,container); | ||
30274 | find mayInstanceOfEAttribute_class(problem,interpretation,newObject); | ||
30275 | find mayInRelationeStructuralFeatures_reference_EClass(problem,interpretation,container,newObject); | ||
30276 | find mustExist(problem, interpretation, container); | ||
30277 | neg find mustExist(problem, interpretation, newObject); | ||
30278 | } | ||
30279 | pattern createObject_EAttribute_class( | ||
30280 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30281 | typeInterpretation:PartialComplexTypeInterpretation) | ||
30282 | { | ||
30283 | find interpretation(problem,interpretation); | ||
30284 | neg find hasElementInContainment(problem,interpretation); | ||
30285 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30286 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAttribute class"); | ||
30287 | find mayInstanceOfEAttribute_class(problem,interpretation,newObject); | ||
30288 | find mayExist(problem, interpretation, newObject); | ||
30289 | neg find mustExist(problem, interpretation, newObject); | ||
30290 | } | ||
30291 | pattern createObject_EAnnotation_class_by_eAnnotations_reference_EModelElement_with_eModelElement_reference_EAnnotation( | ||
30292 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30293 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
30294 | container:DefinedElement) | ||
30295 | { | ||
30296 | find interpretation(problem,interpretation); | ||
30297 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30298 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAnnotation class"); | ||
30299 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
30300 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eAnnotations reference EModelElement"); | ||
30301 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
30302 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eModelElement reference EAnnotation"); | ||
30303 | find mustInstanceOfEModelElement_class(problem,interpretation,container); | ||
30304 | find mayInstanceOfEAnnotation_class(problem,interpretation,newObject); | ||
30305 | find mayInRelationeAnnotations_reference_EModelElement(problem,interpretation,container,newObject); | ||
30306 | find mustExist(problem, interpretation, container); | ||
30307 | neg find mustExist(problem, interpretation, newObject); | ||
30308 | } | ||
30309 | pattern createObject_EAnnotation_class( | ||
30310 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30311 | typeInterpretation:PartialComplexTypeInterpretation) | ||
30312 | { | ||
30313 | find interpretation(problem,interpretation); | ||
30314 | neg find hasElementInContainment(problem,interpretation); | ||
30315 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30316 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAnnotation class"); | ||
30317 | find mayInstanceOfEAnnotation_class(problem,interpretation,newObject); | ||
30318 | find mayExist(problem, interpretation, newObject); | ||
30319 | neg find mustExist(problem, interpretation, newObject); | ||
30320 | } | ||
30321 | pattern createObject_EReference_class_by_eStructuralFeatures_reference_EClass_with_eContainingClass_reference_EStructuralFeature( | ||
30322 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30323 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
30324 | container:DefinedElement) | ||
30325 | { | ||
30326 | find interpretation(problem,interpretation); | ||
30327 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30328 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EReference class"); | ||
30329 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
30330 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eStructuralFeatures reference EClass"); | ||
30331 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
30332 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eContainingClass reference EStructuralFeature"); | ||
30333 | find mustInstanceOfEClass_class(problem,interpretation,container); | ||
30334 | find mayInstanceOfEReference_class(problem,interpretation,newObject); | ||
30335 | find mayInRelationeStructuralFeatures_reference_EClass(problem,interpretation,container,newObject); | ||
30336 | find mustExist(problem, interpretation, container); | ||
30337 | neg find mustExist(problem, interpretation, newObject); | ||
30338 | } | ||
30339 | pattern createObject_EReference_class( | ||
30340 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30341 | typeInterpretation:PartialComplexTypeInterpretation) | ||
30342 | { | ||
30343 | find interpretation(problem,interpretation); | ||
30344 | neg find hasElementInContainment(problem,interpretation); | ||
30345 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30346 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EReference class"); | ||
30347 | find mayInstanceOfEReference_class(problem,interpretation,newObject); | ||
30348 | find mayExist(problem, interpretation, newObject); | ||
30349 | neg find mustExist(problem, interpretation, newObject); | ||
30350 | } | ||
30351 | pattern createObject_EObject_class_by_contents_reference_EAnnotation( | ||
30352 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30353 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
30354 | container:DefinedElement) | ||
30355 | { | ||
30356 | find interpretation(problem,interpretation); | ||
30357 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30358 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EObject class"); | ||
30359 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
30360 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference EAnnotation"); | ||
30361 | find mustInstanceOfEAnnotation_class(problem,interpretation,container); | ||
30362 | find mayInstanceOfEObject_class(problem,interpretation,newObject); | ||
30363 | find mayInRelationcontents_reference_EAnnotation(problem,interpretation,container,newObject); | ||
30364 | find mustExist(problem, interpretation, container); | ||
30365 | neg find mustExist(problem, interpretation, newObject); | ||
30366 | } | ||
30367 | pattern createObject_EObject_class( | ||
30368 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30369 | typeInterpretation:PartialComplexTypeInterpretation) | ||
30370 | { | ||
30371 | find interpretation(problem,interpretation); | ||
30372 | neg find hasElementInContainment(problem,interpretation); | ||
30373 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30374 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EObject class"); | ||
30375 | find mayInstanceOfEObject_class(problem,interpretation,newObject); | ||
30376 | find mayExist(problem, interpretation, newObject); | ||
30377 | neg find mustExist(problem, interpretation, newObject); | ||
30378 | } | ||
30379 | pattern createObject_EParameter_class_by_eParameters_reference_EOperation_with_eOperation_reference_EParameter( | ||
30380 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30381 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
30382 | container:DefinedElement) | ||
30383 | { | ||
30384 | find interpretation(problem,interpretation); | ||
30385 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30386 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EParameter class"); | ||
30387 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
30388 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eParameters reference EOperation"); | ||
30389 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
30390 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eOperation reference EParameter"); | ||
30391 | find mustInstanceOfEOperation_class(problem,interpretation,container); | ||
30392 | find mayInstanceOfEParameter_class(problem,interpretation,newObject); | ||
30393 | find mayInRelationeParameters_reference_EOperation(problem,interpretation,container,newObject); | ||
30394 | find mustExist(problem, interpretation, container); | ||
30395 | neg find mustExist(problem, interpretation, newObject); | ||
30396 | } | ||
30397 | pattern createObject_EParameter_class( | ||
30398 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30399 | typeInterpretation:PartialComplexTypeInterpretation) | ||
30400 | { | ||
30401 | find interpretation(problem,interpretation); | ||
30402 | neg find hasElementInContainment(problem,interpretation); | ||
30403 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30404 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EParameter class"); | ||
30405 | find mayInstanceOfEParameter_class(problem,interpretation,newObject); | ||
30406 | find mayExist(problem, interpretation, newObject); | ||
30407 | neg find mustExist(problem, interpretation, newObject); | ||
30408 | } | ||
30409 | pattern createObject_EPackage_class_UndefinedPart_by_eSubpackages_reference_EPackage_with_eSuperPackage_reference_EPackage( | ||
30410 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30411 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
30412 | container:DefinedElement) | ||
30413 | { | ||
30414 | find interpretation(problem,interpretation); | ||
30415 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30416 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EPackage class UndefinedPart"); | ||
30417 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
30418 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eSubpackages reference EPackage"); | ||
30419 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
30420 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eSuperPackage reference EPackage"); | ||
30421 | find mustInstanceOfEPackage_class(problem,interpretation,container); | ||
30422 | find mayInstanceOfEPackage_class_UndefinedPart(problem,interpretation,newObject); | ||
30423 | find mayInRelationeSubpackages_reference_EPackage(problem,interpretation,container,newObject); | ||
30424 | find mustExist(problem, interpretation, container); | ||
30425 | neg find mustExist(problem, interpretation, newObject); | ||
30426 | } | ||
30427 | pattern createObject_EPackage_class_UndefinedPart( | ||
30428 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30429 | typeInterpretation:PartialComplexTypeInterpretation) | ||
30430 | { | ||
30431 | find interpretation(problem,interpretation); | ||
30432 | neg find hasElementInContainment(problem,interpretation); | ||
30433 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30434 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EPackage class UndefinedPart"); | ||
30435 | find mayInstanceOfEPackage_class_UndefinedPart(problem,interpretation,newObject); | ||
30436 | find mayExist(problem, interpretation, newObject); | ||
30437 | neg find mustExist(problem, interpretation, newObject); | ||
30438 | } | ||
30439 | pattern createObject_EStringToStringMapEntry_class_by_details_reference_EAnnotation( | ||
30440 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30441 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
30442 | container:DefinedElement) | ||
30443 | { | ||
30444 | find interpretation(problem,interpretation); | ||
30445 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30446 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EStringToStringMapEntry class"); | ||
30447 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
30448 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"details reference EAnnotation"); | ||
30449 | find mustInstanceOfEAnnotation_class(problem,interpretation,container); | ||
30450 | find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,newObject); | ||
30451 | find mayInRelationdetails_reference_EAnnotation(problem,interpretation,container,newObject); | ||
30452 | find mustExist(problem, interpretation, container); | ||
30453 | neg find mustExist(problem, interpretation, newObject); | ||
30454 | } | ||
30455 | pattern createObject_EStringToStringMapEntry_class( | ||
30456 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30457 | typeInterpretation:PartialComplexTypeInterpretation) | ||
30458 | { | ||
30459 | find interpretation(problem,interpretation); | ||
30460 | neg find hasElementInContainment(problem,interpretation); | ||
30461 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30462 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EStringToStringMapEntry class"); | ||
30463 | find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,newObject); | ||
30464 | find mayExist(problem, interpretation, newObject); | ||
30465 | neg find mustExist(problem, interpretation, newObject); | ||
30466 | } | ||
30467 | pattern createObject_EEnum_class_by_eClassifiers_reference_EPackage_with_ePackage_reference_EClassifier( | ||
30468 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30469 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
30470 | container:DefinedElement) | ||
30471 | { | ||
30472 | find interpretation(problem,interpretation); | ||
30473 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30474 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnum class"); | ||
30475 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
30476 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eClassifiers reference EPackage"); | ||
30477 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
30478 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"ePackage reference EClassifier"); | ||
30479 | find mustInstanceOfEPackage_class(problem,interpretation,container); | ||
30480 | find mayInstanceOfEEnum_class(problem,interpretation,newObject); | ||
30481 | find mayInRelationeClassifiers_reference_EPackage(problem,interpretation,container,newObject); | ||
30482 | find mustExist(problem, interpretation, container); | ||
30483 | neg find mustExist(problem, interpretation, newObject); | ||
30484 | } | ||
30485 | pattern createObject_EEnum_class( | ||
30486 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30487 | typeInterpretation:PartialComplexTypeInterpretation) | ||
30488 | { | ||
30489 | find interpretation(problem,interpretation); | ||
30490 | neg find hasElementInContainment(problem,interpretation); | ||
30491 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30492 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnum class"); | ||
30493 | find mayInstanceOfEEnum_class(problem,interpretation,newObject); | ||
30494 | find mayExist(problem, interpretation, newObject); | ||
30495 | neg find mustExist(problem, interpretation, newObject); | ||
30496 | } | ||
30497 | pattern createObject_EEnumLiteral_class_by_eLiterals_reference_EEnum_with_eEnum_reference_EEnumLiteral( | ||
30498 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30499 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
30500 | container:DefinedElement) | ||
30501 | { | ||
30502 | find interpretation(problem,interpretation); | ||
30503 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30504 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnumLiteral class"); | ||
30505 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
30506 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eLiterals reference EEnum"); | ||
30507 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
30508 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eEnum reference EEnumLiteral"); | ||
30509 | find mustInstanceOfEEnum_class(problem,interpretation,container); | ||
30510 | find mayInstanceOfEEnumLiteral_class(problem,interpretation,newObject); | ||
30511 | find mayInRelationeLiterals_reference_EEnum(problem,interpretation,container,newObject); | ||
30512 | find mustExist(problem, interpretation, container); | ||
30513 | neg find mustExist(problem, interpretation, newObject); | ||
30514 | } | ||
30515 | pattern createObject_EEnumLiteral_class( | ||
30516 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30517 | typeInterpretation:PartialComplexTypeInterpretation) | ||
30518 | { | ||
30519 | find interpretation(problem,interpretation); | ||
30520 | neg find hasElementInContainment(problem,interpretation); | ||
30521 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30522 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnumLiteral class"); | ||
30523 | find mayInstanceOfEEnumLiteral_class(problem,interpretation,newObject); | ||
30524 | find mayExist(problem, interpretation, newObject); | ||
30525 | neg find mustExist(problem, interpretation, newObject); | ||
30526 | } | ||
30527 | pattern createObject_EGenericType_class_by_eGenericSuperTypes_reference_EClass( | ||
30528 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30529 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
30530 | container:DefinedElement) | ||
30531 | { | ||
30532 | find interpretation(problem,interpretation); | ||
30533 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30534 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class"); | ||
30535 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
30536 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eGenericSuperTypes reference EClass"); | ||
30537 | find mustInstanceOfEClass_class(problem,interpretation,container); | ||
30538 | find mayInstanceOfEGenericType_class(problem,interpretation,newObject); | ||
30539 | find mayInRelationeGenericSuperTypes_reference_EClass(problem,interpretation,container,newObject); | ||
30540 | find mustExist(problem, interpretation, container); | ||
30541 | neg find mustExist(problem, interpretation, newObject); | ||
30542 | } | ||
30543 | pattern createObject_EGenericType_class_by_eGenericExceptions_reference_EOperation( | ||
30544 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30545 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
30546 | container:DefinedElement) | ||
30547 | { | ||
30548 | find interpretation(problem,interpretation); | ||
30549 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30550 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class"); | ||
30551 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
30552 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eGenericExceptions reference EOperation"); | ||
30553 | find mustInstanceOfEOperation_class(problem,interpretation,container); | ||
30554 | find mayInstanceOfEGenericType_class(problem,interpretation,newObject); | ||
30555 | find mayInRelationeGenericExceptions_reference_EOperation(problem,interpretation,container,newObject); | ||
30556 | find mustExist(problem, interpretation, container); | ||
30557 | neg find mustExist(problem, interpretation, newObject); | ||
30558 | } | ||
30559 | pattern createObject_EGenericType_class_by_eGenericType_reference_ETypedElement( | ||
30560 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30561 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
30562 | container:DefinedElement) | ||
30563 | { | ||
30564 | find interpretation(problem,interpretation); | ||
30565 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30566 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class"); | ||
30567 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
30568 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eGenericType reference ETypedElement"); | ||
30569 | find mustInstanceOfETypedElement_class(problem,interpretation,container); | ||
30570 | find mayInstanceOfEGenericType_class(problem,interpretation,newObject); | ||
30571 | find mayInRelationeGenericType_reference_ETypedElement(problem,interpretation,container,newObject); | ||
30572 | find mustExist(problem, interpretation, container); | ||
30573 | neg find mustExist(problem, interpretation, newObject); | ||
30574 | } | ||
30575 | pattern createObject_EGenericType_class_by_eUpperBound_reference_EGenericType( | ||
30576 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30577 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
30578 | container:DefinedElement) | ||
30579 | { | ||
30580 | find interpretation(problem,interpretation); | ||
30581 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30582 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class"); | ||
30583 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
30584 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eUpperBound reference EGenericType"); | ||
30585 | find mustInstanceOfEGenericType_class(problem,interpretation,container); | ||
30586 | find mayInstanceOfEGenericType_class(problem,interpretation,newObject); | ||
30587 | find mayInRelationeUpperBound_reference_EGenericType(problem,interpretation,container,newObject); | ||
30588 | find mustExist(problem, interpretation, container); | ||
30589 | neg find mustExist(problem, interpretation, newObject); | ||
30590 | } | ||
30591 | pattern createObject_EGenericType_class_by_eTypeArguments_reference_EGenericType( | ||
30592 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30593 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
30594 | container:DefinedElement) | ||
30595 | { | ||
30596 | find interpretation(problem,interpretation); | ||
30597 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30598 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class"); | ||
30599 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
30600 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eTypeArguments reference EGenericType"); | ||
30601 | find mustInstanceOfEGenericType_class(problem,interpretation,container); | ||
30602 | find mayInstanceOfEGenericType_class(problem,interpretation,newObject); | ||
30603 | find mayInRelationeTypeArguments_reference_EGenericType(problem,interpretation,container,newObject); | ||
30604 | find mustExist(problem, interpretation, container); | ||
30605 | neg find mustExist(problem, interpretation, newObject); | ||
30606 | } | ||
30607 | pattern createObject_EGenericType_class_by_eLowerBound_reference_EGenericType( | ||
30608 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30609 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
30610 | container:DefinedElement) | ||
30611 | { | ||
30612 | find interpretation(problem,interpretation); | ||
30613 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30614 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class"); | ||
30615 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
30616 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eLowerBound reference EGenericType"); | ||
30617 | find mustInstanceOfEGenericType_class(problem,interpretation,container); | ||
30618 | find mayInstanceOfEGenericType_class(problem,interpretation,newObject); | ||
30619 | find mayInRelationeLowerBound_reference_EGenericType(problem,interpretation,container,newObject); | ||
30620 | find mustExist(problem, interpretation, container); | ||
30621 | neg find mustExist(problem, interpretation, newObject); | ||
30622 | } | ||
30623 | pattern createObject_EGenericType_class_by_eBounds_reference_ETypeParameter( | ||
30624 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30625 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
30626 | container:DefinedElement) | ||
30627 | { | ||
30628 | find interpretation(problem,interpretation); | ||
30629 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30630 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class"); | ||
30631 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
30632 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eBounds reference ETypeParameter"); | ||
30633 | find mustInstanceOfETypeParameter_class(problem,interpretation,container); | ||
30634 | find mayInstanceOfEGenericType_class(problem,interpretation,newObject); | ||
30635 | find mayInRelationeBounds_reference_ETypeParameter(problem,interpretation,container,newObject); | ||
30636 | find mustExist(problem, interpretation, container); | ||
30637 | neg find mustExist(problem, interpretation, newObject); | ||
30638 | } | ||
30639 | pattern createObject_EGenericType_class( | ||
30640 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30641 | typeInterpretation:PartialComplexTypeInterpretation) | ||
30642 | { | ||
30643 | find interpretation(problem,interpretation); | ||
30644 | neg find hasElementInContainment(problem,interpretation); | ||
30645 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30646 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class"); | ||
30647 | find mayInstanceOfEGenericType_class(problem,interpretation,newObject); | ||
30648 | find mayExist(problem, interpretation, newObject); | ||
30649 | neg find mustExist(problem, interpretation, newObject); | ||
30650 | } | ||
30651 | pattern createObject_EOperation_class_by_eOperations_reference_EClass_with_eContainingClass_reference_EOperation( | ||
30652 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30653 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
30654 | container:DefinedElement) | ||
30655 | { | ||
30656 | find interpretation(problem,interpretation); | ||
30657 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30658 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EOperation class"); | ||
30659 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
30660 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eOperations reference EClass"); | ||
30661 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
30662 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eContainingClass reference EOperation"); | ||
30663 | find mustInstanceOfEClass_class(problem,interpretation,container); | ||
30664 | find mayInstanceOfEOperation_class(problem,interpretation,newObject); | ||
30665 | find mayInRelationeOperations_reference_EClass(problem,interpretation,container,newObject); | ||
30666 | find mustExist(problem, interpretation, container); | ||
30667 | neg find mustExist(problem, interpretation, newObject); | ||
30668 | } | ||
30669 | pattern createObject_EOperation_class( | ||
30670 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30671 | typeInterpretation:PartialComplexTypeInterpretation) | ||
30672 | { | ||
30673 | find interpretation(problem,interpretation); | ||
30674 | neg find hasElementInContainment(problem,interpretation); | ||
30675 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30676 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EOperation class"); | ||
30677 | find mayInstanceOfEOperation_class(problem,interpretation,newObject); | ||
30678 | find mayExist(problem, interpretation, newObject); | ||
30679 | neg find mustExist(problem, interpretation, newObject); | ||
30680 | } | ||
30681 | pattern createObject_EDataType_class_by_eClassifiers_reference_EPackage_with_ePackage_reference_EClassifier( | ||
30682 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30683 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
30684 | container:DefinedElement) | ||
30685 | { | ||
30686 | find interpretation(problem,interpretation); | ||
30687 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30688 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EDataType class"); | ||
30689 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
30690 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eClassifiers reference EPackage"); | ||
30691 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
30692 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"ePackage reference EClassifier"); | ||
30693 | find mustInstanceOfEPackage_class(problem,interpretation,container); | ||
30694 | find mayInstanceOfEDataType_class(problem,interpretation,newObject); | ||
30695 | find mayInRelationeClassifiers_reference_EPackage(problem,interpretation,container,newObject); | ||
30696 | find mustExist(problem, interpretation, container); | ||
30697 | neg find mustExist(problem, interpretation, newObject); | ||
30698 | } | ||
30699 | pattern createObject_EDataType_class( | ||
30700 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30701 | typeInterpretation:PartialComplexTypeInterpretation) | ||
30702 | { | ||
30703 | find interpretation(problem,interpretation); | ||
30704 | neg find hasElementInContainment(problem,interpretation); | ||
30705 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30706 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EDataType class"); | ||
30707 | find mayInstanceOfEDataType_class(problem,interpretation,newObject); | ||
30708 | find mayExist(problem, interpretation, newObject); | ||
30709 | neg find mustExist(problem, interpretation, newObject); | ||
30710 | } | ||
30711 | pattern createObject_EClass_class_by_eClassifiers_reference_EPackage_with_ePackage_reference_EClassifier( | ||
30712 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30713 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
30714 | container:DefinedElement) | ||
30715 | { | ||
30716 | find interpretation(problem,interpretation); | ||
30717 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30718 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EClass class"); | ||
30719 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
30720 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eClassifiers reference EPackage"); | ||
30721 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
30722 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"ePackage reference EClassifier"); | ||
30723 | find mustInstanceOfEPackage_class(problem,interpretation,container); | ||
30724 | find mayInstanceOfEClass_class(problem,interpretation,newObject); | ||
30725 | find mayInRelationeClassifiers_reference_EPackage(problem,interpretation,container,newObject); | ||
30726 | find mustExist(problem, interpretation, container); | ||
30727 | neg find mustExist(problem, interpretation, newObject); | ||
30728 | } | ||
30729 | pattern createObject_EClass_class( | ||
30730 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30731 | typeInterpretation:PartialComplexTypeInterpretation) | ||
30732 | { | ||
30733 | find interpretation(problem,interpretation); | ||
30734 | neg find hasElementInContainment(problem,interpretation); | ||
30735 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30736 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EClass class"); | ||
30737 | find mayInstanceOfEClass_class(problem,interpretation,newObject); | ||
30738 | find mayExist(problem, interpretation, newObject); | ||
30739 | neg find mustExist(problem, interpretation, newObject); | ||
30740 | } | ||
30741 | pattern createObject_ETypeParameter_class_by_eTypeParameters_reference_EClassifier( | ||
30742 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30743 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
30744 | container:DefinedElement) | ||
30745 | { | ||
30746 | find interpretation(problem,interpretation); | ||
30747 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30748 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"ETypeParameter class"); | ||
30749 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
30750 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eTypeParameters reference EClassifier"); | ||
30751 | find mustInstanceOfEClassifier_class(problem,interpretation,container); | ||
30752 | find mayInstanceOfETypeParameter_class(problem,interpretation,newObject); | ||
30753 | find mayInRelationeTypeParameters_reference_EClassifier(problem,interpretation,container,newObject); | ||
30754 | find mustExist(problem, interpretation, container); | ||
30755 | neg find mustExist(problem, interpretation, newObject); | ||
30756 | } | ||
30757 | pattern createObject_ETypeParameter_class_by_eTypeParameters_reference_EOperation( | ||
30758 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30759 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
30760 | container:DefinedElement) | ||
30761 | { | ||
30762 | find interpretation(problem,interpretation); | ||
30763 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30764 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"ETypeParameter class"); | ||
30765 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
30766 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eTypeParameters reference EOperation"); | ||
30767 | find mustInstanceOfEOperation_class(problem,interpretation,container); | ||
30768 | find mayInstanceOfETypeParameter_class(problem,interpretation,newObject); | ||
30769 | find mayInRelationeTypeParameters_reference_EOperation(problem,interpretation,container,newObject); | ||
30770 | find mustExist(problem, interpretation, container); | ||
30771 | neg find mustExist(problem, interpretation, newObject); | ||
30772 | } | ||
30773 | pattern createObject_ETypeParameter_class( | ||
30774 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30775 | typeInterpretation:PartialComplexTypeInterpretation) | ||
30776 | { | ||
30777 | find interpretation(problem,interpretation); | ||
30778 | neg find hasElementInContainment(problem,interpretation); | ||
30779 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
30780 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"ETypeParameter class"); | ||
30781 | find mayInstanceOfETypeParameter_class(problem,interpretation,newObject); | ||
30782 | find mayExist(problem, interpretation, newObject); | ||
30783 | neg find mustExist(problem, interpretation, newObject); | ||
30784 | } | ||
30785 | |||
30786 | ////////// | ||
30787 | // 4.2 Type refinement | ||
30788 | ////////// | ||
30789 | pattern refineTypeTo_EAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
30790 | find interpretation(problem,interpretation); | ||
30791 | PartialInterpretation.newElements(interpretation,element); | ||
30792 | find mayInstanceOfEAttribute_class(problem,interpretation,element); | ||
30793 | neg find mustInstanceOfEAttribute_class(problem,interpretation,element); | ||
30794 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
30795 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
30796 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
30797 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
30798 | neg find mustInstanceOfEOperation_class(problem,interpretation,element); | ||
30799 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
30800 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
30801 | neg find mustInstanceOfEReference_class(problem,interpretation,element); | ||
30802 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
30803 | neg find mustInstanceOfEParameter_class(problem,interpretation,element); | ||
30804 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
30805 | } | ||
30806 | pattern refineTypeTo_EAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
30807 | find interpretation(problem,interpretation); | ||
30808 | PartialInterpretation.newElements(interpretation,element); | ||
30809 | find mayInstanceOfEAnnotation_class(problem,interpretation,element); | ||
30810 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
30811 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
30812 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
30813 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
30814 | neg find mustInstanceOfENamedElement_class(problem,interpretation,element); | ||
30815 | } | ||
30816 | pattern refineTypeTo_EReference_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
30817 | find interpretation(problem,interpretation); | ||
30818 | PartialInterpretation.newElements(interpretation,element); | ||
30819 | find mayInstanceOfEReference_class(problem,interpretation,element); | ||
30820 | neg find mustInstanceOfEAttribute_class(problem,interpretation,element); | ||
30821 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
30822 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
30823 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
30824 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
30825 | neg find mustInstanceOfEOperation_class(problem,interpretation,element); | ||
30826 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
30827 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
30828 | neg find mustInstanceOfEReference_class(problem,interpretation,element); | ||
30829 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
30830 | neg find mustInstanceOfEParameter_class(problem,interpretation,element); | ||
30831 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
30832 | } | ||
30833 | pattern refineTypeTo_EObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
30834 | find interpretation(problem,interpretation); | ||
30835 | PartialInterpretation.newElements(interpretation,element); | ||
30836 | find mayInstanceOfEObject_class(problem,interpretation,element); | ||
30837 | neg find mustInstanceOfEModelElement_class(problem,interpretation,element); | ||
30838 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
30839 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
30840 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
30841 | } | ||
30842 | pattern refineTypeTo_EParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
30843 | find interpretation(problem,interpretation); | ||
30844 | PartialInterpretation.newElements(interpretation,element); | ||
30845 | find mayInstanceOfEParameter_class(problem,interpretation,element); | ||
30846 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
30847 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
30848 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
30849 | neg find mustInstanceOfEOperation_class(problem,interpretation,element); | ||
30850 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
30851 | neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); | ||
30852 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
30853 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
30854 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
30855 | neg find mustInstanceOfEParameter_class(problem,interpretation,element); | ||
30856 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
30857 | } | ||
30858 | pattern refineTypeTo_EPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
30859 | find interpretation(problem,interpretation); | ||
30860 | PartialInterpretation.newElements(interpretation,element); | ||
30861 | find mayInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element); | ||
30862 | neg find mustInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element); | ||
30863 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
30864 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
30865 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
30866 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
30867 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
30868 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
30869 | neg find mustInstanceOfETypedElement_class(problem,interpretation,element); | ||
30870 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
30871 | } | ||
30872 | pattern refineTypeTo_EStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
30873 | find interpretation(problem,interpretation); | ||
30874 | PartialInterpretation.newElements(interpretation,element); | ||
30875 | find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
30876 | neg find mustInstanceOfEModelElement_class(problem,interpretation,element); | ||
30877 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
30878 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
30879 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
30880 | } | ||
30881 | pattern refineTypeTo_EEnum_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
30882 | find interpretation(problem,interpretation); | ||
30883 | PartialInterpretation.newElements(interpretation,element); | ||
30884 | find mayInstanceOfEEnum_class(problem,interpretation,element); | ||
30885 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
30886 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
30887 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
30888 | neg find mustInstanceOfEEnum_class(problem,interpretation,element); | ||
30889 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
30890 | neg find mustInstanceOfEClass_class(problem,interpretation,element); | ||
30891 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
30892 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
30893 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
30894 | neg find mustInstanceOfETypedElement_class(problem,interpretation,element); | ||
30895 | } | ||
30896 | pattern refineTypeTo_EEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
30897 | find interpretation(problem,interpretation); | ||
30898 | PartialInterpretation.newElements(interpretation,element); | ||
30899 | find mayInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
30900 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
30901 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
30902 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
30903 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
30904 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
30905 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
30906 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
30907 | neg find mustInstanceOfETypedElement_class(problem,interpretation,element); | ||
30908 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
30909 | } | ||
30910 | pattern refineTypeTo_EGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
30911 | find interpretation(problem,interpretation); | ||
30912 | PartialInterpretation.newElements(interpretation,element); | ||
30913 | find mayInstanceOfEGenericType_class(problem,interpretation,element); | ||
30914 | neg find mustInstanceOfEModelElement_class(problem,interpretation,element); | ||
30915 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
30916 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
30917 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
30918 | } | ||
30919 | pattern refineTypeTo_EOperation_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
30920 | find interpretation(problem,interpretation); | ||
30921 | PartialInterpretation.newElements(interpretation,element); | ||
30922 | find mayInstanceOfEOperation_class(problem,interpretation,element); | ||
30923 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
30924 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
30925 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
30926 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
30927 | neg find mustInstanceOfEOperation_class(problem,interpretation,element); | ||
30928 | neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); | ||
30929 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
30930 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
30931 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
30932 | neg find mustInstanceOfEParameter_class(problem,interpretation,element); | ||
30933 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
30934 | } | ||
30935 | pattern refineTypeTo_EDataType_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
30936 | find interpretation(problem,interpretation); | ||
30937 | PartialInterpretation.newElements(interpretation,element); | ||
30938 | find mayInstanceOfEDataType_class(problem,interpretation,element); | ||
30939 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
30940 | neg find mustInstanceOfEEnum_class(problem,interpretation,element); | ||
30941 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
30942 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
30943 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
30944 | neg find mustInstanceOfEDataType_class(problem,interpretation,element); | ||
30945 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
30946 | neg find mustInstanceOfEClass_class(problem,interpretation,element); | ||
30947 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
30948 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
30949 | neg find mustInstanceOfETypedElement_class(problem,interpretation,element); | ||
30950 | } | ||
30951 | pattern refineTypeTo_EClass_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
30952 | find interpretation(problem,interpretation); | ||
30953 | PartialInterpretation.newElements(interpretation,element); | ||
30954 | find mayInstanceOfEClass_class(problem,interpretation,element); | ||
30955 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
30956 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
30957 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
30958 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
30959 | neg find mustInstanceOfEDataType_class(problem,interpretation,element); | ||
30960 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
30961 | neg find mustInstanceOfEClass_class(problem,interpretation,element); | ||
30962 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
30963 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
30964 | neg find mustInstanceOfETypedElement_class(problem,interpretation,element); | ||
30965 | } | ||
30966 | pattern refineTypeTo_ETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
30967 | find interpretation(problem,interpretation); | ||
30968 | PartialInterpretation.newElements(interpretation,element); | ||
30969 | find mayInstanceOfETypeParameter_class(problem,interpretation,element); | ||
30970 | neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); | ||
30971 | neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); | ||
30972 | neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); | ||
30973 | neg find mustInstanceOfEGenericType_class(problem,interpretation,element); | ||
30974 | neg find mustInstanceOfEPackage_class(problem,interpretation,element); | ||
30975 | neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); | ||
30976 | neg find mustInstanceOfEObject_class(problem,interpretation,element); | ||
30977 | neg find mustInstanceOfETypedElement_class(problem,interpretation,element); | ||
30978 | neg find mustInstanceOfEClassifier_class(problem,interpretation,element); | ||
30979 | } | ||
30980 | |||
30981 | ////////// | ||
30982 | // 4.3 Relation refinement | ||
30983 | ////////// | ||
30984 | pattern refineRelation_eAttributeType_reference_EAttribute( | ||
30985 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
30986 | relationIterpretation:PartialRelationInterpretation, | ||
30987 | from: DefinedElement, to: DefinedElement) | ||
30988 | { | ||
30989 | find interpretation(problem,interpretation); | ||
30990 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
30991 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributeType reference EAttribute"); | ||
30992 | find mustExist(problem, interpretation, from); | ||
30993 | find mustExist(problem, interpretation, to); | ||
30994 | find mustInstanceOfEAttribute_class(problem,interpretation,from); | ||
30995 | find mustInstanceOfEDataType_class(problem,interpretation,to); | ||
30996 | find mayInRelationeAttributeType_reference_EAttribute(problem,interpretation,from,to); | ||
30997 | neg find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,from,to); | ||
30998 | } | ||
30999 | pattern refineRelation_references_reference_EAnnotation( | ||
31000 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31001 | relationIterpretation:PartialRelationInterpretation, | ||
31002 | from: DefinedElement, to: DefinedElement) | ||
31003 | { | ||
31004 | find interpretation(problem,interpretation); | ||
31005 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31006 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"references reference EAnnotation"); | ||
31007 | find mustExist(problem, interpretation, from); | ||
31008 | find mustExist(problem, interpretation, to); | ||
31009 | find mustInstanceOfEAnnotation_class(problem,interpretation,from); | ||
31010 | find mustInstanceOfEObject_class(problem,interpretation,to); | ||
31011 | find mayInRelationreferences_reference_EAnnotation(problem,interpretation,from,to); | ||
31012 | neg find mustInRelationreferences_reference_EAnnotation(problem,interpretation,from,to); | ||
31013 | } | ||
31014 | pattern refineRelation_eSuperTypes_reference_EClass( | ||
31015 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31016 | relationIterpretation:PartialRelationInterpretation, | ||
31017 | from: DefinedElement, to: DefinedElement) | ||
31018 | { | ||
31019 | find interpretation(problem,interpretation); | ||
31020 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31021 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSuperTypes reference EClass"); | ||
31022 | find mustExist(problem, interpretation, from); | ||
31023 | find mustExist(problem, interpretation, to); | ||
31024 | find mustInstanceOfEClass_class(problem,interpretation,from); | ||
31025 | find mustInstanceOfEClass_class(problem,interpretation,to); | ||
31026 | find mayInRelationeSuperTypes_reference_EClass(problem,interpretation,from,to); | ||
31027 | neg find mustInRelationeSuperTypes_reference_EClass(problem,interpretation,from,to); | ||
31028 | } | ||
31029 | pattern refineRelation_eAllAttributes_reference_EClass( | ||
31030 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31031 | relationIterpretation:PartialRelationInterpretation, | ||
31032 | from: DefinedElement, to: DefinedElement) | ||
31033 | { | ||
31034 | find interpretation(problem,interpretation); | ||
31035 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31036 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllAttributes reference EClass"); | ||
31037 | find mustExist(problem, interpretation, from); | ||
31038 | find mustExist(problem, interpretation, to); | ||
31039 | find mustInstanceOfEClass_class(problem,interpretation,from); | ||
31040 | find mustInstanceOfEAttribute_class(problem,interpretation,to); | ||
31041 | find mayInRelationeAllAttributes_reference_EClass(problem,interpretation,from,to); | ||
31042 | neg find mustInRelationeAllAttributes_reference_EClass(problem,interpretation,from,to); | ||
31043 | } | ||
31044 | pattern refineRelation_eAllReferences_reference_EClass( | ||
31045 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31046 | relationIterpretation:PartialRelationInterpretation, | ||
31047 | from: DefinedElement, to: DefinedElement) | ||
31048 | { | ||
31049 | find interpretation(problem,interpretation); | ||
31050 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31051 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllReferences reference EClass"); | ||
31052 | find mustExist(problem, interpretation, from); | ||
31053 | find mustExist(problem, interpretation, to); | ||
31054 | find mustInstanceOfEClass_class(problem,interpretation,from); | ||
31055 | find mustInstanceOfEReference_class(problem,interpretation,to); | ||
31056 | find mayInRelationeAllReferences_reference_EClass(problem,interpretation,from,to); | ||
31057 | neg find mustInRelationeAllReferences_reference_EClass(problem,interpretation,from,to); | ||
31058 | } | ||
31059 | pattern refineRelation_eReferences_reference_EClass( | ||
31060 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31061 | relationIterpretation:PartialRelationInterpretation, | ||
31062 | from: DefinedElement, to: DefinedElement) | ||
31063 | { | ||
31064 | find interpretation(problem,interpretation); | ||
31065 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31066 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferences reference EClass"); | ||
31067 | find mustExist(problem, interpretation, from); | ||
31068 | find mustExist(problem, interpretation, to); | ||
31069 | find mustInstanceOfEClass_class(problem,interpretation,from); | ||
31070 | find mustInstanceOfEReference_class(problem,interpretation,to); | ||
31071 | find mayInRelationeReferences_reference_EClass(problem,interpretation,from,to); | ||
31072 | neg find mustInRelationeReferences_reference_EClass(problem,interpretation,from,to); | ||
31073 | } | ||
31074 | pattern refineRelation_eAttributes_reference_EClass( | ||
31075 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31076 | relationIterpretation:PartialRelationInterpretation, | ||
31077 | from: DefinedElement, to: DefinedElement) | ||
31078 | { | ||
31079 | find interpretation(problem,interpretation); | ||
31080 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31081 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributes reference EClass"); | ||
31082 | find mustExist(problem, interpretation, from); | ||
31083 | find mustExist(problem, interpretation, to); | ||
31084 | find mustInstanceOfEClass_class(problem,interpretation,from); | ||
31085 | find mustInstanceOfEAttribute_class(problem,interpretation,to); | ||
31086 | find mayInRelationeAttributes_reference_EClass(problem,interpretation,from,to); | ||
31087 | neg find mustInRelationeAttributes_reference_EClass(problem,interpretation,from,to); | ||
31088 | } | ||
31089 | pattern refineRelation_eAllContainments_reference_EClass( | ||
31090 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31091 | relationIterpretation:PartialRelationInterpretation, | ||
31092 | from: DefinedElement, to: DefinedElement) | ||
31093 | { | ||
31094 | find interpretation(problem,interpretation); | ||
31095 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31096 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllContainments reference EClass"); | ||
31097 | find mustExist(problem, interpretation, from); | ||
31098 | find mustExist(problem, interpretation, to); | ||
31099 | find mustInstanceOfEClass_class(problem,interpretation,from); | ||
31100 | find mustInstanceOfEReference_class(problem,interpretation,to); | ||
31101 | find mayInRelationeAllContainments_reference_EClass(problem,interpretation,from,to); | ||
31102 | neg find mustInRelationeAllContainments_reference_EClass(problem,interpretation,from,to); | ||
31103 | } | ||
31104 | pattern refineRelation_eAllOperations_reference_EClass( | ||
31105 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31106 | relationIterpretation:PartialRelationInterpretation, | ||
31107 | from: DefinedElement, to: DefinedElement) | ||
31108 | { | ||
31109 | find interpretation(problem,interpretation); | ||
31110 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31111 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllOperations reference EClass"); | ||
31112 | find mustExist(problem, interpretation, from); | ||
31113 | find mustExist(problem, interpretation, to); | ||
31114 | find mustInstanceOfEClass_class(problem,interpretation,from); | ||
31115 | find mustInstanceOfEOperation_class(problem,interpretation,to); | ||
31116 | find mayInRelationeAllOperations_reference_EClass(problem,interpretation,from,to); | ||
31117 | neg find mustInRelationeAllOperations_reference_EClass(problem,interpretation,from,to); | ||
31118 | } | ||
31119 | pattern refineRelation_eAllStructuralFeatures_reference_EClass( | ||
31120 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31121 | relationIterpretation:PartialRelationInterpretation, | ||
31122 | from: DefinedElement, to: DefinedElement) | ||
31123 | { | ||
31124 | find interpretation(problem,interpretation); | ||
31125 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31126 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllStructuralFeatures reference EClass"); | ||
31127 | find mustExist(problem, interpretation, from); | ||
31128 | find mustExist(problem, interpretation, to); | ||
31129 | find mustInstanceOfEClass_class(problem,interpretation,from); | ||
31130 | find mustInstanceOfEStructuralFeature_class(problem,interpretation,to); | ||
31131 | find mayInRelationeAllStructuralFeatures_reference_EClass(problem,interpretation,from,to); | ||
31132 | neg find mustInRelationeAllStructuralFeatures_reference_EClass(problem,interpretation,from,to); | ||
31133 | } | ||
31134 | pattern refineRelation_eAllSuperTypes_reference_EClass( | ||
31135 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31136 | relationIterpretation:PartialRelationInterpretation, | ||
31137 | from: DefinedElement, to: DefinedElement) | ||
31138 | { | ||
31139 | find interpretation(problem,interpretation); | ||
31140 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31141 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllSuperTypes reference EClass"); | ||
31142 | find mustExist(problem, interpretation, from); | ||
31143 | find mustExist(problem, interpretation, to); | ||
31144 | find mustInstanceOfEClass_class(problem,interpretation,from); | ||
31145 | find mustInstanceOfEClass_class(problem,interpretation,to); | ||
31146 | find mayInRelationeAllSuperTypes_reference_EClass(problem,interpretation,from,to); | ||
31147 | neg find mustInRelationeAllSuperTypes_reference_EClass(problem,interpretation,from,to); | ||
31148 | } | ||
31149 | pattern refineRelation_eIDAttribute_reference_EClass( | ||
31150 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31151 | relationIterpretation:PartialRelationInterpretation, | ||
31152 | from: DefinedElement, to: DefinedElement) | ||
31153 | { | ||
31154 | find interpretation(problem,interpretation); | ||
31155 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31156 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eIDAttribute reference EClass"); | ||
31157 | find mustExist(problem, interpretation, from); | ||
31158 | find mustExist(problem, interpretation, to); | ||
31159 | find mustInstanceOfEClass_class(problem,interpretation,from); | ||
31160 | find mustInstanceOfEAttribute_class(problem,interpretation,to); | ||
31161 | find mayInRelationeIDAttribute_reference_EClass(problem,interpretation,from,to); | ||
31162 | neg find mustInRelationeIDAttribute_reference_EClass(problem,interpretation,from,to); | ||
31163 | } | ||
31164 | pattern refineRelation_eAllGenericSuperTypes_reference_EClass( | ||
31165 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31166 | relationIterpretation:PartialRelationInterpretation, | ||
31167 | from: DefinedElement, to: DefinedElement) | ||
31168 | { | ||
31169 | find interpretation(problem,interpretation); | ||
31170 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31171 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllGenericSuperTypes reference EClass"); | ||
31172 | find mustExist(problem, interpretation, from); | ||
31173 | find mustExist(problem, interpretation, to); | ||
31174 | find mustInstanceOfEClass_class(problem,interpretation,from); | ||
31175 | find mustInstanceOfEGenericType_class(problem,interpretation,to); | ||
31176 | find mayInRelationeAllGenericSuperTypes_reference_EClass(problem,interpretation,from,to); | ||
31177 | neg find mustInRelationeAllGenericSuperTypes_reference_EClass(problem,interpretation,from,to); | ||
31178 | } | ||
31179 | pattern refineRelation_eExceptions_reference_EOperation( | ||
31180 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31181 | relationIterpretation:PartialRelationInterpretation, | ||
31182 | from: DefinedElement, to: DefinedElement) | ||
31183 | { | ||
31184 | find interpretation(problem,interpretation); | ||
31185 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31186 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eExceptions reference EOperation"); | ||
31187 | find mustExist(problem, interpretation, from); | ||
31188 | find mustExist(problem, interpretation, to); | ||
31189 | find mustInstanceOfEOperation_class(problem,interpretation,from); | ||
31190 | find mustInstanceOfEClassifier_class(problem,interpretation,to); | ||
31191 | find mayInRelationeExceptions_reference_EOperation(problem,interpretation,from,to); | ||
31192 | neg find mustInRelationeExceptions_reference_EOperation(problem,interpretation,from,to); | ||
31193 | } | ||
31194 | pattern refineRelation_eOpposite_reference_EReference( | ||
31195 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31196 | relationIterpretation:PartialRelationInterpretation, | ||
31197 | from: DefinedElement, to: DefinedElement) | ||
31198 | { | ||
31199 | find interpretation(problem,interpretation); | ||
31200 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31201 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOpposite reference EReference"); | ||
31202 | find mustExist(problem, interpretation, from); | ||
31203 | find mustExist(problem, interpretation, to); | ||
31204 | find mustInstanceOfEReference_class(problem,interpretation,from); | ||
31205 | find mustInstanceOfEReference_class(problem,interpretation,to); | ||
31206 | find mayInRelationeOpposite_reference_EReference(problem,interpretation,from,to); | ||
31207 | neg find mustInRelationeOpposite_reference_EReference(problem,interpretation,from,to); | ||
31208 | } | ||
31209 | pattern refineRelation_eReferenceType_reference_EReference( | ||
31210 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31211 | relationIterpretation:PartialRelationInterpretation, | ||
31212 | from: DefinedElement, to: DefinedElement) | ||
31213 | { | ||
31214 | find interpretation(problem,interpretation); | ||
31215 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31216 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferenceType reference EReference"); | ||
31217 | find mustExist(problem, interpretation, from); | ||
31218 | find mustExist(problem, interpretation, to); | ||
31219 | find mustInstanceOfEReference_class(problem,interpretation,from); | ||
31220 | find mustInstanceOfEClass_class(problem,interpretation,to); | ||
31221 | find mayInRelationeReferenceType_reference_EReference(problem,interpretation,from,to); | ||
31222 | neg find mustInRelationeReferenceType_reference_EReference(problem,interpretation,from,to); | ||
31223 | } | ||
31224 | pattern refineRelation_eKeys_reference_EReference( | ||
31225 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31226 | relationIterpretation:PartialRelationInterpretation, | ||
31227 | from: DefinedElement, to: DefinedElement) | ||
31228 | { | ||
31229 | find interpretation(problem,interpretation); | ||
31230 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31231 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eKeys reference EReference"); | ||
31232 | find mustExist(problem, interpretation, from); | ||
31233 | find mustExist(problem, interpretation, to); | ||
31234 | find mustInstanceOfEReference_class(problem,interpretation,from); | ||
31235 | find mustInstanceOfEAttribute_class(problem,interpretation,to); | ||
31236 | find mayInRelationeKeys_reference_EReference(problem,interpretation,from,to); | ||
31237 | neg find mustInRelationeKeys_reference_EReference(problem,interpretation,from,to); | ||
31238 | } | ||
31239 | pattern refineRelation_eType_reference_ETypedElement( | ||
31240 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31241 | relationIterpretation:PartialRelationInterpretation, | ||
31242 | from: DefinedElement, to: DefinedElement) | ||
31243 | { | ||
31244 | find interpretation(problem,interpretation); | ||
31245 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31246 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eType reference ETypedElement"); | ||
31247 | find mustExist(problem, interpretation, from); | ||
31248 | find mustExist(problem, interpretation, to); | ||
31249 | find mustInstanceOfETypedElement_class(problem,interpretation,from); | ||
31250 | find mustInstanceOfEClassifier_class(problem,interpretation,to); | ||
31251 | find mayInRelationeType_reference_ETypedElement(problem,interpretation,from,to); | ||
31252 | neg find mustInRelationeType_reference_ETypedElement(problem,interpretation,from,to); | ||
31253 | } | ||
31254 | pattern refineRelation_eRawType_reference_EGenericType( | ||
31255 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31256 | relationIterpretation:PartialRelationInterpretation, | ||
31257 | from: DefinedElement, to: DefinedElement) | ||
31258 | { | ||
31259 | find interpretation(problem,interpretation); | ||
31260 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31261 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eRawType reference EGenericType"); | ||
31262 | find mustExist(problem, interpretation, from); | ||
31263 | find mustExist(problem, interpretation, to); | ||
31264 | find mustInstanceOfEGenericType_class(problem,interpretation,from); | ||
31265 | find mustInstanceOfEClassifier_class(problem,interpretation,to); | ||
31266 | find mayInRelationeRawType_reference_EGenericType(problem,interpretation,from,to); | ||
31267 | neg find mustInRelationeRawType_reference_EGenericType(problem,interpretation,from,to); | ||
31268 | } | ||
31269 | pattern refineRelation_eTypeParameter_reference_EGenericType( | ||
31270 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31271 | relationIterpretation:PartialRelationInterpretation, | ||
31272 | from: DefinedElement, to: DefinedElement) | ||
31273 | { | ||
31274 | find interpretation(problem,interpretation); | ||
31275 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31276 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameter reference EGenericType"); | ||
31277 | find mustExist(problem, interpretation, from); | ||
31278 | find mustExist(problem, interpretation, to); | ||
31279 | find mustInstanceOfEGenericType_class(problem,interpretation,from); | ||
31280 | find mustInstanceOfETypeParameter_class(problem,interpretation,to); | ||
31281 | find mayInRelationeTypeParameter_reference_EGenericType(problem,interpretation,from,to); | ||
31282 | neg find mustInRelationeTypeParameter_reference_EGenericType(problem,interpretation,from,to); | ||
31283 | } | ||
31284 | pattern refineRelation_eClassifier_reference_EGenericType( | ||
31285 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31286 | relationIterpretation:PartialRelationInterpretation, | ||
31287 | from: DefinedElement, to: DefinedElement) | ||
31288 | { | ||
31289 | find interpretation(problem,interpretation); | ||
31290 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31291 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eClassifier reference EGenericType"); | ||
31292 | find mustExist(problem, interpretation, from); | ||
31293 | find mustExist(problem, interpretation, to); | ||
31294 | find mustInstanceOfEGenericType_class(problem,interpretation,from); | ||
31295 | find mustInstanceOfEClassifier_class(problem,interpretation,to); | ||
31296 | find mayInRelationeClassifier_reference_EGenericType(problem,interpretation,from,to); | ||
31297 | neg find mustInRelationeClassifier_reference_EGenericType(problem,interpretation,from,to); | ||
31298 | } | ||
31299 | pattern refineRelation_iD_attribute_EAttribute( | ||
31300 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31301 | relationIterpretation:PartialRelationInterpretation, | ||
31302 | from: DefinedElement, to: DefinedElement) | ||
31303 | { | ||
31304 | find interpretation(problem,interpretation); | ||
31305 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31306 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"iD attribute EAttribute"); | ||
31307 | find mustExist(problem, interpretation, from); | ||
31308 | find mustExist(problem, interpretation, to); | ||
31309 | find mustInstanceOfEAttribute_class(problem,interpretation,from); | ||
31310 | BooleanElement(to); | ||
31311 | find mayInRelationiD_attribute_EAttribute(problem,interpretation,from,to); | ||
31312 | neg find mustInRelationiD_attribute_EAttribute(problem,interpretation,from,to); | ||
31313 | } | ||
31314 | pattern refineRelation_source_attribute_EAnnotation( | ||
31315 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31316 | relationIterpretation:PartialRelationInterpretation, | ||
31317 | from: DefinedElement, to: DefinedElement) | ||
31318 | { | ||
31319 | find interpretation(problem,interpretation); | ||
31320 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31321 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source attribute EAnnotation"); | ||
31322 | find mustExist(problem, interpretation, from); | ||
31323 | find mustExist(problem, interpretation, to); | ||
31324 | find mustInstanceOfEAnnotation_class(problem,interpretation,from); | ||
31325 | StringElement(to); | ||
31326 | find mayInRelationsource_attribute_EAnnotation(problem,interpretation,from,to); | ||
31327 | neg find mustInRelationsource_attribute_EAnnotation(problem,interpretation,from,to); | ||
31328 | } | ||
31329 | pattern refineRelation_abstract_attribute_EClass( | ||
31330 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31331 | relationIterpretation:PartialRelationInterpretation, | ||
31332 | from: DefinedElement, to: DefinedElement) | ||
31333 | { | ||
31334 | find interpretation(problem,interpretation); | ||
31335 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31336 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"abstract attribute EClass"); | ||
31337 | find mustExist(problem, interpretation, from); | ||
31338 | find mustExist(problem, interpretation, to); | ||
31339 | find mustInstanceOfEClass_class(problem,interpretation,from); | ||
31340 | BooleanElement(to); | ||
31341 | find mayInRelationabstract_attribute_EClass(problem,interpretation,from,to); | ||
31342 | neg find mustInRelationabstract_attribute_EClass(problem,interpretation,from,to); | ||
31343 | } | ||
31344 | pattern refineRelation_interface_attribute_EClass( | ||
31345 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31346 | relationIterpretation:PartialRelationInterpretation, | ||
31347 | from: DefinedElement, to: DefinedElement) | ||
31348 | { | ||
31349 | find interpretation(problem,interpretation); | ||
31350 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31351 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface attribute EClass"); | ||
31352 | find mustExist(problem, interpretation, from); | ||
31353 | find mustExist(problem, interpretation, to); | ||
31354 | find mustInstanceOfEClass_class(problem,interpretation,from); | ||
31355 | BooleanElement(to); | ||
31356 | find mayInRelationinterface_attribute_EClass(problem,interpretation,from,to); | ||
31357 | neg find mustInRelationinterface_attribute_EClass(problem,interpretation,from,to); | ||
31358 | } | ||
31359 | pattern refineRelation_instanceClassName_attribute_EClassifier( | ||
31360 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31361 | relationIterpretation:PartialRelationInterpretation, | ||
31362 | from: DefinedElement, to: DefinedElement) | ||
31363 | { | ||
31364 | find interpretation(problem,interpretation); | ||
31365 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31366 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceClassName attribute EClassifier"); | ||
31367 | find mustExist(problem, interpretation, from); | ||
31368 | find mustExist(problem, interpretation, to); | ||
31369 | find mustInstanceOfEClassifier_class(problem,interpretation,from); | ||
31370 | StringElement(to); | ||
31371 | find mayInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,from,to); | ||
31372 | neg find mustInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,from,to); | ||
31373 | } | ||
31374 | pattern refineRelation_instanceTypeName_attribute_EClassifier( | ||
31375 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31376 | relationIterpretation:PartialRelationInterpretation, | ||
31377 | from: DefinedElement, to: DefinedElement) | ||
31378 | { | ||
31379 | find interpretation(problem,interpretation); | ||
31380 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31381 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceTypeName attribute EClassifier"); | ||
31382 | find mustExist(problem, interpretation, from); | ||
31383 | find mustExist(problem, interpretation, to); | ||
31384 | find mustInstanceOfEClassifier_class(problem,interpretation,from); | ||
31385 | StringElement(to); | ||
31386 | find mayInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,from,to); | ||
31387 | neg find mustInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,from,to); | ||
31388 | } | ||
31389 | pattern refineRelation_serializable_attribute_EDataType( | ||
31390 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31391 | relationIterpretation:PartialRelationInterpretation, | ||
31392 | from: DefinedElement, to: DefinedElement) | ||
31393 | { | ||
31394 | find interpretation(problem,interpretation); | ||
31395 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31396 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"serializable attribute EDataType"); | ||
31397 | find mustExist(problem, interpretation, from); | ||
31398 | find mustExist(problem, interpretation, to); | ||
31399 | find mustInstanceOfEDataType_class(problem,interpretation,from); | ||
31400 | BooleanElement(to); | ||
31401 | find mayInRelationserializable_attribute_EDataType(problem,interpretation,from,to); | ||
31402 | neg find mustInRelationserializable_attribute_EDataType(problem,interpretation,from,to); | ||
31403 | } | ||
31404 | pattern refineRelation_value_attribute_EEnumLiteral( | ||
31405 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31406 | relationIterpretation:PartialRelationInterpretation, | ||
31407 | from: DefinedElement, to: DefinedElement) | ||
31408 | { | ||
31409 | find interpretation(problem,interpretation); | ||
31410 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31411 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EEnumLiteral"); | ||
31412 | find mustExist(problem, interpretation, from); | ||
31413 | find mustExist(problem, interpretation, to); | ||
31414 | find mustInstanceOfEEnumLiteral_class(problem,interpretation,from); | ||
31415 | IntegerElement(to); | ||
31416 | find mayInRelationvalue_attribute_EEnumLiteral(problem,interpretation,from,to); | ||
31417 | neg find mustInRelationvalue_attribute_EEnumLiteral(problem,interpretation,from,to); | ||
31418 | } | ||
31419 | pattern refineRelation_literal_attribute_EEnumLiteral( | ||
31420 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31421 | relationIterpretation:PartialRelationInterpretation, | ||
31422 | from: DefinedElement, to: DefinedElement) | ||
31423 | { | ||
31424 | find interpretation(problem,interpretation); | ||
31425 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31426 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"literal attribute EEnumLiteral"); | ||
31427 | find mustExist(problem, interpretation, from); | ||
31428 | find mustExist(problem, interpretation, to); | ||
31429 | find mustInstanceOfEEnumLiteral_class(problem,interpretation,from); | ||
31430 | StringElement(to); | ||
31431 | find mayInRelationliteral_attribute_EEnumLiteral(problem,interpretation,from,to); | ||
31432 | neg find mustInRelationliteral_attribute_EEnumLiteral(problem,interpretation,from,to); | ||
31433 | } | ||
31434 | pattern refineRelation_name_attribute_ENamedElement( | ||
31435 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31436 | relationIterpretation:PartialRelationInterpretation, | ||
31437 | from: DefinedElement, to: DefinedElement) | ||
31438 | { | ||
31439 | find interpretation(problem,interpretation); | ||
31440 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31441 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"name attribute ENamedElement"); | ||
31442 | find mustExist(problem, interpretation, from); | ||
31443 | find mustExist(problem, interpretation, to); | ||
31444 | find mustInstanceOfENamedElement_class(problem,interpretation,from); | ||
31445 | StringElement(to); | ||
31446 | find mayInRelationname_attribute_ENamedElement(problem,interpretation,from,to); | ||
31447 | neg find mustInRelationname_attribute_ENamedElement(problem,interpretation,from,to); | ||
31448 | } | ||
31449 | pattern refineRelation_nsURI_attribute_EPackage( | ||
31450 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31451 | relationIterpretation:PartialRelationInterpretation, | ||
31452 | from: DefinedElement, to: DefinedElement) | ||
31453 | { | ||
31454 | find interpretation(problem,interpretation); | ||
31455 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31456 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsURI attribute EPackage"); | ||
31457 | find mustExist(problem, interpretation, from); | ||
31458 | find mustExist(problem, interpretation, to); | ||
31459 | find mustInstanceOfEPackage_class(problem,interpretation,from); | ||
31460 | StringElement(to); | ||
31461 | find mayInRelationnsURI_attribute_EPackage(problem,interpretation,from,to); | ||
31462 | neg find mustInRelationnsURI_attribute_EPackage(problem,interpretation,from,to); | ||
31463 | } | ||
31464 | pattern refineRelation_nsPrefix_attribute_EPackage( | ||
31465 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31466 | relationIterpretation:PartialRelationInterpretation, | ||
31467 | from: DefinedElement, to: DefinedElement) | ||
31468 | { | ||
31469 | find interpretation(problem,interpretation); | ||
31470 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31471 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsPrefix attribute EPackage"); | ||
31472 | find mustExist(problem, interpretation, from); | ||
31473 | find mustExist(problem, interpretation, to); | ||
31474 | find mustInstanceOfEPackage_class(problem,interpretation,from); | ||
31475 | StringElement(to); | ||
31476 | find mayInRelationnsPrefix_attribute_EPackage(problem,interpretation,from,to); | ||
31477 | neg find mustInRelationnsPrefix_attribute_EPackage(problem,interpretation,from,to); | ||
31478 | } | ||
31479 | pattern refineRelation_containment_attribute_EReference( | ||
31480 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31481 | relationIterpretation:PartialRelationInterpretation, | ||
31482 | from: DefinedElement, to: DefinedElement) | ||
31483 | { | ||
31484 | find interpretation(problem,interpretation); | ||
31485 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31486 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"containment attribute EReference"); | ||
31487 | find mustExist(problem, interpretation, from); | ||
31488 | find mustExist(problem, interpretation, to); | ||
31489 | find mustInstanceOfEReference_class(problem,interpretation,from); | ||
31490 | BooleanElement(to); | ||
31491 | find mayInRelationcontainment_attribute_EReference(problem,interpretation,from,to); | ||
31492 | neg find mustInRelationcontainment_attribute_EReference(problem,interpretation,from,to); | ||
31493 | } | ||
31494 | pattern refineRelation_container_attribute_EReference( | ||
31495 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31496 | relationIterpretation:PartialRelationInterpretation, | ||
31497 | from: DefinedElement, to: DefinedElement) | ||
31498 | { | ||
31499 | find interpretation(problem,interpretation); | ||
31500 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31501 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"container attribute EReference"); | ||
31502 | find mustExist(problem, interpretation, from); | ||
31503 | find mustExist(problem, interpretation, to); | ||
31504 | find mustInstanceOfEReference_class(problem,interpretation,from); | ||
31505 | BooleanElement(to); | ||
31506 | find mayInRelationcontainer_attribute_EReference(problem,interpretation,from,to); | ||
31507 | neg find mustInRelationcontainer_attribute_EReference(problem,interpretation,from,to); | ||
31508 | } | ||
31509 | pattern refineRelation_resolveProxies_attribute_EReference( | ||
31510 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31511 | relationIterpretation:PartialRelationInterpretation, | ||
31512 | from: DefinedElement, to: DefinedElement) | ||
31513 | { | ||
31514 | find interpretation(problem,interpretation); | ||
31515 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31516 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"resolveProxies attribute EReference"); | ||
31517 | find mustExist(problem, interpretation, from); | ||
31518 | find mustExist(problem, interpretation, to); | ||
31519 | find mustInstanceOfEReference_class(problem,interpretation,from); | ||
31520 | BooleanElement(to); | ||
31521 | find mayInRelationresolveProxies_attribute_EReference(problem,interpretation,from,to); | ||
31522 | neg find mustInRelationresolveProxies_attribute_EReference(problem,interpretation,from,to); | ||
31523 | } | ||
31524 | pattern refineRelation_changeable_attribute_EStructuralFeature( | ||
31525 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31526 | relationIterpretation:PartialRelationInterpretation, | ||
31527 | from: DefinedElement, to: DefinedElement) | ||
31528 | { | ||
31529 | find interpretation(problem,interpretation); | ||
31530 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31531 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"changeable attribute EStructuralFeature"); | ||
31532 | find mustExist(problem, interpretation, from); | ||
31533 | find mustExist(problem, interpretation, to); | ||
31534 | find mustInstanceOfEStructuralFeature_class(problem,interpretation,from); | ||
31535 | BooleanElement(to); | ||
31536 | find mayInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,from,to); | ||
31537 | neg find mustInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,from,to); | ||
31538 | } | ||
31539 | pattern refineRelation_volatile_attribute_EStructuralFeature( | ||
31540 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31541 | relationIterpretation:PartialRelationInterpretation, | ||
31542 | from: DefinedElement, to: DefinedElement) | ||
31543 | { | ||
31544 | find interpretation(problem,interpretation); | ||
31545 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31546 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"volatile attribute EStructuralFeature"); | ||
31547 | find mustExist(problem, interpretation, from); | ||
31548 | find mustExist(problem, interpretation, to); | ||
31549 | find mustInstanceOfEStructuralFeature_class(problem,interpretation,from); | ||
31550 | BooleanElement(to); | ||
31551 | find mayInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,from,to); | ||
31552 | neg find mustInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,from,to); | ||
31553 | } | ||
31554 | pattern refineRelation_transient_attribute_EStructuralFeature( | ||
31555 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31556 | relationIterpretation:PartialRelationInterpretation, | ||
31557 | from: DefinedElement, to: DefinedElement) | ||
31558 | { | ||
31559 | find interpretation(problem,interpretation); | ||
31560 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31561 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"transient attribute EStructuralFeature"); | ||
31562 | find mustExist(problem, interpretation, from); | ||
31563 | find mustExist(problem, interpretation, to); | ||
31564 | find mustInstanceOfEStructuralFeature_class(problem,interpretation,from); | ||
31565 | BooleanElement(to); | ||
31566 | find mayInRelationtransient_attribute_EStructuralFeature(problem,interpretation,from,to); | ||
31567 | neg find mustInRelationtransient_attribute_EStructuralFeature(problem,interpretation,from,to); | ||
31568 | } | ||
31569 | pattern refineRelation_defaultValueLiteral_attribute_EStructuralFeature( | ||
31570 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31571 | relationIterpretation:PartialRelationInterpretation, | ||
31572 | from: DefinedElement, to: DefinedElement) | ||
31573 | { | ||
31574 | find interpretation(problem,interpretation); | ||
31575 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31576 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"defaultValueLiteral attribute EStructuralFeature"); | ||
31577 | find mustExist(problem, interpretation, from); | ||
31578 | find mustExist(problem, interpretation, to); | ||
31579 | find mustInstanceOfEStructuralFeature_class(problem,interpretation,from); | ||
31580 | StringElement(to); | ||
31581 | find mayInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,from,to); | ||
31582 | neg find mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,from,to); | ||
31583 | } | ||
31584 | pattern refineRelation_unsettable_attribute_EStructuralFeature( | ||
31585 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31586 | relationIterpretation:PartialRelationInterpretation, | ||
31587 | from: DefinedElement, to: DefinedElement) | ||
31588 | { | ||
31589 | find interpretation(problem,interpretation); | ||
31590 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31591 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unsettable attribute EStructuralFeature"); | ||
31592 | find mustExist(problem, interpretation, from); | ||
31593 | find mustExist(problem, interpretation, to); | ||
31594 | find mustInstanceOfEStructuralFeature_class(problem,interpretation,from); | ||
31595 | BooleanElement(to); | ||
31596 | find mayInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,from,to); | ||
31597 | neg find mustInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,from,to); | ||
31598 | } | ||
31599 | pattern refineRelation_derived_attribute_EStructuralFeature( | ||
31600 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31601 | relationIterpretation:PartialRelationInterpretation, | ||
31602 | from: DefinedElement, to: DefinedElement) | ||
31603 | { | ||
31604 | find interpretation(problem,interpretation); | ||
31605 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31606 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"derived attribute EStructuralFeature"); | ||
31607 | find mustExist(problem, interpretation, from); | ||
31608 | find mustExist(problem, interpretation, to); | ||
31609 | find mustInstanceOfEStructuralFeature_class(problem,interpretation,from); | ||
31610 | BooleanElement(to); | ||
31611 | find mayInRelationderived_attribute_EStructuralFeature(problem,interpretation,from,to); | ||
31612 | neg find mustInRelationderived_attribute_EStructuralFeature(problem,interpretation,from,to); | ||
31613 | } | ||
31614 | pattern refineRelation_ordered_attribute_ETypedElement( | ||
31615 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31616 | relationIterpretation:PartialRelationInterpretation, | ||
31617 | from: DefinedElement, to: DefinedElement) | ||
31618 | { | ||
31619 | find interpretation(problem,interpretation); | ||
31620 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31621 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"ordered attribute ETypedElement"); | ||
31622 | find mustExist(problem, interpretation, from); | ||
31623 | find mustExist(problem, interpretation, to); | ||
31624 | find mustInstanceOfETypedElement_class(problem,interpretation,from); | ||
31625 | BooleanElement(to); | ||
31626 | find mayInRelationordered_attribute_ETypedElement(problem,interpretation,from,to); | ||
31627 | neg find mustInRelationordered_attribute_ETypedElement(problem,interpretation,from,to); | ||
31628 | } | ||
31629 | pattern refineRelation_unique_attribute_ETypedElement( | ||
31630 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31631 | relationIterpretation:PartialRelationInterpretation, | ||
31632 | from: DefinedElement, to: DefinedElement) | ||
31633 | { | ||
31634 | find interpretation(problem,interpretation); | ||
31635 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31636 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unique attribute ETypedElement"); | ||
31637 | find mustExist(problem, interpretation, from); | ||
31638 | find mustExist(problem, interpretation, to); | ||
31639 | find mustInstanceOfETypedElement_class(problem,interpretation,from); | ||
31640 | BooleanElement(to); | ||
31641 | find mayInRelationunique_attribute_ETypedElement(problem,interpretation,from,to); | ||
31642 | neg find mustInRelationunique_attribute_ETypedElement(problem,interpretation,from,to); | ||
31643 | } | ||
31644 | pattern refineRelation_lowerBound_attribute_ETypedElement( | ||
31645 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31646 | relationIterpretation:PartialRelationInterpretation, | ||
31647 | from: DefinedElement, to: DefinedElement) | ||
31648 | { | ||
31649 | find interpretation(problem,interpretation); | ||
31650 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31651 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"lowerBound attribute ETypedElement"); | ||
31652 | find mustExist(problem, interpretation, from); | ||
31653 | find mustExist(problem, interpretation, to); | ||
31654 | find mustInstanceOfETypedElement_class(problem,interpretation,from); | ||
31655 | IntegerElement(to); | ||
31656 | find mayInRelationlowerBound_attribute_ETypedElement(problem,interpretation,from,to); | ||
31657 | neg find mustInRelationlowerBound_attribute_ETypedElement(problem,interpretation,from,to); | ||
31658 | } | ||
31659 | pattern refineRelation_upperBound_attribute_ETypedElement( | ||
31660 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31661 | relationIterpretation:PartialRelationInterpretation, | ||
31662 | from: DefinedElement, to: DefinedElement) | ||
31663 | { | ||
31664 | find interpretation(problem,interpretation); | ||
31665 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31666 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"upperBound attribute ETypedElement"); | ||
31667 | find mustExist(problem, interpretation, from); | ||
31668 | find mustExist(problem, interpretation, to); | ||
31669 | find mustInstanceOfETypedElement_class(problem,interpretation,from); | ||
31670 | IntegerElement(to); | ||
31671 | find mayInRelationupperBound_attribute_ETypedElement(problem,interpretation,from,to); | ||
31672 | neg find mustInRelationupperBound_attribute_ETypedElement(problem,interpretation,from,to); | ||
31673 | } | ||
31674 | pattern refineRelation_many_attribute_ETypedElement( | ||
31675 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31676 | relationIterpretation:PartialRelationInterpretation, | ||
31677 | from: DefinedElement, to: DefinedElement) | ||
31678 | { | ||
31679 | find interpretation(problem,interpretation); | ||
31680 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31681 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"many attribute ETypedElement"); | ||
31682 | find mustExist(problem, interpretation, from); | ||
31683 | find mustExist(problem, interpretation, to); | ||
31684 | find mustInstanceOfETypedElement_class(problem,interpretation,from); | ||
31685 | BooleanElement(to); | ||
31686 | find mayInRelationmany_attribute_ETypedElement(problem,interpretation,from,to); | ||
31687 | neg find mustInRelationmany_attribute_ETypedElement(problem,interpretation,from,to); | ||
31688 | } | ||
31689 | pattern refineRelation_required_attribute_ETypedElement( | ||
31690 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31691 | relationIterpretation:PartialRelationInterpretation, | ||
31692 | from: DefinedElement, to: DefinedElement) | ||
31693 | { | ||
31694 | find interpretation(problem,interpretation); | ||
31695 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31696 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"required attribute ETypedElement"); | ||
31697 | find mustExist(problem, interpretation, from); | ||
31698 | find mustExist(problem, interpretation, to); | ||
31699 | find mustInstanceOfETypedElement_class(problem,interpretation,from); | ||
31700 | BooleanElement(to); | ||
31701 | find mayInRelationrequired_attribute_ETypedElement(problem,interpretation,from,to); | ||
31702 | neg find mustInRelationrequired_attribute_ETypedElement(problem,interpretation,from,to); | ||
31703 | } | ||
31704 | pattern refineRelation_key_attribute_EStringToStringMapEntry( | ||
31705 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31706 | relationIterpretation:PartialRelationInterpretation, | ||
31707 | from: DefinedElement, to: DefinedElement) | ||
31708 | { | ||
31709 | find interpretation(problem,interpretation); | ||
31710 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31711 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"key attribute EStringToStringMapEntry"); | ||
31712 | find mustExist(problem, interpretation, from); | ||
31713 | find mustExist(problem, interpretation, to); | ||
31714 | find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,from); | ||
31715 | StringElement(to); | ||
31716 | find mayInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,from,to); | ||
31717 | neg find mustInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,from,to); | ||
31718 | } | ||
31719 | pattern refineRelation_value_attribute_EStringToStringMapEntry( | ||
31720 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
31721 | relationIterpretation:PartialRelationInterpretation, | ||
31722 | from: DefinedElement, to: DefinedElement) | ||
31723 | { | ||
31724 | find interpretation(problem,interpretation); | ||
31725 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
31726 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EStringToStringMapEntry"); | ||
31727 | find mustExist(problem, interpretation, from); | ||
31728 | find mustExist(problem, interpretation, to); | ||
31729 | find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,from); | ||
31730 | StringElement(to); | ||
31731 | find mayInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,from,to); | ||
31732 | neg find mustInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,from,to); | ||
31733 | } | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generation.logicproblem b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generation.logicproblem new file mode 100644 index 00000000..ab657f0b --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generation.logicproblem | |||
@@ -0,0 +1,2059 @@ | |||
1 | <?xml version="1.0" encoding="ASCII"?> | ||
2 | <language:LogicProblem xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore2logicannotations="http://www.bme.hu/mit/inf/dslreasoner/logic/model/language/ecore2logicannotation" xmlns:language="http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" xmlns:language_1="http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" xmlns:partial2logicannotations="http://www.bme.hu/mit/inf/dslreasoner/logic/model/language/partial2logicannotation"> | ||
3 | <types xsi:type="language_1:TypeDeclaration" name="EAttribute class" supertypes="//@types.14"/> | ||
4 | <types xsi:type="language_1:TypeDeclaration" name="EAnnotation class" supertypes="//@types.7 //@types.20"/> | ||
5 | <types xsi:type="language_1:TypeDeclaration" name="EClass class" supertypes="//@types.3"/> | ||
6 | <types xsi:type="language_1:TypeDeclaration" name="EClassifier class" subtypes="//@types.2 //@types.4" supertypes="//@types.8 //@types.22" isAbstract="true"/> | ||
7 | <types xsi:type="language_1:TypeDeclaration" name="EDataType class" subtypes="//@types.5" supertypes="//@types.3"/> | ||
8 | <types xsi:type="language_1:TypeDeclaration" name="EEnum class" supertypes="//@types.4"/> | ||
9 | <types xsi:type="language_1:TypeDeclaration" name="EEnumLiteral class" supertypes="//@types.8 //@types.22"/> | ||
10 | <types xsi:type="language_1:TypeDeclaration" name="EModelElement class" subtypes="//@types.1 //@types.8 //@types.19 //@types.20" isAbstract="true"/> | ||
11 | <types xsi:type="language_1:TypeDeclaration" name="ENamedElement class" subtypes="//@types.3 //@types.6 //@types.11 //@types.15 //@types.18 //@types.21 //@types.22" supertypes="//@types.7" isAbstract="true"/> | ||
12 | <types xsi:type="language_1:TypeDeclaration" name="EObject class"/> | ||
13 | <types xsi:type="language_1:TypeDeclaration" name="EOperation class" supertypes="//@types.15"/> | ||
14 | <types xsi:type="language_1:TypeDeclaration" name="EPackage class" subtypes="//@types.23 //@types.24" supertypes="//@types.8" isAbstract="true"/> | ||
15 | <types xsi:type="language_1:TypeDeclaration" name="EParameter class" supertypes="//@types.15"/> | ||
16 | <types xsi:type="language_1:TypeDeclaration" name="EReference class" supertypes="//@types.14"/> | ||
17 | <types xsi:type="language_1:TypeDeclaration" name="EStructuralFeature class" subtypes="//@types.0 //@types.13" supertypes="//@types.15" isAbstract="true"/> | ||
18 | <types xsi:type="language_1:TypeDeclaration" name="ETypedElement class" subtypes="//@types.10 //@types.12 //@types.14" supertypes="//@types.8 //@types.22" isAbstract="true"/> | ||
19 | <types xsi:type="language_1:TypeDeclaration" name="EStringToStringMapEntry class"/> | ||
20 | <types xsi:type="language_1:TypeDeclaration" name="EGenericType class"/> | ||
21 | <types xsi:type="language_1:TypeDeclaration" name="ETypeParameter class" supertypes="//@types.8 //@types.22"/> | ||
22 | <types xsi:type="language_1:TypeDefinition" name="EModelElement class DefinedPart" subtypes="//@types.21" supertypes="//@types.7" isAbstract="true" elements="//@elements.0"/> | ||
23 | <types xsi:type="language_1:TypeDeclaration" name="EModelElement class UndefinedPart" subtypes="//@types.1 //@types.22" supertypes="//@types.7" isAbstract="true"/> | ||
24 | <types xsi:type="language_1:TypeDefinition" name="ENamedElement class DefinedPart" subtypes="//@types.23" supertypes="//@types.8 //@types.19" isAbstract="true" elements="//@elements.0"/> | ||
25 | <types xsi:type="language_1:TypeDeclaration" name="ENamedElement class UndefinedPart" subtypes="//@types.3 //@types.6 //@types.24 //@types.15 //@types.18" supertypes="//@types.8 //@types.20" isAbstract="true"/> | ||
26 | <types xsi:type="language_1:TypeDefinition" name="EPackage class DefinedPart" supertypes="//@types.11 //@types.21" elements="//@elements.0"/> | ||
27 | <types xsi:type="language_1:TypeDeclaration" name="EPackage class UndefinedPart" supertypes="//@types.11 //@types.22"/> | ||
28 | <assertions name="lowerMultiplicity eAttributeType EAttribute" annotations="//@annotations.0"> | ||
29 | <value xsi:type="language_1:Forall"> | ||
30 | <quantifiedVariables name="src"> | ||
31 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/> | ||
32 | </quantifiedVariables> | ||
33 | <expression xsi:type="language_1:Exists"> | ||
34 | <quantifiedVariables name="trg 1"> | ||
35 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.4"/> | ||
36 | </quantifiedVariables> | ||
37 | <expression xsi:type="language_1:And"> | ||
38 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.0"> | ||
39 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.0/@value/@quantifiedVariables.0"/> | ||
40 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.0/@value/@expression/@quantifiedVariables.0"/> | ||
41 | </operands> | ||
42 | </expression> | ||
43 | </expression> | ||
44 | </value> | ||
45 | </assertions> | ||
46 | <assertions name="upperMultiplicity eAttributeType EAttribute" annotations="//@annotations.1"> | ||
47 | <value xsi:type="language_1:Forall"> | ||
48 | <quantifiedVariables name="src"> | ||
49 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/> | ||
50 | </quantifiedVariables> | ||
51 | <quantifiedVariables name="trg 1"> | ||
52 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.4"/> | ||
53 | </quantifiedVariables> | ||
54 | <quantifiedVariables name="trg 2"> | ||
55 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.4"/> | ||
56 | </quantifiedVariables> | ||
57 | <expression xsi:type="language_1:Impl"> | ||
58 | <leftOperand xsi:type="language_1:And"> | ||
59 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.0"> | ||
60 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.1/@value/@quantifiedVariables.0"/> | ||
61 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.1/@value/@quantifiedVariables.1"/> | ||
62 | </operands> | ||
63 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.0"> | ||
64 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.1/@value/@quantifiedVariables.0"/> | ||
65 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.1/@value/@quantifiedVariables.2"/> | ||
66 | </operands> | ||
67 | </leftOperand> | ||
68 | <rightOperand xsi:type="language_1:Not"> | ||
69 | <operand xsi:type="language_1:Distinct"> | ||
70 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.1/@value/@quantifiedVariables.1"/> | ||
71 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.1/@value/@quantifiedVariables.2"/> | ||
72 | </operand> | ||
73 | </rightOperand> | ||
74 | </expression> | ||
75 | </value> | ||
76 | </assertions> | ||
77 | <assertions name="upperMultiplicity eModelElement EAnnotation" annotations="//@annotations.2"> | ||
78 | <value xsi:type="language_1:Forall"> | ||
79 | <quantifiedVariables name="src"> | ||
80 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.1"/> | ||
81 | </quantifiedVariables> | ||
82 | <quantifiedVariables name="trg 1"> | ||
83 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.7"/> | ||
84 | </quantifiedVariables> | ||
85 | <quantifiedVariables name="trg 2"> | ||
86 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.7"/> | ||
87 | </quantifiedVariables> | ||
88 | <expression xsi:type="language_1:Impl"> | ||
89 | <leftOperand xsi:type="language_1:And"> | ||
90 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.2"> | ||
91 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.2/@value/@quantifiedVariables.0"/> | ||
92 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.2/@value/@quantifiedVariables.1"/> | ||
93 | </operands> | ||
94 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.2"> | ||
95 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.2/@value/@quantifiedVariables.0"/> | ||
96 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.2/@value/@quantifiedVariables.2"/> | ||
97 | </operands> | ||
98 | </leftOperand> | ||
99 | <rightOperand xsi:type="language_1:Not"> | ||
100 | <operand xsi:type="language_1:Distinct"> | ||
101 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.2/@value/@quantifiedVariables.1"/> | ||
102 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.2/@value/@quantifiedVariables.2"/> | ||
103 | </operand> | ||
104 | </rightOperand> | ||
105 | </expression> | ||
106 | </value> | ||
107 | </assertions> | ||
108 | <assertions name="upperMultiplicity eIDAttribute EClass" annotations="//@annotations.3"> | ||
109 | <value xsi:type="language_1:Forall"> | ||
110 | <quantifiedVariables name="src"> | ||
111 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
112 | </quantifiedVariables> | ||
113 | <quantifiedVariables name="trg 1"> | ||
114 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/> | ||
115 | </quantifiedVariables> | ||
116 | <quantifiedVariables name="trg 2"> | ||
117 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/> | ||
118 | </quantifiedVariables> | ||
119 | <expression xsi:type="language_1:Impl"> | ||
120 | <leftOperand xsi:type="language_1:And"> | ||
121 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.15"> | ||
122 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.3/@value/@quantifiedVariables.0"/> | ||
123 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.3/@value/@quantifiedVariables.1"/> | ||
124 | </operands> | ||
125 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.15"> | ||
126 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.3/@value/@quantifiedVariables.0"/> | ||
127 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.3/@value/@quantifiedVariables.2"/> | ||
128 | </operands> | ||
129 | </leftOperand> | ||
130 | <rightOperand xsi:type="language_1:Not"> | ||
131 | <operand xsi:type="language_1:Distinct"> | ||
132 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.3/@value/@quantifiedVariables.1"/> | ||
133 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.3/@value/@quantifiedVariables.2"/> | ||
134 | </operand> | ||
135 | </rightOperand> | ||
136 | </expression> | ||
137 | </value> | ||
138 | </assertions> | ||
139 | <assertions name="upperMultiplicity ePackage EClassifier" annotations="//@annotations.4"> | ||
140 | <value xsi:type="language_1:Forall"> | ||
141 | <quantifiedVariables name="src"> | ||
142 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/> | ||
143 | </quantifiedVariables> | ||
144 | <quantifiedVariables name="trg 1"> | ||
145 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.11"/> | ||
146 | </quantifiedVariables> | ||
147 | <quantifiedVariables name="trg 2"> | ||
148 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.11"/> | ||
149 | </quantifiedVariables> | ||
150 | <expression xsi:type="language_1:Impl"> | ||
151 | <leftOperand xsi:type="language_1:And"> | ||
152 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.19"> | ||
153 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.4/@value/@quantifiedVariables.0"/> | ||
154 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.4/@value/@quantifiedVariables.1"/> | ||
155 | </operands> | ||
156 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.19"> | ||
157 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.4/@value/@quantifiedVariables.0"/> | ||
158 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.4/@value/@quantifiedVariables.2"/> | ||
159 | </operands> | ||
160 | </leftOperand> | ||
161 | <rightOperand xsi:type="language_1:Not"> | ||
162 | <operand xsi:type="language_1:Distinct"> | ||
163 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.4/@value/@quantifiedVariables.1"/> | ||
164 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.4/@value/@quantifiedVariables.2"/> | ||
165 | </operand> | ||
166 | </rightOperand> | ||
167 | </expression> | ||
168 | </value> | ||
169 | </assertions> | ||
170 | <assertions name="upperMultiplicity eEnum EEnumLiteral" annotations="//@annotations.5"> | ||
171 | <value xsi:type="language_1:Forall"> | ||
172 | <quantifiedVariables name="src"> | ||
173 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.6"/> | ||
174 | </quantifiedVariables> | ||
175 | <quantifiedVariables name="trg 1"> | ||
176 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.5"/> | ||
177 | </quantifiedVariables> | ||
178 | <quantifiedVariables name="trg 2"> | ||
179 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.5"/> | ||
180 | </quantifiedVariables> | ||
181 | <expression xsi:type="language_1:Impl"> | ||
182 | <leftOperand xsi:type="language_1:And"> | ||
183 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.22"> | ||
184 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.5/@value/@quantifiedVariables.0"/> | ||
185 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.5/@value/@quantifiedVariables.1"/> | ||
186 | </operands> | ||
187 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.22"> | ||
188 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.5/@value/@quantifiedVariables.0"/> | ||
189 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.5/@value/@quantifiedVariables.2"/> | ||
190 | </operands> | ||
191 | </leftOperand> | ||
192 | <rightOperand xsi:type="language_1:Not"> | ||
193 | <operand xsi:type="language_1:Distinct"> | ||
194 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.5/@value/@quantifiedVariables.1"/> | ||
195 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.5/@value/@quantifiedVariables.2"/> | ||
196 | </operand> | ||
197 | </rightOperand> | ||
198 | </expression> | ||
199 | </value> | ||
200 | </assertions> | ||
201 | <assertions name="upperMultiplicity eContainingClass EOperation" annotations="//@annotations.6"> | ||
202 | <value xsi:type="language_1:Forall"> | ||
203 | <quantifiedVariables name="src"> | ||
204 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.10"/> | ||
205 | </quantifiedVariables> | ||
206 | <quantifiedVariables name="trg 1"> | ||
207 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
208 | </quantifiedVariables> | ||
209 | <quantifiedVariables name="trg 2"> | ||
210 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
211 | </quantifiedVariables> | ||
212 | <expression xsi:type="language_1:Impl"> | ||
213 | <leftOperand xsi:type="language_1:And"> | ||
214 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.24"> | ||
215 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.6/@value/@quantifiedVariables.0"/> | ||
216 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.6/@value/@quantifiedVariables.1"/> | ||
217 | </operands> | ||
218 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.24"> | ||
219 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.6/@value/@quantifiedVariables.0"/> | ||
220 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.6/@value/@quantifiedVariables.2"/> | ||
221 | </operands> | ||
222 | </leftOperand> | ||
223 | <rightOperand xsi:type="language_1:Not"> | ||
224 | <operand xsi:type="language_1:Distinct"> | ||
225 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.6/@value/@quantifiedVariables.1"/> | ||
226 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.6/@value/@quantifiedVariables.2"/> | ||
227 | </operand> | ||
228 | </rightOperand> | ||
229 | </expression> | ||
230 | </value> | ||
231 | </assertions> | ||
232 | <assertions name="upperMultiplicity eSuperPackage EPackage" annotations="//@annotations.7"> | ||
233 | <value xsi:type="language_1:Forall"> | ||
234 | <quantifiedVariables name="src"> | ||
235 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.11"/> | ||
236 | </quantifiedVariables> | ||
237 | <quantifiedVariables name="trg 1"> | ||
238 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.11"/> | ||
239 | </quantifiedVariables> | ||
240 | <quantifiedVariables name="trg 2"> | ||
241 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.11"/> | ||
242 | </quantifiedVariables> | ||
243 | <expression xsi:type="language_1:Impl"> | ||
244 | <leftOperand xsi:type="language_1:And"> | ||
245 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.31"> | ||
246 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.7/@value/@quantifiedVariables.0"/> | ||
247 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.7/@value/@quantifiedVariables.1"/> | ||
248 | </operands> | ||
249 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.31"> | ||
250 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.7/@value/@quantifiedVariables.0"/> | ||
251 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.7/@value/@quantifiedVariables.2"/> | ||
252 | </operands> | ||
253 | </leftOperand> | ||
254 | <rightOperand xsi:type="language_1:Not"> | ||
255 | <operand xsi:type="language_1:Distinct"> | ||
256 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.7/@value/@quantifiedVariables.1"/> | ||
257 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.7/@value/@quantifiedVariables.2"/> | ||
258 | </operand> | ||
259 | </rightOperand> | ||
260 | </expression> | ||
261 | </value> | ||
262 | </assertions> | ||
263 | <assertions name="upperMultiplicity eOperation EParameter" annotations="//@annotations.8"> | ||
264 | <value xsi:type="language_1:Forall"> | ||
265 | <quantifiedVariables name="src"> | ||
266 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.12"/> | ||
267 | </quantifiedVariables> | ||
268 | <quantifiedVariables name="trg 1"> | ||
269 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.10"/> | ||
270 | </quantifiedVariables> | ||
271 | <quantifiedVariables name="trg 2"> | ||
272 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.10"/> | ||
273 | </quantifiedVariables> | ||
274 | <expression xsi:type="language_1:Impl"> | ||
275 | <leftOperand xsi:type="language_1:And"> | ||
276 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.32"> | ||
277 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.8/@value/@quantifiedVariables.0"/> | ||
278 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.8/@value/@quantifiedVariables.1"/> | ||
279 | </operands> | ||
280 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.32"> | ||
281 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.8/@value/@quantifiedVariables.0"/> | ||
282 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.8/@value/@quantifiedVariables.2"/> | ||
283 | </operands> | ||
284 | </leftOperand> | ||
285 | <rightOperand xsi:type="language_1:Not"> | ||
286 | <operand xsi:type="language_1:Distinct"> | ||
287 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.8/@value/@quantifiedVariables.1"/> | ||
288 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.8/@value/@quantifiedVariables.2"/> | ||
289 | </operand> | ||
290 | </rightOperand> | ||
291 | </expression> | ||
292 | </value> | ||
293 | </assertions> | ||
294 | <assertions name="upperMultiplicity eOpposite EReference" annotations="//@annotations.9"> | ||
295 | <value xsi:type="language_1:Forall"> | ||
296 | <quantifiedVariables name="src"> | ||
297 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.13"/> | ||
298 | </quantifiedVariables> | ||
299 | <quantifiedVariables name="trg 1"> | ||
300 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.13"/> | ||
301 | </quantifiedVariables> | ||
302 | <quantifiedVariables name="trg 2"> | ||
303 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.13"/> | ||
304 | </quantifiedVariables> | ||
305 | <expression xsi:type="language_1:Impl"> | ||
306 | <leftOperand xsi:type="language_1:And"> | ||
307 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.33"> | ||
308 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.9/@value/@quantifiedVariables.0"/> | ||
309 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.9/@value/@quantifiedVariables.1"/> | ||
310 | </operands> | ||
311 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.33"> | ||
312 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.9/@value/@quantifiedVariables.0"/> | ||
313 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.9/@value/@quantifiedVariables.2"/> | ||
314 | </operands> | ||
315 | </leftOperand> | ||
316 | <rightOperand xsi:type="language_1:Not"> | ||
317 | <operand xsi:type="language_1:Distinct"> | ||
318 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.9/@value/@quantifiedVariables.1"/> | ||
319 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.9/@value/@quantifiedVariables.2"/> | ||
320 | </operand> | ||
321 | </rightOperand> | ||
322 | </expression> | ||
323 | </value> | ||
324 | </assertions> | ||
325 | <assertions name="lowerMultiplicity eReferenceType EReference" annotations="//@annotations.10"> | ||
326 | <value xsi:type="language_1:Forall"> | ||
327 | <quantifiedVariables name="src"> | ||
328 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.13"/> | ||
329 | </quantifiedVariables> | ||
330 | <expression xsi:type="language_1:Exists"> | ||
331 | <quantifiedVariables name="trg 1"> | ||
332 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
333 | </quantifiedVariables> | ||
334 | <expression xsi:type="language_1:And"> | ||
335 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.34"> | ||
336 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.10/@value/@quantifiedVariables.0"/> | ||
337 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.10/@value/@expression/@quantifiedVariables.0"/> | ||
338 | </operands> | ||
339 | </expression> | ||
340 | </expression> | ||
341 | </value> | ||
342 | </assertions> | ||
343 | <assertions name="upperMultiplicity eReferenceType EReference" annotations="//@annotations.11"> | ||
344 | <value xsi:type="language_1:Forall"> | ||
345 | <quantifiedVariables name="src"> | ||
346 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.13"/> | ||
347 | </quantifiedVariables> | ||
348 | <quantifiedVariables name="trg 1"> | ||
349 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
350 | </quantifiedVariables> | ||
351 | <quantifiedVariables name="trg 2"> | ||
352 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
353 | </quantifiedVariables> | ||
354 | <expression xsi:type="language_1:Impl"> | ||
355 | <leftOperand xsi:type="language_1:And"> | ||
356 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.34"> | ||
357 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.11/@value/@quantifiedVariables.0"/> | ||
358 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.11/@value/@quantifiedVariables.1"/> | ||
359 | </operands> | ||
360 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.34"> | ||
361 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.11/@value/@quantifiedVariables.0"/> | ||
362 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.11/@value/@quantifiedVariables.2"/> | ||
363 | </operands> | ||
364 | </leftOperand> | ||
365 | <rightOperand xsi:type="language_1:Not"> | ||
366 | <operand xsi:type="language_1:Distinct"> | ||
367 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.11/@value/@quantifiedVariables.1"/> | ||
368 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.11/@value/@quantifiedVariables.2"/> | ||
369 | </operand> | ||
370 | </rightOperand> | ||
371 | </expression> | ||
372 | </value> | ||
373 | </assertions> | ||
374 | <assertions name="upperMultiplicity eContainingClass EStructuralFeature" annotations="//@annotations.12"> | ||
375 | <value xsi:type="language_1:Forall"> | ||
376 | <quantifiedVariables name="src"> | ||
377 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.14"/> | ||
378 | </quantifiedVariables> | ||
379 | <quantifiedVariables name="trg 1"> | ||
380 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
381 | </quantifiedVariables> | ||
382 | <quantifiedVariables name="trg 2"> | ||
383 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
384 | </quantifiedVariables> | ||
385 | <expression xsi:type="language_1:Impl"> | ||
386 | <leftOperand xsi:type="language_1:And"> | ||
387 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.36"> | ||
388 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.12/@value/@quantifiedVariables.0"/> | ||
389 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.12/@value/@quantifiedVariables.1"/> | ||
390 | </operands> | ||
391 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.36"> | ||
392 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.12/@value/@quantifiedVariables.0"/> | ||
393 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.12/@value/@quantifiedVariables.2"/> | ||
394 | </operands> | ||
395 | </leftOperand> | ||
396 | <rightOperand xsi:type="language_1:Not"> | ||
397 | <operand xsi:type="language_1:Distinct"> | ||
398 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.12/@value/@quantifiedVariables.1"/> | ||
399 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.12/@value/@quantifiedVariables.2"/> | ||
400 | </operand> | ||
401 | </rightOperand> | ||
402 | </expression> | ||
403 | </value> | ||
404 | </assertions> | ||
405 | <assertions name="upperMultiplicity eType ETypedElement" annotations="//@annotations.13"> | ||
406 | <value xsi:type="language_1:Forall"> | ||
407 | <quantifiedVariables name="src"> | ||
408 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.15"/> | ||
409 | </quantifiedVariables> | ||
410 | <quantifiedVariables name="trg 1"> | ||
411 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/> | ||
412 | </quantifiedVariables> | ||
413 | <quantifiedVariables name="trg 2"> | ||
414 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/> | ||
415 | </quantifiedVariables> | ||
416 | <expression xsi:type="language_1:Impl"> | ||
417 | <leftOperand xsi:type="language_1:And"> | ||
418 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.37"> | ||
419 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.13/@value/@quantifiedVariables.0"/> | ||
420 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.13/@value/@quantifiedVariables.1"/> | ||
421 | </operands> | ||
422 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.37"> | ||
423 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.13/@value/@quantifiedVariables.0"/> | ||
424 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.13/@value/@quantifiedVariables.2"/> | ||
425 | </operands> | ||
426 | </leftOperand> | ||
427 | <rightOperand xsi:type="language_1:Not"> | ||
428 | <operand xsi:type="language_1:Distinct"> | ||
429 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.13/@value/@quantifiedVariables.1"/> | ||
430 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.13/@value/@quantifiedVariables.2"/> | ||
431 | </operand> | ||
432 | </rightOperand> | ||
433 | </expression> | ||
434 | </value> | ||
435 | </assertions> | ||
436 | <assertions name="upperMultiplicity eGenericType ETypedElement" annotations="//@annotations.14"> | ||
437 | <value xsi:type="language_1:Forall"> | ||
438 | <quantifiedVariables name="src"> | ||
439 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.15"/> | ||
440 | </quantifiedVariables> | ||
441 | <quantifiedVariables name="trg 1"> | ||
442 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
443 | </quantifiedVariables> | ||
444 | <quantifiedVariables name="trg 2"> | ||
445 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
446 | </quantifiedVariables> | ||
447 | <expression xsi:type="language_1:Impl"> | ||
448 | <leftOperand xsi:type="language_1:And"> | ||
449 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.38"> | ||
450 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.14/@value/@quantifiedVariables.0"/> | ||
451 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.14/@value/@quantifiedVariables.1"/> | ||
452 | </operands> | ||
453 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.38"> | ||
454 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.14/@value/@quantifiedVariables.0"/> | ||
455 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.14/@value/@quantifiedVariables.2"/> | ||
456 | </operands> | ||
457 | </leftOperand> | ||
458 | <rightOperand xsi:type="language_1:Not"> | ||
459 | <operand xsi:type="language_1:Distinct"> | ||
460 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.14/@value/@quantifiedVariables.1"/> | ||
461 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.14/@value/@quantifiedVariables.2"/> | ||
462 | </operand> | ||
463 | </rightOperand> | ||
464 | </expression> | ||
465 | </value> | ||
466 | </assertions> | ||
467 | <assertions name="upperMultiplicity eUpperBound EGenericType" annotations="//@annotations.15"> | ||
468 | <value xsi:type="language_1:Forall"> | ||
469 | <quantifiedVariables name="src"> | ||
470 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
471 | </quantifiedVariables> | ||
472 | <quantifiedVariables name="trg 1"> | ||
473 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
474 | </quantifiedVariables> | ||
475 | <quantifiedVariables name="trg 2"> | ||
476 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
477 | </quantifiedVariables> | ||
478 | <expression xsi:type="language_1:Impl"> | ||
479 | <leftOperand xsi:type="language_1:And"> | ||
480 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.39"> | ||
481 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.15/@value/@quantifiedVariables.0"/> | ||
482 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.15/@value/@quantifiedVariables.1"/> | ||
483 | </operands> | ||
484 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.39"> | ||
485 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.15/@value/@quantifiedVariables.0"/> | ||
486 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.15/@value/@quantifiedVariables.2"/> | ||
487 | </operands> | ||
488 | </leftOperand> | ||
489 | <rightOperand xsi:type="language_1:Not"> | ||
490 | <operand xsi:type="language_1:Distinct"> | ||
491 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.15/@value/@quantifiedVariables.1"/> | ||
492 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.15/@value/@quantifiedVariables.2"/> | ||
493 | </operand> | ||
494 | </rightOperand> | ||
495 | </expression> | ||
496 | </value> | ||
497 | </assertions> | ||
498 | <assertions name="lowerMultiplicity eRawType EGenericType" annotations="//@annotations.16"> | ||
499 | <value xsi:type="language_1:Forall"> | ||
500 | <quantifiedVariables name="src"> | ||
501 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
502 | </quantifiedVariables> | ||
503 | <expression xsi:type="language_1:Exists"> | ||
504 | <quantifiedVariables name="trg 1"> | ||
505 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/> | ||
506 | </quantifiedVariables> | ||
507 | <expression xsi:type="language_1:And"> | ||
508 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.41"> | ||
509 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.16/@value/@quantifiedVariables.0"/> | ||
510 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.16/@value/@expression/@quantifiedVariables.0"/> | ||
511 | </operands> | ||
512 | </expression> | ||
513 | </expression> | ||
514 | </value> | ||
515 | </assertions> | ||
516 | <assertions name="upperMultiplicity eRawType EGenericType" annotations="//@annotations.17"> | ||
517 | <value xsi:type="language_1:Forall"> | ||
518 | <quantifiedVariables name="src"> | ||
519 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
520 | </quantifiedVariables> | ||
521 | <quantifiedVariables name="trg 1"> | ||
522 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/> | ||
523 | </quantifiedVariables> | ||
524 | <quantifiedVariables name="trg 2"> | ||
525 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/> | ||
526 | </quantifiedVariables> | ||
527 | <expression xsi:type="language_1:Impl"> | ||
528 | <leftOperand xsi:type="language_1:And"> | ||
529 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.41"> | ||
530 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.17/@value/@quantifiedVariables.0"/> | ||
531 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.17/@value/@quantifiedVariables.1"/> | ||
532 | </operands> | ||
533 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.41"> | ||
534 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.17/@value/@quantifiedVariables.0"/> | ||
535 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.17/@value/@quantifiedVariables.2"/> | ||
536 | </operands> | ||
537 | </leftOperand> | ||
538 | <rightOperand xsi:type="language_1:Not"> | ||
539 | <operand xsi:type="language_1:Distinct"> | ||
540 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.17/@value/@quantifiedVariables.1"/> | ||
541 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.17/@value/@quantifiedVariables.2"/> | ||
542 | </operand> | ||
543 | </rightOperand> | ||
544 | </expression> | ||
545 | </value> | ||
546 | </assertions> | ||
547 | <assertions name="upperMultiplicity eLowerBound EGenericType" annotations="//@annotations.18"> | ||
548 | <value xsi:type="language_1:Forall"> | ||
549 | <quantifiedVariables name="src"> | ||
550 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
551 | </quantifiedVariables> | ||
552 | <quantifiedVariables name="trg 1"> | ||
553 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
554 | </quantifiedVariables> | ||
555 | <quantifiedVariables name="trg 2"> | ||
556 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
557 | </quantifiedVariables> | ||
558 | <expression xsi:type="language_1:Impl"> | ||
559 | <leftOperand xsi:type="language_1:And"> | ||
560 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.42"> | ||
561 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.18/@value/@quantifiedVariables.0"/> | ||
562 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.18/@value/@quantifiedVariables.1"/> | ||
563 | </operands> | ||
564 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.42"> | ||
565 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.18/@value/@quantifiedVariables.0"/> | ||
566 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.18/@value/@quantifiedVariables.2"/> | ||
567 | </operands> | ||
568 | </leftOperand> | ||
569 | <rightOperand xsi:type="language_1:Not"> | ||
570 | <operand xsi:type="language_1:Distinct"> | ||
571 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.18/@value/@quantifiedVariables.1"/> | ||
572 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.18/@value/@quantifiedVariables.2"/> | ||
573 | </operand> | ||
574 | </rightOperand> | ||
575 | </expression> | ||
576 | </value> | ||
577 | </assertions> | ||
578 | <assertions name="upperMultiplicity eTypeParameter EGenericType" annotations="//@annotations.19"> | ||
579 | <value xsi:type="language_1:Forall"> | ||
580 | <quantifiedVariables name="src"> | ||
581 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
582 | </quantifiedVariables> | ||
583 | <quantifiedVariables name="trg 1"> | ||
584 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.18"/> | ||
585 | </quantifiedVariables> | ||
586 | <quantifiedVariables name="trg 2"> | ||
587 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.18"/> | ||
588 | </quantifiedVariables> | ||
589 | <expression xsi:type="language_1:Impl"> | ||
590 | <leftOperand xsi:type="language_1:And"> | ||
591 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.43"> | ||
592 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.19/@value/@quantifiedVariables.0"/> | ||
593 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.19/@value/@quantifiedVariables.1"/> | ||
594 | </operands> | ||
595 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.43"> | ||
596 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.19/@value/@quantifiedVariables.0"/> | ||
597 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.19/@value/@quantifiedVariables.2"/> | ||
598 | </operands> | ||
599 | </leftOperand> | ||
600 | <rightOperand xsi:type="language_1:Not"> | ||
601 | <operand xsi:type="language_1:Distinct"> | ||
602 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.19/@value/@quantifiedVariables.1"/> | ||
603 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.19/@value/@quantifiedVariables.2"/> | ||
604 | </operand> | ||
605 | </rightOperand> | ||
606 | </expression> | ||
607 | </value> | ||
608 | </assertions> | ||
609 | <assertions name="upperMultiplicity eClassifier EGenericType" annotations="//@annotations.20"> | ||
610 | <value xsi:type="language_1:Forall"> | ||
611 | <quantifiedVariables name="src"> | ||
612 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
613 | </quantifiedVariables> | ||
614 | <quantifiedVariables name="trg 1"> | ||
615 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/> | ||
616 | </quantifiedVariables> | ||
617 | <quantifiedVariables name="trg 2"> | ||
618 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/> | ||
619 | </quantifiedVariables> | ||
620 | <expression xsi:type="language_1:Impl"> | ||
621 | <leftOperand xsi:type="language_1:And"> | ||
622 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.44"> | ||
623 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.20/@value/@quantifiedVariables.0"/> | ||
624 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.20/@value/@quantifiedVariables.1"/> | ||
625 | </operands> | ||
626 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.44"> | ||
627 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.20/@value/@quantifiedVariables.0"/> | ||
628 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.20/@value/@quantifiedVariables.2"/> | ||
629 | </operands> | ||
630 | </leftOperand> | ||
631 | <rightOperand xsi:type="language_1:Not"> | ||
632 | <operand xsi:type="language_1:Distinct"> | ||
633 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.20/@value/@quantifiedVariables.1"/> | ||
634 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.20/@value/@quantifiedVariables.2"/> | ||
635 | </operand> | ||
636 | </rightOperand> | ||
637 | </expression> | ||
638 | </value> | ||
639 | </assertions> | ||
640 | <assertions name="oppositeReference eModelElement EAnnotation" annotations="//@annotations.21"> | ||
641 | <value xsi:type="language_1:Forall"> | ||
642 | <quantifiedVariables name="src"> | ||
643 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.1"/> | ||
644 | </quantifiedVariables> | ||
645 | <quantifiedVariables name="trg"> | ||
646 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.7"/> | ||
647 | </quantifiedVariables> | ||
648 | <expression xsi:type="language_1:Iff"> | ||
649 | <leftOperand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.2"> | ||
650 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.21/@value/@quantifiedVariables.0"/> | ||
651 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.21/@value/@quantifiedVariables.1"/> | ||
652 | </leftOperand> | ||
653 | <rightOperand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.23"> | ||
654 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.21/@value/@quantifiedVariables.1"/> | ||
655 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.21/@value/@quantifiedVariables.0"/> | ||
656 | </rightOperand> | ||
657 | </expression> | ||
658 | </value> | ||
659 | </assertions> | ||
660 | <assertions name="oppositeReference eOperations EClass" annotations="//@annotations.22"> | ||
661 | <value xsi:type="language_1:Forall"> | ||
662 | <quantifiedVariables name="src"> | ||
663 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
664 | </quantifiedVariables> | ||
665 | <quantifiedVariables name="trg"> | ||
666 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.10"/> | ||
667 | </quantifiedVariables> | ||
668 | <expression xsi:type="language_1:Iff"> | ||
669 | <leftOperand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.6"> | ||
670 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.22/@value/@quantifiedVariables.0"/> | ||
671 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.22/@value/@quantifiedVariables.1"/> | ||
672 | </leftOperand> | ||
673 | <rightOperand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.24"> | ||
674 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.22/@value/@quantifiedVariables.1"/> | ||
675 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.22/@value/@quantifiedVariables.0"/> | ||
676 | </rightOperand> | ||
677 | </expression> | ||
678 | </value> | ||
679 | </assertions> | ||
680 | <assertions name="oppositeReference eStructuralFeatures EClass" annotations="//@annotations.23"> | ||
681 | <value xsi:type="language_1:Forall"> | ||
682 | <quantifiedVariables name="src"> | ||
683 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
684 | </quantifiedVariables> | ||
685 | <quantifiedVariables name="trg"> | ||
686 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.14"/> | ||
687 | </quantifiedVariables> | ||
688 | <expression xsi:type="language_1:Iff"> | ||
689 | <leftOperand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.16"> | ||
690 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.23/@value/@quantifiedVariables.0"/> | ||
691 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.23/@value/@quantifiedVariables.1"/> | ||
692 | </leftOperand> | ||
693 | <rightOperand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.36"> | ||
694 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.23/@value/@quantifiedVariables.1"/> | ||
695 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.23/@value/@quantifiedVariables.0"/> | ||
696 | </rightOperand> | ||
697 | </expression> | ||
698 | </value> | ||
699 | </assertions> | ||
700 | <assertions name="oppositeReference ePackage EClassifier" annotations="//@annotations.24"> | ||
701 | <value xsi:type="language_1:Forall"> | ||
702 | <quantifiedVariables name="src"> | ||
703 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/> | ||
704 | </quantifiedVariables> | ||
705 | <quantifiedVariables name="trg"> | ||
706 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.11"/> | ||
707 | </quantifiedVariables> | ||
708 | <expression xsi:type="language_1:Iff"> | ||
709 | <leftOperand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.19"> | ||
710 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.24/@value/@quantifiedVariables.0"/> | ||
711 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.24/@value/@quantifiedVariables.1"/> | ||
712 | </leftOperand> | ||
713 | <rightOperand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.29"> | ||
714 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.24/@value/@quantifiedVariables.1"/> | ||
715 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.24/@value/@quantifiedVariables.0"/> | ||
716 | </rightOperand> | ||
717 | </expression> | ||
718 | </value> | ||
719 | </assertions> | ||
720 | <assertions name="oppositeReference eLiterals EEnum" annotations="//@annotations.25"> | ||
721 | <value xsi:type="language_1:Forall"> | ||
722 | <quantifiedVariables name="src"> | ||
723 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.5"/> | ||
724 | </quantifiedVariables> | ||
725 | <quantifiedVariables name="trg"> | ||
726 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.6"/> | ||
727 | </quantifiedVariables> | ||
728 | <expression xsi:type="language_1:Iff"> | ||
729 | <leftOperand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.21"> | ||
730 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.25/@value/@quantifiedVariables.0"/> | ||
731 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.25/@value/@quantifiedVariables.1"/> | ||
732 | </leftOperand> | ||
733 | <rightOperand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.22"> | ||
734 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.25/@value/@quantifiedVariables.1"/> | ||
735 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.25/@value/@quantifiedVariables.0"/> | ||
736 | </rightOperand> | ||
737 | </expression> | ||
738 | </value> | ||
739 | </assertions> | ||
740 | <assertions name="oppositeReference eParameters EOperation" annotations="//@annotations.26"> | ||
741 | <value xsi:type="language_1:Forall"> | ||
742 | <quantifiedVariables name="src"> | ||
743 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.10"/> | ||
744 | </quantifiedVariables> | ||
745 | <quantifiedVariables name="trg"> | ||
746 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.12"/> | ||
747 | </quantifiedVariables> | ||
748 | <expression xsi:type="language_1:Iff"> | ||
749 | <leftOperand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.26"> | ||
750 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.26/@value/@quantifiedVariables.0"/> | ||
751 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.26/@value/@quantifiedVariables.1"/> | ||
752 | </leftOperand> | ||
753 | <rightOperand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.32"> | ||
754 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.26/@value/@quantifiedVariables.1"/> | ||
755 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.26/@value/@quantifiedVariables.0"/> | ||
756 | </rightOperand> | ||
757 | </expression> | ||
758 | </value> | ||
759 | </assertions> | ||
760 | <assertions name="oppositeReference eSubpackages EPackage" annotations="//@annotations.27"> | ||
761 | <value xsi:type="language_1:Forall"> | ||
762 | <quantifiedVariables name="src"> | ||
763 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.11"/> | ||
764 | </quantifiedVariables> | ||
765 | <quantifiedVariables name="trg"> | ||
766 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.11"/> | ||
767 | </quantifiedVariables> | ||
768 | <expression xsi:type="language_1:Iff"> | ||
769 | <leftOperand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.30"> | ||
770 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.27/@value/@quantifiedVariables.0"/> | ||
771 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.27/@value/@quantifiedVariables.1"/> | ||
772 | </leftOperand> | ||
773 | <rightOperand xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.31"> | ||
774 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.27/@value/@quantifiedVariables.1"/> | ||
775 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.27/@value/@quantifiedVariables.0"/> | ||
776 | </rightOperand> | ||
777 | </expression> | ||
778 | </value> | ||
779 | </assertions> | ||
780 | <assertions name="upperMultiplicity iD EAttribute" annotations="//@annotations.28"> | ||
781 | <value xsi:type="language_1:Forall"> | ||
782 | <quantifiedVariables name="src"> | ||
783 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/> | ||
784 | </quantifiedVariables> | ||
785 | <quantifiedVariables name="trg 1"> | ||
786 | <range xsi:type="language_1:BoolTypeReference"/> | ||
787 | </quantifiedVariables> | ||
788 | <quantifiedVariables name="trg 2"> | ||
789 | <range xsi:type="language_1:BoolTypeReference"/> | ||
790 | </quantifiedVariables> | ||
791 | <expression xsi:type="language_1:Impl"> | ||
792 | <leftOperand xsi:type="language_1:And"> | ||
793 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.46"> | ||
794 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.28/@value/@quantifiedVariables.0"/> | ||
795 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.28/@value/@quantifiedVariables.1"/> | ||
796 | </operands> | ||
797 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.46"> | ||
798 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.28/@value/@quantifiedVariables.0"/> | ||
799 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.28/@value/@quantifiedVariables.2"/> | ||
800 | </operands> | ||
801 | </leftOperand> | ||
802 | <rightOperand xsi:type="language_1:Not"> | ||
803 | <operand xsi:type="language_1:Distinct"> | ||
804 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.28/@value/@quantifiedVariables.1"/> | ||
805 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.28/@value/@quantifiedVariables.2"/> | ||
806 | </operand> | ||
807 | </rightOperand> | ||
808 | </expression> | ||
809 | </value> | ||
810 | </assertions> | ||
811 | <assertions name="upperMultiplicity source EAnnotation" annotations="//@annotations.29"> | ||
812 | <value xsi:type="language_1:Forall"> | ||
813 | <quantifiedVariables name="src"> | ||
814 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.1"/> | ||
815 | </quantifiedVariables> | ||
816 | <quantifiedVariables name="trg 1"> | ||
817 | <range xsi:type="language_1:StringTypeReference"/> | ||
818 | </quantifiedVariables> | ||
819 | <quantifiedVariables name="trg 2"> | ||
820 | <range xsi:type="language_1:StringTypeReference"/> | ||
821 | </quantifiedVariables> | ||
822 | <expression xsi:type="language_1:Impl"> | ||
823 | <leftOperand xsi:type="language_1:And"> | ||
824 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.47"> | ||
825 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.29/@value/@quantifiedVariables.0"/> | ||
826 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.29/@value/@quantifiedVariables.1"/> | ||
827 | </operands> | ||
828 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.47"> | ||
829 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.29/@value/@quantifiedVariables.0"/> | ||
830 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.29/@value/@quantifiedVariables.2"/> | ||
831 | </operands> | ||
832 | </leftOperand> | ||
833 | <rightOperand xsi:type="language_1:Not"> | ||
834 | <operand xsi:type="language_1:Distinct"> | ||
835 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.29/@value/@quantifiedVariables.1"/> | ||
836 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.29/@value/@quantifiedVariables.2"/> | ||
837 | </operand> | ||
838 | </rightOperand> | ||
839 | </expression> | ||
840 | </value> | ||
841 | </assertions> | ||
842 | <assertions name="upperMultiplicity abstract EClass" annotations="//@annotations.30"> | ||
843 | <value xsi:type="language_1:Forall"> | ||
844 | <quantifiedVariables name="src"> | ||
845 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
846 | </quantifiedVariables> | ||
847 | <quantifiedVariables name="trg 1"> | ||
848 | <range xsi:type="language_1:BoolTypeReference"/> | ||
849 | </quantifiedVariables> | ||
850 | <quantifiedVariables name="trg 2"> | ||
851 | <range xsi:type="language_1:BoolTypeReference"/> | ||
852 | </quantifiedVariables> | ||
853 | <expression xsi:type="language_1:Impl"> | ||
854 | <leftOperand xsi:type="language_1:And"> | ||
855 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.48"> | ||
856 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.30/@value/@quantifiedVariables.0"/> | ||
857 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.30/@value/@quantifiedVariables.1"/> | ||
858 | </operands> | ||
859 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.48"> | ||
860 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.30/@value/@quantifiedVariables.0"/> | ||
861 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.30/@value/@quantifiedVariables.2"/> | ||
862 | </operands> | ||
863 | </leftOperand> | ||
864 | <rightOperand xsi:type="language_1:Not"> | ||
865 | <operand xsi:type="language_1:Distinct"> | ||
866 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.30/@value/@quantifiedVariables.1"/> | ||
867 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.30/@value/@quantifiedVariables.2"/> | ||
868 | </operand> | ||
869 | </rightOperand> | ||
870 | </expression> | ||
871 | </value> | ||
872 | </assertions> | ||
873 | <assertions name="upperMultiplicity interface EClass" annotations="//@annotations.31"> | ||
874 | <value xsi:type="language_1:Forall"> | ||
875 | <quantifiedVariables name="src"> | ||
876 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
877 | </quantifiedVariables> | ||
878 | <quantifiedVariables name="trg 1"> | ||
879 | <range xsi:type="language_1:BoolTypeReference"/> | ||
880 | </quantifiedVariables> | ||
881 | <quantifiedVariables name="trg 2"> | ||
882 | <range xsi:type="language_1:BoolTypeReference"/> | ||
883 | </quantifiedVariables> | ||
884 | <expression xsi:type="language_1:Impl"> | ||
885 | <leftOperand xsi:type="language_1:And"> | ||
886 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.49"> | ||
887 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.31/@value/@quantifiedVariables.0"/> | ||
888 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.31/@value/@quantifiedVariables.1"/> | ||
889 | </operands> | ||
890 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.49"> | ||
891 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.31/@value/@quantifiedVariables.0"/> | ||
892 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.31/@value/@quantifiedVariables.2"/> | ||
893 | </operands> | ||
894 | </leftOperand> | ||
895 | <rightOperand xsi:type="language_1:Not"> | ||
896 | <operand xsi:type="language_1:Distinct"> | ||
897 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.31/@value/@quantifiedVariables.1"/> | ||
898 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.31/@value/@quantifiedVariables.2"/> | ||
899 | </operand> | ||
900 | </rightOperand> | ||
901 | </expression> | ||
902 | </value> | ||
903 | </assertions> | ||
904 | <assertions name="upperMultiplicity instanceClassName EClassifier" annotations="//@annotations.32"> | ||
905 | <value xsi:type="language_1:Forall"> | ||
906 | <quantifiedVariables name="src"> | ||
907 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/> | ||
908 | </quantifiedVariables> | ||
909 | <quantifiedVariables name="trg 1"> | ||
910 | <range xsi:type="language_1:StringTypeReference"/> | ||
911 | </quantifiedVariables> | ||
912 | <quantifiedVariables name="trg 2"> | ||
913 | <range xsi:type="language_1:StringTypeReference"/> | ||
914 | </quantifiedVariables> | ||
915 | <expression xsi:type="language_1:Impl"> | ||
916 | <leftOperand xsi:type="language_1:And"> | ||
917 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.50"> | ||
918 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.32/@value/@quantifiedVariables.0"/> | ||
919 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.32/@value/@quantifiedVariables.1"/> | ||
920 | </operands> | ||
921 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.50"> | ||
922 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.32/@value/@quantifiedVariables.0"/> | ||
923 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.32/@value/@quantifiedVariables.2"/> | ||
924 | </operands> | ||
925 | </leftOperand> | ||
926 | <rightOperand xsi:type="language_1:Not"> | ||
927 | <operand xsi:type="language_1:Distinct"> | ||
928 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.32/@value/@quantifiedVariables.1"/> | ||
929 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.32/@value/@quantifiedVariables.2"/> | ||
930 | </operand> | ||
931 | </rightOperand> | ||
932 | </expression> | ||
933 | </value> | ||
934 | </assertions> | ||
935 | <assertions name="upperMultiplicity instanceTypeName EClassifier" annotations="//@annotations.33"> | ||
936 | <value xsi:type="language_1:Forall"> | ||
937 | <quantifiedVariables name="src"> | ||
938 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/> | ||
939 | </quantifiedVariables> | ||
940 | <quantifiedVariables name="trg 1"> | ||
941 | <range xsi:type="language_1:StringTypeReference"/> | ||
942 | </quantifiedVariables> | ||
943 | <quantifiedVariables name="trg 2"> | ||
944 | <range xsi:type="language_1:StringTypeReference"/> | ||
945 | </quantifiedVariables> | ||
946 | <expression xsi:type="language_1:Impl"> | ||
947 | <leftOperand xsi:type="language_1:And"> | ||
948 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.51"> | ||
949 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.33/@value/@quantifiedVariables.0"/> | ||
950 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.33/@value/@quantifiedVariables.1"/> | ||
951 | </operands> | ||
952 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.51"> | ||
953 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.33/@value/@quantifiedVariables.0"/> | ||
954 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.33/@value/@quantifiedVariables.2"/> | ||
955 | </operands> | ||
956 | </leftOperand> | ||
957 | <rightOperand xsi:type="language_1:Not"> | ||
958 | <operand xsi:type="language_1:Distinct"> | ||
959 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.33/@value/@quantifiedVariables.1"/> | ||
960 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.33/@value/@quantifiedVariables.2"/> | ||
961 | </operand> | ||
962 | </rightOperand> | ||
963 | </expression> | ||
964 | </value> | ||
965 | </assertions> | ||
966 | <assertions name="upperMultiplicity serializable EDataType" annotations="//@annotations.34"> | ||
967 | <value xsi:type="language_1:Forall"> | ||
968 | <quantifiedVariables name="src"> | ||
969 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.4"/> | ||
970 | </quantifiedVariables> | ||
971 | <quantifiedVariables name="trg 1"> | ||
972 | <range xsi:type="language_1:BoolTypeReference"/> | ||
973 | </quantifiedVariables> | ||
974 | <quantifiedVariables name="trg 2"> | ||
975 | <range xsi:type="language_1:BoolTypeReference"/> | ||
976 | </quantifiedVariables> | ||
977 | <expression xsi:type="language_1:Impl"> | ||
978 | <leftOperand xsi:type="language_1:And"> | ||
979 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.52"> | ||
980 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.34/@value/@quantifiedVariables.0"/> | ||
981 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.34/@value/@quantifiedVariables.1"/> | ||
982 | </operands> | ||
983 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.52"> | ||
984 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.34/@value/@quantifiedVariables.0"/> | ||
985 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.34/@value/@quantifiedVariables.2"/> | ||
986 | </operands> | ||
987 | </leftOperand> | ||
988 | <rightOperand xsi:type="language_1:Not"> | ||
989 | <operand xsi:type="language_1:Distinct"> | ||
990 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.34/@value/@quantifiedVariables.1"/> | ||
991 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.34/@value/@quantifiedVariables.2"/> | ||
992 | </operand> | ||
993 | </rightOperand> | ||
994 | </expression> | ||
995 | </value> | ||
996 | </assertions> | ||
997 | <assertions name="upperMultiplicity value EEnumLiteral" annotations="//@annotations.35"> | ||
998 | <value xsi:type="language_1:Forall"> | ||
999 | <quantifiedVariables name="src"> | ||
1000 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.6"/> | ||
1001 | </quantifiedVariables> | ||
1002 | <quantifiedVariables name="trg 1"> | ||
1003 | <range xsi:type="language_1:IntTypeReference"/> | ||
1004 | </quantifiedVariables> | ||
1005 | <quantifiedVariables name="trg 2"> | ||
1006 | <range xsi:type="language_1:IntTypeReference"/> | ||
1007 | </quantifiedVariables> | ||
1008 | <expression xsi:type="language_1:Impl"> | ||
1009 | <leftOperand xsi:type="language_1:And"> | ||
1010 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.53"> | ||
1011 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.35/@value/@quantifiedVariables.0"/> | ||
1012 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.35/@value/@quantifiedVariables.1"/> | ||
1013 | </operands> | ||
1014 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.53"> | ||
1015 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.35/@value/@quantifiedVariables.0"/> | ||
1016 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.35/@value/@quantifiedVariables.2"/> | ||
1017 | </operands> | ||
1018 | </leftOperand> | ||
1019 | <rightOperand xsi:type="language_1:Not"> | ||
1020 | <operand xsi:type="language_1:Distinct"> | ||
1021 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.35/@value/@quantifiedVariables.1"/> | ||
1022 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.35/@value/@quantifiedVariables.2"/> | ||
1023 | </operand> | ||
1024 | </rightOperand> | ||
1025 | </expression> | ||
1026 | </value> | ||
1027 | </assertions> | ||
1028 | <assertions name="upperMultiplicity literal EEnumLiteral" annotations="//@annotations.36"> | ||
1029 | <value xsi:type="language_1:Forall"> | ||
1030 | <quantifiedVariables name="src"> | ||
1031 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.6"/> | ||
1032 | </quantifiedVariables> | ||
1033 | <quantifiedVariables name="trg 1"> | ||
1034 | <range xsi:type="language_1:StringTypeReference"/> | ||
1035 | </quantifiedVariables> | ||
1036 | <quantifiedVariables name="trg 2"> | ||
1037 | <range xsi:type="language_1:StringTypeReference"/> | ||
1038 | </quantifiedVariables> | ||
1039 | <expression xsi:type="language_1:Impl"> | ||
1040 | <leftOperand xsi:type="language_1:And"> | ||
1041 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.54"> | ||
1042 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.36/@value/@quantifiedVariables.0"/> | ||
1043 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.36/@value/@quantifiedVariables.1"/> | ||
1044 | </operands> | ||
1045 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.54"> | ||
1046 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.36/@value/@quantifiedVariables.0"/> | ||
1047 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.36/@value/@quantifiedVariables.2"/> | ||
1048 | </operands> | ||
1049 | </leftOperand> | ||
1050 | <rightOperand xsi:type="language_1:Not"> | ||
1051 | <operand xsi:type="language_1:Distinct"> | ||
1052 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.36/@value/@quantifiedVariables.1"/> | ||
1053 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.36/@value/@quantifiedVariables.2"/> | ||
1054 | </operand> | ||
1055 | </rightOperand> | ||
1056 | </expression> | ||
1057 | </value> | ||
1058 | </assertions> | ||
1059 | <assertions name="upperMultiplicity name ENamedElement" annotations="//@annotations.37"> | ||
1060 | <value xsi:type="language_1:Forall"> | ||
1061 | <quantifiedVariables name="src"> | ||
1062 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.8"/> | ||
1063 | </quantifiedVariables> | ||
1064 | <quantifiedVariables name="trg 1"> | ||
1065 | <range xsi:type="language_1:StringTypeReference"/> | ||
1066 | </quantifiedVariables> | ||
1067 | <quantifiedVariables name="trg 2"> | ||
1068 | <range xsi:type="language_1:StringTypeReference"/> | ||
1069 | </quantifiedVariables> | ||
1070 | <expression xsi:type="language_1:Impl"> | ||
1071 | <leftOperand xsi:type="language_1:And"> | ||
1072 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.55"> | ||
1073 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.37/@value/@quantifiedVariables.0"/> | ||
1074 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.37/@value/@quantifiedVariables.1"/> | ||
1075 | </operands> | ||
1076 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.55"> | ||
1077 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.37/@value/@quantifiedVariables.0"/> | ||
1078 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.37/@value/@quantifiedVariables.2"/> | ||
1079 | </operands> | ||
1080 | </leftOperand> | ||
1081 | <rightOperand xsi:type="language_1:Not"> | ||
1082 | <operand xsi:type="language_1:Distinct"> | ||
1083 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.37/@value/@quantifiedVariables.1"/> | ||
1084 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.37/@value/@quantifiedVariables.2"/> | ||
1085 | </operand> | ||
1086 | </rightOperand> | ||
1087 | </expression> | ||
1088 | </value> | ||
1089 | </assertions> | ||
1090 | <assertions name="upperMultiplicity nsURI EPackage" annotations="//@annotations.38"> | ||
1091 | <value xsi:type="language_1:Forall"> | ||
1092 | <quantifiedVariables name="src"> | ||
1093 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.11"/> | ||
1094 | </quantifiedVariables> | ||
1095 | <quantifiedVariables name="trg 1"> | ||
1096 | <range xsi:type="language_1:StringTypeReference"/> | ||
1097 | </quantifiedVariables> | ||
1098 | <quantifiedVariables name="trg 2"> | ||
1099 | <range xsi:type="language_1:StringTypeReference"/> | ||
1100 | </quantifiedVariables> | ||
1101 | <expression xsi:type="language_1:Impl"> | ||
1102 | <leftOperand xsi:type="language_1:And"> | ||
1103 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.56"> | ||
1104 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.38/@value/@quantifiedVariables.0"/> | ||
1105 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.38/@value/@quantifiedVariables.1"/> | ||
1106 | </operands> | ||
1107 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.56"> | ||
1108 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.38/@value/@quantifiedVariables.0"/> | ||
1109 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.38/@value/@quantifiedVariables.2"/> | ||
1110 | </operands> | ||
1111 | </leftOperand> | ||
1112 | <rightOperand xsi:type="language_1:Not"> | ||
1113 | <operand xsi:type="language_1:Distinct"> | ||
1114 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.38/@value/@quantifiedVariables.1"/> | ||
1115 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.38/@value/@quantifiedVariables.2"/> | ||
1116 | </operand> | ||
1117 | </rightOperand> | ||
1118 | </expression> | ||
1119 | </value> | ||
1120 | </assertions> | ||
1121 | <assertions name="upperMultiplicity nsPrefix EPackage" annotations="//@annotations.39"> | ||
1122 | <value xsi:type="language_1:Forall"> | ||
1123 | <quantifiedVariables name="src"> | ||
1124 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.11"/> | ||
1125 | </quantifiedVariables> | ||
1126 | <quantifiedVariables name="trg 1"> | ||
1127 | <range xsi:type="language_1:StringTypeReference"/> | ||
1128 | </quantifiedVariables> | ||
1129 | <quantifiedVariables name="trg 2"> | ||
1130 | <range xsi:type="language_1:StringTypeReference"/> | ||
1131 | </quantifiedVariables> | ||
1132 | <expression xsi:type="language_1:Impl"> | ||
1133 | <leftOperand xsi:type="language_1:And"> | ||
1134 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.57"> | ||
1135 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.39/@value/@quantifiedVariables.0"/> | ||
1136 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.39/@value/@quantifiedVariables.1"/> | ||
1137 | </operands> | ||
1138 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.57"> | ||
1139 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.39/@value/@quantifiedVariables.0"/> | ||
1140 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.39/@value/@quantifiedVariables.2"/> | ||
1141 | </operands> | ||
1142 | </leftOperand> | ||
1143 | <rightOperand xsi:type="language_1:Not"> | ||
1144 | <operand xsi:type="language_1:Distinct"> | ||
1145 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.39/@value/@quantifiedVariables.1"/> | ||
1146 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.39/@value/@quantifiedVariables.2"/> | ||
1147 | </operand> | ||
1148 | </rightOperand> | ||
1149 | </expression> | ||
1150 | </value> | ||
1151 | </assertions> | ||
1152 | <assertions name="upperMultiplicity containment EReference" annotations="//@annotations.40"> | ||
1153 | <value xsi:type="language_1:Forall"> | ||
1154 | <quantifiedVariables name="src"> | ||
1155 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.13"/> | ||
1156 | </quantifiedVariables> | ||
1157 | <quantifiedVariables name="trg 1"> | ||
1158 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1159 | </quantifiedVariables> | ||
1160 | <quantifiedVariables name="trg 2"> | ||
1161 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1162 | </quantifiedVariables> | ||
1163 | <expression xsi:type="language_1:Impl"> | ||
1164 | <leftOperand xsi:type="language_1:And"> | ||
1165 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.58"> | ||
1166 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.40/@value/@quantifiedVariables.0"/> | ||
1167 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.40/@value/@quantifiedVariables.1"/> | ||
1168 | </operands> | ||
1169 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.58"> | ||
1170 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.40/@value/@quantifiedVariables.0"/> | ||
1171 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.40/@value/@quantifiedVariables.2"/> | ||
1172 | </operands> | ||
1173 | </leftOperand> | ||
1174 | <rightOperand xsi:type="language_1:Not"> | ||
1175 | <operand xsi:type="language_1:Distinct"> | ||
1176 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.40/@value/@quantifiedVariables.1"/> | ||
1177 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.40/@value/@quantifiedVariables.2"/> | ||
1178 | </operand> | ||
1179 | </rightOperand> | ||
1180 | </expression> | ||
1181 | </value> | ||
1182 | </assertions> | ||
1183 | <assertions name="upperMultiplicity container EReference" annotations="//@annotations.41"> | ||
1184 | <value xsi:type="language_1:Forall"> | ||
1185 | <quantifiedVariables name="src"> | ||
1186 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.13"/> | ||
1187 | </quantifiedVariables> | ||
1188 | <quantifiedVariables name="trg 1"> | ||
1189 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1190 | </quantifiedVariables> | ||
1191 | <quantifiedVariables name="trg 2"> | ||
1192 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1193 | </quantifiedVariables> | ||
1194 | <expression xsi:type="language_1:Impl"> | ||
1195 | <leftOperand xsi:type="language_1:And"> | ||
1196 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.59"> | ||
1197 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.41/@value/@quantifiedVariables.0"/> | ||
1198 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.41/@value/@quantifiedVariables.1"/> | ||
1199 | </operands> | ||
1200 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.59"> | ||
1201 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.41/@value/@quantifiedVariables.0"/> | ||
1202 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.41/@value/@quantifiedVariables.2"/> | ||
1203 | </operands> | ||
1204 | </leftOperand> | ||
1205 | <rightOperand xsi:type="language_1:Not"> | ||
1206 | <operand xsi:type="language_1:Distinct"> | ||
1207 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.41/@value/@quantifiedVariables.1"/> | ||
1208 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.41/@value/@quantifiedVariables.2"/> | ||
1209 | </operand> | ||
1210 | </rightOperand> | ||
1211 | </expression> | ||
1212 | </value> | ||
1213 | </assertions> | ||
1214 | <assertions name="upperMultiplicity resolveProxies EReference" annotations="//@annotations.42"> | ||
1215 | <value xsi:type="language_1:Forall"> | ||
1216 | <quantifiedVariables name="src"> | ||
1217 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.13"/> | ||
1218 | </quantifiedVariables> | ||
1219 | <quantifiedVariables name="trg 1"> | ||
1220 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1221 | </quantifiedVariables> | ||
1222 | <quantifiedVariables name="trg 2"> | ||
1223 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1224 | </quantifiedVariables> | ||
1225 | <expression xsi:type="language_1:Impl"> | ||
1226 | <leftOperand xsi:type="language_1:And"> | ||
1227 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.60"> | ||
1228 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.42/@value/@quantifiedVariables.0"/> | ||
1229 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.42/@value/@quantifiedVariables.1"/> | ||
1230 | </operands> | ||
1231 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.60"> | ||
1232 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.42/@value/@quantifiedVariables.0"/> | ||
1233 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.42/@value/@quantifiedVariables.2"/> | ||
1234 | </operands> | ||
1235 | </leftOperand> | ||
1236 | <rightOperand xsi:type="language_1:Not"> | ||
1237 | <operand xsi:type="language_1:Distinct"> | ||
1238 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.42/@value/@quantifiedVariables.1"/> | ||
1239 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.42/@value/@quantifiedVariables.2"/> | ||
1240 | </operand> | ||
1241 | </rightOperand> | ||
1242 | </expression> | ||
1243 | </value> | ||
1244 | </assertions> | ||
1245 | <assertions name="upperMultiplicity changeable EStructuralFeature" annotations="//@annotations.43"> | ||
1246 | <value xsi:type="language_1:Forall"> | ||
1247 | <quantifiedVariables name="src"> | ||
1248 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.14"/> | ||
1249 | </quantifiedVariables> | ||
1250 | <quantifiedVariables name="trg 1"> | ||
1251 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1252 | </quantifiedVariables> | ||
1253 | <quantifiedVariables name="trg 2"> | ||
1254 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1255 | </quantifiedVariables> | ||
1256 | <expression xsi:type="language_1:Impl"> | ||
1257 | <leftOperand xsi:type="language_1:And"> | ||
1258 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.61"> | ||
1259 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.43/@value/@quantifiedVariables.0"/> | ||
1260 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.43/@value/@quantifiedVariables.1"/> | ||
1261 | </operands> | ||
1262 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.61"> | ||
1263 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.43/@value/@quantifiedVariables.0"/> | ||
1264 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.43/@value/@quantifiedVariables.2"/> | ||
1265 | </operands> | ||
1266 | </leftOperand> | ||
1267 | <rightOperand xsi:type="language_1:Not"> | ||
1268 | <operand xsi:type="language_1:Distinct"> | ||
1269 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.43/@value/@quantifiedVariables.1"/> | ||
1270 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.43/@value/@quantifiedVariables.2"/> | ||
1271 | </operand> | ||
1272 | </rightOperand> | ||
1273 | </expression> | ||
1274 | </value> | ||
1275 | </assertions> | ||
1276 | <assertions name="upperMultiplicity volatile EStructuralFeature" annotations="//@annotations.44"> | ||
1277 | <value xsi:type="language_1:Forall"> | ||
1278 | <quantifiedVariables name="src"> | ||
1279 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.14"/> | ||
1280 | </quantifiedVariables> | ||
1281 | <quantifiedVariables name="trg 1"> | ||
1282 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1283 | </quantifiedVariables> | ||
1284 | <quantifiedVariables name="trg 2"> | ||
1285 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1286 | </quantifiedVariables> | ||
1287 | <expression xsi:type="language_1:Impl"> | ||
1288 | <leftOperand xsi:type="language_1:And"> | ||
1289 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.62"> | ||
1290 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.44/@value/@quantifiedVariables.0"/> | ||
1291 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.44/@value/@quantifiedVariables.1"/> | ||
1292 | </operands> | ||
1293 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.62"> | ||
1294 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.44/@value/@quantifiedVariables.0"/> | ||
1295 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.44/@value/@quantifiedVariables.2"/> | ||
1296 | </operands> | ||
1297 | </leftOperand> | ||
1298 | <rightOperand xsi:type="language_1:Not"> | ||
1299 | <operand xsi:type="language_1:Distinct"> | ||
1300 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.44/@value/@quantifiedVariables.1"/> | ||
1301 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.44/@value/@quantifiedVariables.2"/> | ||
1302 | </operand> | ||
1303 | </rightOperand> | ||
1304 | </expression> | ||
1305 | </value> | ||
1306 | </assertions> | ||
1307 | <assertions name="upperMultiplicity transient EStructuralFeature" annotations="//@annotations.45"> | ||
1308 | <value xsi:type="language_1:Forall"> | ||
1309 | <quantifiedVariables name="src"> | ||
1310 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.14"/> | ||
1311 | </quantifiedVariables> | ||
1312 | <quantifiedVariables name="trg 1"> | ||
1313 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1314 | </quantifiedVariables> | ||
1315 | <quantifiedVariables name="trg 2"> | ||
1316 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1317 | </quantifiedVariables> | ||
1318 | <expression xsi:type="language_1:Impl"> | ||
1319 | <leftOperand xsi:type="language_1:And"> | ||
1320 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.63"> | ||
1321 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.45/@value/@quantifiedVariables.0"/> | ||
1322 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.45/@value/@quantifiedVariables.1"/> | ||
1323 | </operands> | ||
1324 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.63"> | ||
1325 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.45/@value/@quantifiedVariables.0"/> | ||
1326 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.45/@value/@quantifiedVariables.2"/> | ||
1327 | </operands> | ||
1328 | </leftOperand> | ||
1329 | <rightOperand xsi:type="language_1:Not"> | ||
1330 | <operand xsi:type="language_1:Distinct"> | ||
1331 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.45/@value/@quantifiedVariables.1"/> | ||
1332 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.45/@value/@quantifiedVariables.2"/> | ||
1333 | </operand> | ||
1334 | </rightOperand> | ||
1335 | </expression> | ||
1336 | </value> | ||
1337 | </assertions> | ||
1338 | <assertions name="upperMultiplicity defaultValueLiteral EStructuralFeature" annotations="//@annotations.46"> | ||
1339 | <value xsi:type="language_1:Forall"> | ||
1340 | <quantifiedVariables name="src"> | ||
1341 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.14"/> | ||
1342 | </quantifiedVariables> | ||
1343 | <quantifiedVariables name="trg 1"> | ||
1344 | <range xsi:type="language_1:StringTypeReference"/> | ||
1345 | </quantifiedVariables> | ||
1346 | <quantifiedVariables name="trg 2"> | ||
1347 | <range xsi:type="language_1:StringTypeReference"/> | ||
1348 | </quantifiedVariables> | ||
1349 | <expression xsi:type="language_1:Impl"> | ||
1350 | <leftOperand xsi:type="language_1:And"> | ||
1351 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.64"> | ||
1352 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.46/@value/@quantifiedVariables.0"/> | ||
1353 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.46/@value/@quantifiedVariables.1"/> | ||
1354 | </operands> | ||
1355 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.64"> | ||
1356 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.46/@value/@quantifiedVariables.0"/> | ||
1357 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.46/@value/@quantifiedVariables.2"/> | ||
1358 | </operands> | ||
1359 | </leftOperand> | ||
1360 | <rightOperand xsi:type="language_1:Not"> | ||
1361 | <operand xsi:type="language_1:Distinct"> | ||
1362 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.46/@value/@quantifiedVariables.1"/> | ||
1363 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.46/@value/@quantifiedVariables.2"/> | ||
1364 | </operand> | ||
1365 | </rightOperand> | ||
1366 | </expression> | ||
1367 | </value> | ||
1368 | </assertions> | ||
1369 | <assertions name="upperMultiplicity unsettable EStructuralFeature" annotations="//@annotations.47"> | ||
1370 | <value xsi:type="language_1:Forall"> | ||
1371 | <quantifiedVariables name="src"> | ||
1372 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.14"/> | ||
1373 | </quantifiedVariables> | ||
1374 | <quantifiedVariables name="trg 1"> | ||
1375 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1376 | </quantifiedVariables> | ||
1377 | <quantifiedVariables name="trg 2"> | ||
1378 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1379 | </quantifiedVariables> | ||
1380 | <expression xsi:type="language_1:Impl"> | ||
1381 | <leftOperand xsi:type="language_1:And"> | ||
1382 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.65"> | ||
1383 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.47/@value/@quantifiedVariables.0"/> | ||
1384 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.47/@value/@quantifiedVariables.1"/> | ||
1385 | </operands> | ||
1386 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.65"> | ||
1387 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.47/@value/@quantifiedVariables.0"/> | ||
1388 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.47/@value/@quantifiedVariables.2"/> | ||
1389 | </operands> | ||
1390 | </leftOperand> | ||
1391 | <rightOperand xsi:type="language_1:Not"> | ||
1392 | <operand xsi:type="language_1:Distinct"> | ||
1393 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.47/@value/@quantifiedVariables.1"/> | ||
1394 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.47/@value/@quantifiedVariables.2"/> | ||
1395 | </operand> | ||
1396 | </rightOperand> | ||
1397 | </expression> | ||
1398 | </value> | ||
1399 | </assertions> | ||
1400 | <assertions name="upperMultiplicity derived EStructuralFeature" annotations="//@annotations.48"> | ||
1401 | <value xsi:type="language_1:Forall"> | ||
1402 | <quantifiedVariables name="src"> | ||
1403 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.14"/> | ||
1404 | </quantifiedVariables> | ||
1405 | <quantifiedVariables name="trg 1"> | ||
1406 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1407 | </quantifiedVariables> | ||
1408 | <quantifiedVariables name="trg 2"> | ||
1409 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1410 | </quantifiedVariables> | ||
1411 | <expression xsi:type="language_1:Impl"> | ||
1412 | <leftOperand xsi:type="language_1:And"> | ||
1413 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.66"> | ||
1414 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.48/@value/@quantifiedVariables.0"/> | ||
1415 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.48/@value/@quantifiedVariables.1"/> | ||
1416 | </operands> | ||
1417 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.66"> | ||
1418 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.48/@value/@quantifiedVariables.0"/> | ||
1419 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.48/@value/@quantifiedVariables.2"/> | ||
1420 | </operands> | ||
1421 | </leftOperand> | ||
1422 | <rightOperand xsi:type="language_1:Not"> | ||
1423 | <operand xsi:type="language_1:Distinct"> | ||
1424 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.48/@value/@quantifiedVariables.1"/> | ||
1425 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.48/@value/@quantifiedVariables.2"/> | ||
1426 | </operand> | ||
1427 | </rightOperand> | ||
1428 | </expression> | ||
1429 | </value> | ||
1430 | </assertions> | ||
1431 | <assertions name="upperMultiplicity ordered ETypedElement" annotations="//@annotations.49"> | ||
1432 | <value xsi:type="language_1:Forall"> | ||
1433 | <quantifiedVariables name="src"> | ||
1434 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.15"/> | ||
1435 | </quantifiedVariables> | ||
1436 | <quantifiedVariables name="trg 1"> | ||
1437 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1438 | </quantifiedVariables> | ||
1439 | <quantifiedVariables name="trg 2"> | ||
1440 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1441 | </quantifiedVariables> | ||
1442 | <expression xsi:type="language_1:Impl"> | ||
1443 | <leftOperand xsi:type="language_1:And"> | ||
1444 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.67"> | ||
1445 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.49/@value/@quantifiedVariables.0"/> | ||
1446 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.49/@value/@quantifiedVariables.1"/> | ||
1447 | </operands> | ||
1448 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.67"> | ||
1449 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.49/@value/@quantifiedVariables.0"/> | ||
1450 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.49/@value/@quantifiedVariables.2"/> | ||
1451 | </operands> | ||
1452 | </leftOperand> | ||
1453 | <rightOperand xsi:type="language_1:Not"> | ||
1454 | <operand xsi:type="language_1:Distinct"> | ||
1455 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.49/@value/@quantifiedVariables.1"/> | ||
1456 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.49/@value/@quantifiedVariables.2"/> | ||
1457 | </operand> | ||
1458 | </rightOperand> | ||
1459 | </expression> | ||
1460 | </value> | ||
1461 | </assertions> | ||
1462 | <assertions name="upperMultiplicity unique ETypedElement" annotations="//@annotations.50"> | ||
1463 | <value xsi:type="language_1:Forall"> | ||
1464 | <quantifiedVariables name="src"> | ||
1465 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.15"/> | ||
1466 | </quantifiedVariables> | ||
1467 | <quantifiedVariables name="trg 1"> | ||
1468 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1469 | </quantifiedVariables> | ||
1470 | <quantifiedVariables name="trg 2"> | ||
1471 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1472 | </quantifiedVariables> | ||
1473 | <expression xsi:type="language_1:Impl"> | ||
1474 | <leftOperand xsi:type="language_1:And"> | ||
1475 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.68"> | ||
1476 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.50/@value/@quantifiedVariables.0"/> | ||
1477 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.50/@value/@quantifiedVariables.1"/> | ||
1478 | </operands> | ||
1479 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.68"> | ||
1480 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.50/@value/@quantifiedVariables.0"/> | ||
1481 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.50/@value/@quantifiedVariables.2"/> | ||
1482 | </operands> | ||
1483 | </leftOperand> | ||
1484 | <rightOperand xsi:type="language_1:Not"> | ||
1485 | <operand xsi:type="language_1:Distinct"> | ||
1486 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.50/@value/@quantifiedVariables.1"/> | ||
1487 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.50/@value/@quantifiedVariables.2"/> | ||
1488 | </operand> | ||
1489 | </rightOperand> | ||
1490 | </expression> | ||
1491 | </value> | ||
1492 | </assertions> | ||
1493 | <assertions name="upperMultiplicity lowerBound ETypedElement" annotations="//@annotations.51"> | ||
1494 | <value xsi:type="language_1:Forall"> | ||
1495 | <quantifiedVariables name="src"> | ||
1496 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.15"/> | ||
1497 | </quantifiedVariables> | ||
1498 | <quantifiedVariables name="trg 1"> | ||
1499 | <range xsi:type="language_1:IntTypeReference"/> | ||
1500 | </quantifiedVariables> | ||
1501 | <quantifiedVariables name="trg 2"> | ||
1502 | <range xsi:type="language_1:IntTypeReference"/> | ||
1503 | </quantifiedVariables> | ||
1504 | <expression xsi:type="language_1:Impl"> | ||
1505 | <leftOperand xsi:type="language_1:And"> | ||
1506 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.69"> | ||
1507 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.51/@value/@quantifiedVariables.0"/> | ||
1508 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.51/@value/@quantifiedVariables.1"/> | ||
1509 | </operands> | ||
1510 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.69"> | ||
1511 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.51/@value/@quantifiedVariables.0"/> | ||
1512 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.51/@value/@quantifiedVariables.2"/> | ||
1513 | </operands> | ||
1514 | </leftOperand> | ||
1515 | <rightOperand xsi:type="language_1:Not"> | ||
1516 | <operand xsi:type="language_1:Distinct"> | ||
1517 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.51/@value/@quantifiedVariables.1"/> | ||
1518 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.51/@value/@quantifiedVariables.2"/> | ||
1519 | </operand> | ||
1520 | </rightOperand> | ||
1521 | </expression> | ||
1522 | </value> | ||
1523 | </assertions> | ||
1524 | <assertions name="upperMultiplicity upperBound ETypedElement" annotations="//@annotations.52"> | ||
1525 | <value xsi:type="language_1:Forall"> | ||
1526 | <quantifiedVariables name="src"> | ||
1527 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.15"/> | ||
1528 | </quantifiedVariables> | ||
1529 | <quantifiedVariables name="trg 1"> | ||
1530 | <range xsi:type="language_1:IntTypeReference"/> | ||
1531 | </quantifiedVariables> | ||
1532 | <quantifiedVariables name="trg 2"> | ||
1533 | <range xsi:type="language_1:IntTypeReference"/> | ||
1534 | </quantifiedVariables> | ||
1535 | <expression xsi:type="language_1:Impl"> | ||
1536 | <leftOperand xsi:type="language_1:And"> | ||
1537 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.70"> | ||
1538 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.52/@value/@quantifiedVariables.0"/> | ||
1539 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.52/@value/@quantifiedVariables.1"/> | ||
1540 | </operands> | ||
1541 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.70"> | ||
1542 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.52/@value/@quantifiedVariables.0"/> | ||
1543 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.52/@value/@quantifiedVariables.2"/> | ||
1544 | </operands> | ||
1545 | </leftOperand> | ||
1546 | <rightOperand xsi:type="language_1:Not"> | ||
1547 | <operand xsi:type="language_1:Distinct"> | ||
1548 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.52/@value/@quantifiedVariables.1"/> | ||
1549 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.52/@value/@quantifiedVariables.2"/> | ||
1550 | </operand> | ||
1551 | </rightOperand> | ||
1552 | </expression> | ||
1553 | </value> | ||
1554 | </assertions> | ||
1555 | <assertions name="upperMultiplicity many ETypedElement" annotations="//@annotations.53"> | ||
1556 | <value xsi:type="language_1:Forall"> | ||
1557 | <quantifiedVariables name="src"> | ||
1558 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.15"/> | ||
1559 | </quantifiedVariables> | ||
1560 | <quantifiedVariables name="trg 1"> | ||
1561 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1562 | </quantifiedVariables> | ||
1563 | <quantifiedVariables name="trg 2"> | ||
1564 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1565 | </quantifiedVariables> | ||
1566 | <expression xsi:type="language_1:Impl"> | ||
1567 | <leftOperand xsi:type="language_1:And"> | ||
1568 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.71"> | ||
1569 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.53/@value/@quantifiedVariables.0"/> | ||
1570 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.53/@value/@quantifiedVariables.1"/> | ||
1571 | </operands> | ||
1572 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.71"> | ||
1573 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.53/@value/@quantifiedVariables.0"/> | ||
1574 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.53/@value/@quantifiedVariables.2"/> | ||
1575 | </operands> | ||
1576 | </leftOperand> | ||
1577 | <rightOperand xsi:type="language_1:Not"> | ||
1578 | <operand xsi:type="language_1:Distinct"> | ||
1579 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.53/@value/@quantifiedVariables.1"/> | ||
1580 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.53/@value/@quantifiedVariables.2"/> | ||
1581 | </operand> | ||
1582 | </rightOperand> | ||
1583 | </expression> | ||
1584 | </value> | ||
1585 | </assertions> | ||
1586 | <assertions name="upperMultiplicity required ETypedElement" annotations="//@annotations.54"> | ||
1587 | <value xsi:type="language_1:Forall"> | ||
1588 | <quantifiedVariables name="src"> | ||
1589 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.15"/> | ||
1590 | </quantifiedVariables> | ||
1591 | <quantifiedVariables name="trg 1"> | ||
1592 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1593 | </quantifiedVariables> | ||
1594 | <quantifiedVariables name="trg 2"> | ||
1595 | <range xsi:type="language_1:BoolTypeReference"/> | ||
1596 | </quantifiedVariables> | ||
1597 | <expression xsi:type="language_1:Impl"> | ||
1598 | <leftOperand xsi:type="language_1:And"> | ||
1599 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.72"> | ||
1600 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.54/@value/@quantifiedVariables.0"/> | ||
1601 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.54/@value/@quantifiedVariables.1"/> | ||
1602 | </operands> | ||
1603 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.72"> | ||
1604 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.54/@value/@quantifiedVariables.0"/> | ||
1605 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.54/@value/@quantifiedVariables.2"/> | ||
1606 | </operands> | ||
1607 | </leftOperand> | ||
1608 | <rightOperand xsi:type="language_1:Not"> | ||
1609 | <operand xsi:type="language_1:Distinct"> | ||
1610 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.54/@value/@quantifiedVariables.1"/> | ||
1611 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.54/@value/@quantifiedVariables.2"/> | ||
1612 | </operand> | ||
1613 | </rightOperand> | ||
1614 | </expression> | ||
1615 | </value> | ||
1616 | </assertions> | ||
1617 | <assertions name="upperMultiplicity key EStringToStringMapEntry" annotations="//@annotations.55"> | ||
1618 | <value xsi:type="language_1:Forall"> | ||
1619 | <quantifiedVariables name="src"> | ||
1620 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.16"/> | ||
1621 | </quantifiedVariables> | ||
1622 | <quantifiedVariables name="trg 1"> | ||
1623 | <range xsi:type="language_1:StringTypeReference"/> | ||
1624 | </quantifiedVariables> | ||
1625 | <quantifiedVariables name="trg 2"> | ||
1626 | <range xsi:type="language_1:StringTypeReference"/> | ||
1627 | </quantifiedVariables> | ||
1628 | <expression xsi:type="language_1:Impl"> | ||
1629 | <leftOperand xsi:type="language_1:And"> | ||
1630 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.73"> | ||
1631 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.55/@value/@quantifiedVariables.0"/> | ||
1632 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.55/@value/@quantifiedVariables.1"/> | ||
1633 | </operands> | ||
1634 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.73"> | ||
1635 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.55/@value/@quantifiedVariables.0"/> | ||
1636 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.55/@value/@quantifiedVariables.2"/> | ||
1637 | </operands> | ||
1638 | </leftOperand> | ||
1639 | <rightOperand xsi:type="language_1:Not"> | ||
1640 | <operand xsi:type="language_1:Distinct"> | ||
1641 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.55/@value/@quantifiedVariables.1"/> | ||
1642 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.55/@value/@quantifiedVariables.2"/> | ||
1643 | </operand> | ||
1644 | </rightOperand> | ||
1645 | </expression> | ||
1646 | </value> | ||
1647 | </assertions> | ||
1648 | <assertions name="upperMultiplicity value EStringToStringMapEntry" annotations="//@annotations.56"> | ||
1649 | <value xsi:type="language_1:Forall"> | ||
1650 | <quantifiedVariables name="src"> | ||
1651 | <range xsi:type="language_1:ComplexTypeReference" referred="//@types.16"/> | ||
1652 | </quantifiedVariables> | ||
1653 | <quantifiedVariables name="trg 1"> | ||
1654 | <range xsi:type="language_1:StringTypeReference"/> | ||
1655 | </quantifiedVariables> | ||
1656 | <quantifiedVariables name="trg 2"> | ||
1657 | <range xsi:type="language_1:StringTypeReference"/> | ||
1658 | </quantifiedVariables> | ||
1659 | <expression xsi:type="language_1:Impl"> | ||
1660 | <leftOperand xsi:type="language_1:And"> | ||
1661 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.74"> | ||
1662 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.56/@value/@quantifiedVariables.0"/> | ||
1663 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.56/@value/@quantifiedVariables.1"/> | ||
1664 | </operands> | ||
1665 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.74"> | ||
1666 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.56/@value/@quantifiedVariables.0"/> | ||
1667 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.56/@value/@quantifiedVariables.2"/> | ||
1668 | </operands> | ||
1669 | </leftOperand> | ||
1670 | <rightOperand xsi:type="language_1:Not"> | ||
1671 | <operand xsi:type="language_1:Distinct"> | ||
1672 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.56/@value/@quantifiedVariables.1"/> | ||
1673 | <operands xsi:type="language_1:SymbolicValue" symbolicReference="//@assertions.56/@value/@quantifiedVariables.2"/> | ||
1674 | </operand> | ||
1675 | </rightOperand> | ||
1676 | </expression> | ||
1677 | </value> | ||
1678 | </assertions> | ||
1679 | <assertions name="PartialInterpretation name attribute ENamedElement" annotations="//@annotations.57"> | ||
1680 | <value xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.55"> | ||
1681 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@elements.0"/> | ||
1682 | <parameterSubstitutions xsi:type="language_1:StringLiteral" value="packageName"/> | ||
1683 | </value> | ||
1684 | </assertions> | ||
1685 | <assertions name="PartialInterpretation nsURI attribute EPackage" annotations="//@annotations.58"> | ||
1686 | <value xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.56"> | ||
1687 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@elements.0"/> | ||
1688 | <parameterSubstitutions xsi:type="language_1:StringLiteral" value="nsUri"/> | ||
1689 | </value> | ||
1690 | </assertions> | ||
1691 | <assertions name="PartialInterpretation nsPrefix attribute EPackage" annotations="//@annotations.59"> | ||
1692 | <value xsi:type="language_1:SymbolicValue" symbolicReference="//@relations.57"> | ||
1693 | <parameterSubstitutions xsi:type="language_1:SymbolicValue" symbolicReference="//@elements.0"/> | ||
1694 | <parameterSubstitutions xsi:type="language_1:StringLiteral" value="nsPrefix"/> | ||
1695 | </value> | ||
1696 | </assertions> | ||
1697 | <relations xsi:type="language_1:RelationDeclaration" name="eAttributeType reference EAttribute"> | ||
1698 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/> | ||
1699 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.4"/> | ||
1700 | </relations> | ||
1701 | <relations xsi:type="language_1:RelationDeclaration" name="details reference EAnnotation"> | ||
1702 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.1"/> | ||
1703 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.16"/> | ||
1704 | </relations> | ||
1705 | <relations xsi:type="language_1:RelationDeclaration" name="eModelElement reference EAnnotation"> | ||
1706 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.1"/> | ||
1707 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.7"/> | ||
1708 | </relations> | ||
1709 | <relations xsi:type="language_1:RelationDeclaration" name="contents reference EAnnotation"> | ||
1710 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.1"/> | ||
1711 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.9"/> | ||
1712 | </relations> | ||
1713 | <relations xsi:type="language_1:RelationDeclaration" name="references reference EAnnotation"> | ||
1714 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.1"/> | ||
1715 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.9"/> | ||
1716 | </relations> | ||
1717 | <relations xsi:type="language_1:RelationDeclaration" name="eSuperTypes reference EClass"> | ||
1718 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
1719 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
1720 | </relations> | ||
1721 | <relations xsi:type="language_1:RelationDeclaration" name="eOperations reference EClass"> | ||
1722 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
1723 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.10"/> | ||
1724 | </relations> | ||
1725 | <relations xsi:type="language_1:RelationDeclaration" name="eAllAttributes reference EClass"> | ||
1726 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
1727 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/> | ||
1728 | </relations> | ||
1729 | <relations xsi:type="language_1:RelationDeclaration" name="eAllReferences reference EClass"> | ||
1730 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
1731 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.13"/> | ||
1732 | </relations> | ||
1733 | <relations xsi:type="language_1:RelationDeclaration" name="eReferences reference EClass"> | ||
1734 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
1735 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.13"/> | ||
1736 | </relations> | ||
1737 | <relations xsi:type="language_1:RelationDeclaration" name="eAttributes reference EClass"> | ||
1738 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
1739 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/> | ||
1740 | </relations> | ||
1741 | <relations xsi:type="language_1:RelationDeclaration" name="eAllContainments reference EClass"> | ||
1742 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
1743 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.13"/> | ||
1744 | </relations> | ||
1745 | <relations xsi:type="language_1:RelationDeclaration" name="eAllOperations reference EClass"> | ||
1746 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
1747 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.10"/> | ||
1748 | </relations> | ||
1749 | <relations xsi:type="language_1:RelationDeclaration" name="eAllStructuralFeatures reference EClass"> | ||
1750 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
1751 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.14"/> | ||
1752 | </relations> | ||
1753 | <relations xsi:type="language_1:RelationDeclaration" name="eAllSuperTypes reference EClass"> | ||
1754 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
1755 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
1756 | </relations> | ||
1757 | <relations xsi:type="language_1:RelationDeclaration" name="eIDAttribute reference EClass"> | ||
1758 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
1759 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/> | ||
1760 | </relations> | ||
1761 | <relations xsi:type="language_1:RelationDeclaration" name="eStructuralFeatures reference EClass"> | ||
1762 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
1763 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.14"/> | ||
1764 | </relations> | ||
1765 | <relations xsi:type="language_1:RelationDeclaration" name="eGenericSuperTypes reference EClass"> | ||
1766 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
1767 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
1768 | </relations> | ||
1769 | <relations xsi:type="language_1:RelationDeclaration" name="eAllGenericSuperTypes reference EClass"> | ||
1770 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
1771 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
1772 | </relations> | ||
1773 | <relations xsi:type="language_1:RelationDeclaration" name="ePackage reference EClassifier"> | ||
1774 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/> | ||
1775 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.11"/> | ||
1776 | </relations> | ||
1777 | <relations xsi:type="language_1:RelationDeclaration" name="eTypeParameters reference EClassifier"> | ||
1778 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/> | ||
1779 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.18"/> | ||
1780 | </relations> | ||
1781 | <relations xsi:type="language_1:RelationDeclaration" name="eLiterals reference EEnum"> | ||
1782 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.5"/> | ||
1783 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.6"/> | ||
1784 | </relations> | ||
1785 | <relations xsi:type="language_1:RelationDeclaration" name="eEnum reference EEnumLiteral"> | ||
1786 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.6"/> | ||
1787 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.5"/> | ||
1788 | </relations> | ||
1789 | <relations xsi:type="language_1:RelationDeclaration" name="eAnnotations reference EModelElement"> | ||
1790 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.7"/> | ||
1791 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.1"/> | ||
1792 | </relations> | ||
1793 | <relations xsi:type="language_1:RelationDeclaration" name="eContainingClass reference EOperation"> | ||
1794 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.10"/> | ||
1795 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
1796 | </relations> | ||
1797 | <relations xsi:type="language_1:RelationDeclaration" name="eTypeParameters reference EOperation"> | ||
1798 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.10"/> | ||
1799 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.18"/> | ||
1800 | </relations> | ||
1801 | <relations xsi:type="language_1:RelationDeclaration" name="eParameters reference EOperation"> | ||
1802 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.10"/> | ||
1803 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.12"/> | ||
1804 | </relations> | ||
1805 | <relations xsi:type="language_1:RelationDeclaration" name="eExceptions reference EOperation"> | ||
1806 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.10"/> | ||
1807 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/> | ||
1808 | </relations> | ||
1809 | <relations xsi:type="language_1:RelationDeclaration" name="eGenericExceptions reference EOperation"> | ||
1810 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.10"/> | ||
1811 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
1812 | </relations> | ||
1813 | <relations xsi:type="language_1:RelationDeclaration" name="eClassifiers reference EPackage"> | ||
1814 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.11"/> | ||
1815 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/> | ||
1816 | </relations> | ||
1817 | <relations xsi:type="language_1:RelationDeclaration" name="eSubpackages reference EPackage"> | ||
1818 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.11"/> | ||
1819 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.11"/> | ||
1820 | </relations> | ||
1821 | <relations xsi:type="language_1:RelationDeclaration" name="eSuperPackage reference EPackage"> | ||
1822 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.11"/> | ||
1823 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.11"/> | ||
1824 | </relations> | ||
1825 | <relations xsi:type="language_1:RelationDeclaration" name="eOperation reference EParameter"> | ||
1826 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.12"/> | ||
1827 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.10"/> | ||
1828 | </relations> | ||
1829 | <relations xsi:type="language_1:RelationDeclaration" name="eOpposite reference EReference"> | ||
1830 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.13"/> | ||
1831 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.13"/> | ||
1832 | </relations> | ||
1833 | <relations xsi:type="language_1:RelationDeclaration" name="eReferenceType reference EReference"> | ||
1834 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.13"/> | ||
1835 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
1836 | </relations> | ||
1837 | <relations xsi:type="language_1:RelationDeclaration" name="eKeys reference EReference"> | ||
1838 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.13"/> | ||
1839 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/> | ||
1840 | </relations> | ||
1841 | <relations xsi:type="language_1:RelationDeclaration" name="eContainingClass reference EStructuralFeature"> | ||
1842 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.14"/> | ||
1843 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
1844 | </relations> | ||
1845 | <relations xsi:type="language_1:RelationDeclaration" name="eType reference ETypedElement"> | ||
1846 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.15"/> | ||
1847 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/> | ||
1848 | </relations> | ||
1849 | <relations xsi:type="language_1:RelationDeclaration" name="eGenericType reference ETypedElement"> | ||
1850 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.15"/> | ||
1851 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
1852 | </relations> | ||
1853 | <relations xsi:type="language_1:RelationDeclaration" name="eUpperBound reference EGenericType"> | ||
1854 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
1855 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
1856 | </relations> | ||
1857 | <relations xsi:type="language_1:RelationDeclaration" name="eTypeArguments reference EGenericType"> | ||
1858 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
1859 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
1860 | </relations> | ||
1861 | <relations xsi:type="language_1:RelationDeclaration" name="eRawType reference EGenericType"> | ||
1862 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
1863 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/> | ||
1864 | </relations> | ||
1865 | <relations xsi:type="language_1:RelationDeclaration" name="eLowerBound reference EGenericType"> | ||
1866 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
1867 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
1868 | </relations> | ||
1869 | <relations xsi:type="language_1:RelationDeclaration" name="eTypeParameter reference EGenericType"> | ||
1870 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
1871 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.18"/> | ||
1872 | </relations> | ||
1873 | <relations xsi:type="language_1:RelationDeclaration" name="eClassifier reference EGenericType"> | ||
1874 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
1875 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/> | ||
1876 | </relations> | ||
1877 | <relations xsi:type="language_1:RelationDeclaration" name="eBounds reference ETypeParameter"> | ||
1878 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.18"/> | ||
1879 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.17"/> | ||
1880 | </relations> | ||
1881 | <relations xsi:type="language_1:RelationDeclaration" name="iD attribute EAttribute"> | ||
1882 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.0"/> | ||
1883 | <parameters xsi:type="language_1:BoolTypeReference"/> | ||
1884 | </relations> | ||
1885 | <relations xsi:type="language_1:RelationDeclaration" name="source attribute EAnnotation"> | ||
1886 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.1"/> | ||
1887 | <parameters xsi:type="language_1:StringTypeReference"/> | ||
1888 | </relations> | ||
1889 | <relations xsi:type="language_1:RelationDeclaration" name="abstract attribute EClass"> | ||
1890 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
1891 | <parameters xsi:type="language_1:BoolTypeReference"/> | ||
1892 | </relations> | ||
1893 | <relations xsi:type="language_1:RelationDeclaration" name="interface attribute EClass"> | ||
1894 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.2"/> | ||
1895 | <parameters xsi:type="language_1:BoolTypeReference"/> | ||
1896 | </relations> | ||
1897 | <relations xsi:type="language_1:RelationDeclaration" name="instanceClassName attribute EClassifier"> | ||
1898 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/> | ||
1899 | <parameters xsi:type="language_1:StringTypeReference"/> | ||
1900 | </relations> | ||
1901 | <relations xsi:type="language_1:RelationDeclaration" name="instanceTypeName attribute EClassifier"> | ||
1902 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.3"/> | ||
1903 | <parameters xsi:type="language_1:StringTypeReference"/> | ||
1904 | </relations> | ||
1905 | <relations xsi:type="language_1:RelationDeclaration" name="serializable attribute EDataType"> | ||
1906 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.4"/> | ||
1907 | <parameters xsi:type="language_1:BoolTypeReference"/> | ||
1908 | </relations> | ||
1909 | <relations xsi:type="language_1:RelationDeclaration" name="value attribute EEnumLiteral"> | ||
1910 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.6"/> | ||
1911 | <parameters xsi:type="language_1:IntTypeReference"/> | ||
1912 | </relations> | ||
1913 | <relations xsi:type="language_1:RelationDeclaration" name="literal attribute EEnumLiteral"> | ||
1914 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.6"/> | ||
1915 | <parameters xsi:type="language_1:StringTypeReference"/> | ||
1916 | </relations> | ||
1917 | <relations xsi:type="language_1:RelationDeclaration" name="name attribute ENamedElement"> | ||
1918 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.8"/> | ||
1919 | <parameters xsi:type="language_1:StringTypeReference"/> | ||
1920 | </relations> | ||
1921 | <relations xsi:type="language_1:RelationDeclaration" name="nsURI attribute EPackage"> | ||
1922 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.11"/> | ||
1923 | <parameters xsi:type="language_1:StringTypeReference"/> | ||
1924 | </relations> | ||
1925 | <relations xsi:type="language_1:RelationDeclaration" name="nsPrefix attribute EPackage"> | ||
1926 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.11"/> | ||
1927 | <parameters xsi:type="language_1:StringTypeReference"/> | ||
1928 | </relations> | ||
1929 | <relations xsi:type="language_1:RelationDeclaration" name="containment attribute EReference"> | ||
1930 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.13"/> | ||
1931 | <parameters xsi:type="language_1:BoolTypeReference"/> | ||
1932 | </relations> | ||
1933 | <relations xsi:type="language_1:RelationDeclaration" name="container attribute EReference"> | ||
1934 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.13"/> | ||
1935 | <parameters xsi:type="language_1:BoolTypeReference"/> | ||
1936 | </relations> | ||
1937 | <relations xsi:type="language_1:RelationDeclaration" name="resolveProxies attribute EReference"> | ||
1938 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.13"/> | ||
1939 | <parameters xsi:type="language_1:BoolTypeReference"/> | ||
1940 | </relations> | ||
1941 | <relations xsi:type="language_1:RelationDeclaration" name="changeable attribute EStructuralFeature"> | ||
1942 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.14"/> | ||
1943 | <parameters xsi:type="language_1:BoolTypeReference"/> | ||
1944 | </relations> | ||
1945 | <relations xsi:type="language_1:RelationDeclaration" name="volatile attribute EStructuralFeature"> | ||
1946 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.14"/> | ||
1947 | <parameters xsi:type="language_1:BoolTypeReference"/> | ||
1948 | </relations> | ||
1949 | <relations xsi:type="language_1:RelationDeclaration" name="transient attribute EStructuralFeature"> | ||
1950 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.14"/> | ||
1951 | <parameters xsi:type="language_1:BoolTypeReference"/> | ||
1952 | </relations> | ||
1953 | <relations xsi:type="language_1:RelationDeclaration" name="defaultValueLiteral attribute EStructuralFeature"> | ||
1954 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.14"/> | ||
1955 | <parameters xsi:type="language_1:StringTypeReference"/> | ||
1956 | </relations> | ||
1957 | <relations xsi:type="language_1:RelationDeclaration" name="unsettable attribute EStructuralFeature"> | ||
1958 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.14"/> | ||
1959 | <parameters xsi:type="language_1:BoolTypeReference"/> | ||
1960 | </relations> | ||
1961 | <relations xsi:type="language_1:RelationDeclaration" name="derived attribute EStructuralFeature"> | ||
1962 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.14"/> | ||
1963 | <parameters xsi:type="language_1:BoolTypeReference"/> | ||
1964 | </relations> | ||
1965 | <relations xsi:type="language_1:RelationDeclaration" name="ordered attribute ETypedElement"> | ||
1966 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.15"/> | ||
1967 | <parameters xsi:type="language_1:BoolTypeReference"/> | ||
1968 | </relations> | ||
1969 | <relations xsi:type="language_1:RelationDeclaration" name="unique attribute ETypedElement"> | ||
1970 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.15"/> | ||
1971 | <parameters xsi:type="language_1:BoolTypeReference"/> | ||
1972 | </relations> | ||
1973 | <relations xsi:type="language_1:RelationDeclaration" name="lowerBound attribute ETypedElement"> | ||
1974 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.15"/> | ||
1975 | <parameters xsi:type="language_1:IntTypeReference"/> | ||
1976 | </relations> | ||
1977 | <relations xsi:type="language_1:RelationDeclaration" name="upperBound attribute ETypedElement"> | ||
1978 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.15"/> | ||
1979 | <parameters xsi:type="language_1:IntTypeReference"/> | ||
1980 | </relations> | ||
1981 | <relations xsi:type="language_1:RelationDeclaration" name="many attribute ETypedElement"> | ||
1982 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.15"/> | ||
1983 | <parameters xsi:type="language_1:BoolTypeReference"/> | ||
1984 | </relations> | ||
1985 | <relations xsi:type="language_1:RelationDeclaration" name="required attribute ETypedElement"> | ||
1986 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.15"/> | ||
1987 | <parameters xsi:type="language_1:BoolTypeReference"/> | ||
1988 | </relations> | ||
1989 | <relations xsi:type="language_1:RelationDeclaration" name="key attribute EStringToStringMapEntry"> | ||
1990 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.16"/> | ||
1991 | <parameters xsi:type="language_1:StringTypeReference"/> | ||
1992 | </relations> | ||
1993 | <relations xsi:type="language_1:RelationDeclaration" name="value attribute EStringToStringMapEntry"> | ||
1994 | <parameters xsi:type="language_1:ComplexTypeReference" referred="//@types.16"/> | ||
1995 | <parameters xsi:type="language_1:StringTypeReference"/> | ||
1996 | </relations> | ||
1997 | <elements name="o 1" definedInType="//@types.19 //@types.21 //@types.23"/> | ||
1998 | <containmentHierarchies typesOrderedInHierarchy="//@types.7 //@types.5 //@types.0 //@types.9 //@types.2 //@types.3 //@types.6 //@types.11 //@types.10 //@types.16 //@types.13 //@types.1 //@types.15 //@types.14 //@types.4 //@types.12 //@types.8 //@types.17 //@types.18 //@types.19 //@types.20 //@types.21 //@types.22 //@types.23 //@types.24" containmentRelations="//@relations.1 //@relations.3 //@relations.6 //@relations.16 //@relations.17 //@relations.20 //@relations.21 //@relations.23 //@relations.25 //@relations.26 //@relations.28 //@relations.29 //@relations.30 //@relations.38 //@relations.39 //@relations.40 //@relations.42 //@relations.45"/> | ||
1999 | <annotations xsi:type="ecore2logicannotations:LowerMultiplicityAssertion" target="//@assertions.0" relation="//@relations.0" lower="1"/> | ||
2000 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.1" relation="//@relations.0" upper="1"/> | ||
2001 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.2" relation="//@relations.2" upper="1"/> | ||
2002 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.3" relation="//@relations.15" upper="1"/> | ||
2003 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.4" relation="//@relations.19" upper="1"/> | ||
2004 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.5" relation="//@relations.22" upper="1"/> | ||
2005 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.6" relation="//@relations.24" upper="1"/> | ||
2006 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.7" relation="//@relations.31" upper="1"/> | ||
2007 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.8" relation="//@relations.32" upper="1"/> | ||
2008 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.9" relation="//@relations.33" upper="1"/> | ||
2009 | <annotations xsi:type="ecore2logicannotations:LowerMultiplicityAssertion" target="//@assertions.10" relation="//@relations.34" lower="1"/> | ||
2010 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.11" relation="//@relations.34" upper="1"/> | ||
2011 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.12" relation="//@relations.36" upper="1"/> | ||
2012 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.13" relation="//@relations.37" upper="1"/> | ||
2013 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.14" relation="//@relations.38" upper="1"/> | ||
2014 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.15" relation="//@relations.39" upper="1"/> | ||
2015 | <annotations xsi:type="ecore2logicannotations:LowerMultiplicityAssertion" target="//@assertions.16" relation="//@relations.41" lower="1"/> | ||
2016 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.17" relation="//@relations.41" upper="1"/> | ||
2017 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.18" relation="//@relations.42" upper="1"/> | ||
2018 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.19" relation="//@relations.43" upper="1"/> | ||
2019 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.20" relation="//@relations.44" upper="1"/> | ||
2020 | <annotations xsi:type="ecore2logicannotations:InverseRelationAssertion" target="//@assertions.21" inverseA="//@relations.2" inverseB="//@relations.23"/> | ||
2021 | <annotations xsi:type="ecore2logicannotations:InverseRelationAssertion" target="//@assertions.22" inverseA="//@relations.6" inverseB="//@relations.24"/> | ||
2022 | <annotations xsi:type="ecore2logicannotations:InverseRelationAssertion" target="//@assertions.23" inverseA="//@relations.16" inverseB="//@relations.36"/> | ||
2023 | <annotations xsi:type="ecore2logicannotations:InverseRelationAssertion" target="//@assertions.24" inverseA="//@relations.19" inverseB="//@relations.29"/> | ||
2024 | <annotations xsi:type="ecore2logicannotations:InverseRelationAssertion" target="//@assertions.25" inverseA="//@relations.21" inverseB="//@relations.22"/> | ||
2025 | <annotations xsi:type="ecore2logicannotations:InverseRelationAssertion" target="//@assertions.26" inverseA="//@relations.26" inverseB="//@relations.32"/> | ||
2026 | <annotations xsi:type="ecore2logicannotations:InverseRelationAssertion" target="//@assertions.27" inverseA="//@relations.30" inverseB="//@relations.31"/> | ||
2027 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.28" relation="//@relations.46" upper="1"/> | ||
2028 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.29" relation="//@relations.47" upper="1"/> | ||
2029 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.30" relation="//@relations.48" upper="1"/> | ||
2030 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.31" relation="//@relations.49" upper="1"/> | ||
2031 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.32" relation="//@relations.50" upper="1"/> | ||
2032 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.33" relation="//@relations.51" upper="1"/> | ||
2033 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.34" relation="//@relations.52" upper="1"/> | ||
2034 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.35" relation="//@relations.53" upper="1"/> | ||
2035 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.36" relation="//@relations.54" upper="1"/> | ||
2036 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.37" relation="//@relations.55" upper="1"/> | ||
2037 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.38" relation="//@relations.56" upper="1"/> | ||
2038 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.39" relation="//@relations.57" upper="1"/> | ||
2039 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.40" relation="//@relations.58" upper="1"/> | ||
2040 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.41" relation="//@relations.59" upper="1"/> | ||
2041 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.42" relation="//@relations.60" upper="1"/> | ||
2042 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.43" relation="//@relations.61" upper="1"/> | ||
2043 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.44" relation="//@relations.62" upper="1"/> | ||
2044 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.45" relation="//@relations.63" upper="1"/> | ||
2045 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.46" relation="//@relations.64" upper="1"/> | ||
2046 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.47" relation="//@relations.65" upper="1"/> | ||
2047 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.48" relation="//@relations.66" upper="1"/> | ||
2048 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.49" relation="//@relations.67" upper="1"/> | ||
2049 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.50" relation="//@relations.68" upper="1"/> | ||
2050 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.51" relation="//@relations.69" upper="1"/> | ||
2051 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.52" relation="//@relations.70" upper="1"/> | ||
2052 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.53" relation="//@relations.71" upper="1"/> | ||
2053 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.54" relation="//@relations.72" upper="1"/> | ||
2054 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.55" relation="//@relations.73" upper="1"/> | ||
2055 | <annotations xsi:type="ecore2logicannotations:UpperMultiplicityAssertion" target="//@assertions.56" relation="//@relations.74" upper="1"/> | ||
2056 | <annotations xsi:type="partial2logicannotations:PartialModelRelation2Assertion" target="//@assertions.57" targetRelation="//@relations.55"/> | ||
2057 | <annotations xsi:type="partial2logicannotations:PartialModelRelation2Assertion" target="//@assertions.58" targetRelation="//@relations.56"/> | ||
2058 | <annotations xsi:type="partial2logicannotations:PartialModelRelation2Assertion" target="//@assertions.59" targetRelation="//@relations.57"/> | ||
2059 | </language:LogicProblem> | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/init.partialmodel b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/init.partialmodel new file mode 100644 index 00000000..985e7346 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/init.partialmodel | |||
@@ -0,0 +1,497 @@ | |||
1 | <?xml version="1.0" encoding="ASCII"?> | ||
2 | <partialinterpretation:PartialInterpretation xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:language="http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" xmlns:partialinterpretation="http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" minNewElements="5" maxNewElements="5"> | ||
3 | <problem href="generation.logicproblem#/"/> | ||
4 | <partialrelationinterpretation> | ||
5 | <interpretationOf href="generation.logicproblem#//@relations.0"/> | ||
6 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.0/@parameters.0"/> | ||
7 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.0/@parameters.1"/> | ||
8 | </partialrelationinterpretation> | ||
9 | <partialrelationinterpretation> | ||
10 | <interpretationOf href="generation.logicproblem#//@relations.1"/> | ||
11 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.1/@parameters.0"/> | ||
12 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.1/@parameters.1"/> | ||
13 | </partialrelationinterpretation> | ||
14 | <partialrelationinterpretation> | ||
15 | <interpretationOf href="generation.logicproblem#//@relations.2"/> | ||
16 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.2/@parameters.0"/> | ||
17 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.2/@parameters.1"/> | ||
18 | </partialrelationinterpretation> | ||
19 | <partialrelationinterpretation> | ||
20 | <interpretationOf href="generation.logicproblem#//@relations.3"/> | ||
21 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.3/@parameters.0"/> | ||
22 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.3/@parameters.1"/> | ||
23 | </partialrelationinterpretation> | ||
24 | <partialrelationinterpretation> | ||
25 | <interpretationOf href="generation.logicproblem#//@relations.4"/> | ||
26 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.4/@parameters.0"/> | ||
27 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.4/@parameters.1"/> | ||
28 | </partialrelationinterpretation> | ||
29 | <partialrelationinterpretation> | ||
30 | <interpretationOf href="generation.logicproblem#//@relations.5"/> | ||
31 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.5/@parameters.0"/> | ||
32 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.5/@parameters.1"/> | ||
33 | </partialrelationinterpretation> | ||
34 | <partialrelationinterpretation> | ||
35 | <interpretationOf href="generation.logicproblem#//@relations.6"/> | ||
36 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.6/@parameters.0"/> | ||
37 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.6/@parameters.1"/> | ||
38 | </partialrelationinterpretation> | ||
39 | <partialrelationinterpretation> | ||
40 | <interpretationOf href="generation.logicproblem#//@relations.7"/> | ||
41 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.7/@parameters.0"/> | ||
42 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.7/@parameters.1"/> | ||
43 | </partialrelationinterpretation> | ||
44 | <partialrelationinterpretation> | ||
45 | <interpretationOf href="generation.logicproblem#//@relations.8"/> | ||
46 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.8/@parameters.0"/> | ||
47 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.8/@parameters.1"/> | ||
48 | </partialrelationinterpretation> | ||
49 | <partialrelationinterpretation> | ||
50 | <interpretationOf href="generation.logicproblem#//@relations.9"/> | ||
51 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.9/@parameters.0"/> | ||
52 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.9/@parameters.1"/> | ||
53 | </partialrelationinterpretation> | ||
54 | <partialrelationinterpretation> | ||
55 | <interpretationOf href="generation.logicproblem#//@relations.10"/> | ||
56 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.10/@parameters.0"/> | ||
57 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.10/@parameters.1"/> | ||
58 | </partialrelationinterpretation> | ||
59 | <partialrelationinterpretation> | ||
60 | <interpretationOf href="generation.logicproblem#//@relations.11"/> | ||
61 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.11/@parameters.0"/> | ||
62 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.11/@parameters.1"/> | ||
63 | </partialrelationinterpretation> | ||
64 | <partialrelationinterpretation> | ||
65 | <interpretationOf href="generation.logicproblem#//@relations.12"/> | ||
66 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.12/@parameters.0"/> | ||
67 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.12/@parameters.1"/> | ||
68 | </partialrelationinterpretation> | ||
69 | <partialrelationinterpretation> | ||
70 | <interpretationOf href="generation.logicproblem#//@relations.13"/> | ||
71 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.13/@parameters.0"/> | ||
72 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.13/@parameters.1"/> | ||
73 | </partialrelationinterpretation> | ||
74 | <partialrelationinterpretation> | ||
75 | <interpretationOf href="generation.logicproblem#//@relations.14"/> | ||
76 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.14/@parameters.0"/> | ||
77 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.14/@parameters.1"/> | ||
78 | </partialrelationinterpretation> | ||
79 | <partialrelationinterpretation> | ||
80 | <interpretationOf href="generation.logicproblem#//@relations.15"/> | ||
81 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.15/@parameters.0"/> | ||
82 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.15/@parameters.1"/> | ||
83 | </partialrelationinterpretation> | ||
84 | <partialrelationinterpretation> | ||
85 | <interpretationOf href="generation.logicproblem#//@relations.16"/> | ||
86 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.16/@parameters.0"/> | ||
87 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.16/@parameters.1"/> | ||
88 | </partialrelationinterpretation> | ||
89 | <partialrelationinterpretation> | ||
90 | <interpretationOf href="generation.logicproblem#//@relations.17"/> | ||
91 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.17/@parameters.0"/> | ||
92 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.17/@parameters.1"/> | ||
93 | </partialrelationinterpretation> | ||
94 | <partialrelationinterpretation> | ||
95 | <interpretationOf href="generation.logicproblem#//@relations.18"/> | ||
96 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.18/@parameters.0"/> | ||
97 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.18/@parameters.1"/> | ||
98 | </partialrelationinterpretation> | ||
99 | <partialrelationinterpretation> | ||
100 | <interpretationOf href="generation.logicproblem#//@relations.19"/> | ||
101 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.19/@parameters.0"/> | ||
102 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.19/@parameters.1"/> | ||
103 | </partialrelationinterpretation> | ||
104 | <partialrelationinterpretation> | ||
105 | <interpretationOf href="generation.logicproblem#//@relations.20"/> | ||
106 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.20/@parameters.0"/> | ||
107 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.20/@parameters.1"/> | ||
108 | </partialrelationinterpretation> | ||
109 | <partialrelationinterpretation> | ||
110 | <interpretationOf href="generation.logicproblem#//@relations.21"/> | ||
111 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.21/@parameters.0"/> | ||
112 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.21/@parameters.1"/> | ||
113 | </partialrelationinterpretation> | ||
114 | <partialrelationinterpretation> | ||
115 | <interpretationOf href="generation.logicproblem#//@relations.22"/> | ||
116 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.22/@parameters.0"/> | ||
117 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.22/@parameters.1"/> | ||
118 | </partialrelationinterpretation> | ||
119 | <partialrelationinterpretation> | ||
120 | <interpretationOf href="generation.logicproblem#//@relations.23"/> | ||
121 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.23/@parameters.0"/> | ||
122 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.23/@parameters.1"/> | ||
123 | </partialrelationinterpretation> | ||
124 | <partialrelationinterpretation> | ||
125 | <interpretationOf href="generation.logicproblem#//@relations.24"/> | ||
126 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.24/@parameters.0"/> | ||
127 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.24/@parameters.1"/> | ||
128 | </partialrelationinterpretation> | ||
129 | <partialrelationinterpretation> | ||
130 | <interpretationOf href="generation.logicproblem#//@relations.25"/> | ||
131 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.25/@parameters.0"/> | ||
132 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.25/@parameters.1"/> | ||
133 | </partialrelationinterpretation> | ||
134 | <partialrelationinterpretation> | ||
135 | <interpretationOf href="generation.logicproblem#//@relations.26"/> | ||
136 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.26/@parameters.0"/> | ||
137 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.26/@parameters.1"/> | ||
138 | </partialrelationinterpretation> | ||
139 | <partialrelationinterpretation> | ||
140 | <interpretationOf href="generation.logicproblem#//@relations.27"/> | ||
141 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.27/@parameters.0"/> | ||
142 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.27/@parameters.1"/> | ||
143 | </partialrelationinterpretation> | ||
144 | <partialrelationinterpretation> | ||
145 | <interpretationOf href="generation.logicproblem#//@relations.28"/> | ||
146 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.28/@parameters.0"/> | ||
147 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.28/@parameters.1"/> | ||
148 | </partialrelationinterpretation> | ||
149 | <partialrelationinterpretation> | ||
150 | <interpretationOf href="generation.logicproblem#//@relations.29"/> | ||
151 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.29/@parameters.0"/> | ||
152 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.29/@parameters.1"/> | ||
153 | </partialrelationinterpretation> | ||
154 | <partialrelationinterpretation> | ||
155 | <interpretationOf href="generation.logicproblem#//@relations.30"/> | ||
156 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.30/@parameters.0"/> | ||
157 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.30/@parameters.1"/> | ||
158 | </partialrelationinterpretation> | ||
159 | <partialrelationinterpretation> | ||
160 | <interpretationOf href="generation.logicproblem#//@relations.31"/> | ||
161 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.31/@parameters.0"/> | ||
162 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.31/@parameters.1"/> | ||
163 | </partialrelationinterpretation> | ||
164 | <partialrelationinterpretation> | ||
165 | <interpretationOf href="generation.logicproblem#//@relations.32"/> | ||
166 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.32/@parameters.0"/> | ||
167 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.32/@parameters.1"/> | ||
168 | </partialrelationinterpretation> | ||
169 | <partialrelationinterpretation> | ||
170 | <interpretationOf href="generation.logicproblem#//@relations.33"/> | ||
171 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.33/@parameters.0"/> | ||
172 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.33/@parameters.1"/> | ||
173 | </partialrelationinterpretation> | ||
174 | <partialrelationinterpretation> | ||
175 | <interpretationOf href="generation.logicproblem#//@relations.34"/> | ||
176 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.34/@parameters.0"/> | ||
177 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.34/@parameters.1"/> | ||
178 | </partialrelationinterpretation> | ||
179 | <partialrelationinterpretation> | ||
180 | <interpretationOf href="generation.logicproblem#//@relations.35"/> | ||
181 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.35/@parameters.0"/> | ||
182 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.35/@parameters.1"/> | ||
183 | </partialrelationinterpretation> | ||
184 | <partialrelationinterpretation> | ||
185 | <interpretationOf href="generation.logicproblem#//@relations.36"/> | ||
186 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.36/@parameters.0"/> | ||
187 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.36/@parameters.1"/> | ||
188 | </partialrelationinterpretation> | ||
189 | <partialrelationinterpretation> | ||
190 | <interpretationOf href="generation.logicproblem#//@relations.37"/> | ||
191 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.37/@parameters.0"/> | ||
192 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.37/@parameters.1"/> | ||
193 | </partialrelationinterpretation> | ||
194 | <partialrelationinterpretation> | ||
195 | <interpretationOf href="generation.logicproblem#//@relations.38"/> | ||
196 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.38/@parameters.0"/> | ||
197 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.38/@parameters.1"/> | ||
198 | </partialrelationinterpretation> | ||
199 | <partialrelationinterpretation> | ||
200 | <interpretationOf href="generation.logicproblem#//@relations.39"/> | ||
201 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.39/@parameters.0"/> | ||
202 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.39/@parameters.1"/> | ||
203 | </partialrelationinterpretation> | ||
204 | <partialrelationinterpretation> | ||
205 | <interpretationOf href="generation.logicproblem#//@relations.40"/> | ||
206 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.40/@parameters.0"/> | ||
207 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.40/@parameters.1"/> | ||
208 | </partialrelationinterpretation> | ||
209 | <partialrelationinterpretation> | ||
210 | <interpretationOf href="generation.logicproblem#//@relations.41"/> | ||
211 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.41/@parameters.0"/> | ||
212 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.41/@parameters.1"/> | ||
213 | </partialrelationinterpretation> | ||
214 | <partialrelationinterpretation> | ||
215 | <interpretationOf href="generation.logicproblem#//@relations.42"/> | ||
216 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.42/@parameters.0"/> | ||
217 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.42/@parameters.1"/> | ||
218 | </partialrelationinterpretation> | ||
219 | <partialrelationinterpretation> | ||
220 | <interpretationOf href="generation.logicproblem#//@relations.43"/> | ||
221 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.43/@parameters.0"/> | ||
222 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.43/@parameters.1"/> | ||
223 | </partialrelationinterpretation> | ||
224 | <partialrelationinterpretation> | ||
225 | <interpretationOf href="generation.logicproblem#//@relations.44"/> | ||
226 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.44/@parameters.0"/> | ||
227 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.44/@parameters.1"/> | ||
228 | </partialrelationinterpretation> | ||
229 | <partialrelationinterpretation> | ||
230 | <interpretationOf href="generation.logicproblem#//@relations.45"/> | ||
231 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.45/@parameters.0"/> | ||
232 | <param2 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.45/@parameters.1"/> | ||
233 | </partialrelationinterpretation> | ||
234 | <partialrelationinterpretation> | ||
235 | <interpretationOf href="generation.logicproblem#//@relations.46"/> | ||
236 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.46/@parameters.0"/> | ||
237 | <param2 xsi:type="language:BoolTypeReference" href="generation.logicproblem#//@relations.46/@parameters.1"/> | ||
238 | </partialrelationinterpretation> | ||
239 | <partialrelationinterpretation> | ||
240 | <interpretationOf href="generation.logicproblem#//@relations.47"/> | ||
241 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.47/@parameters.0"/> | ||
242 | <param2 xsi:type="language:StringTypeReference" href="generation.logicproblem#//@relations.47/@parameters.1"/> | ||
243 | </partialrelationinterpretation> | ||
244 | <partialrelationinterpretation> | ||
245 | <interpretationOf href="generation.logicproblem#//@relations.48"/> | ||
246 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.48/@parameters.0"/> | ||
247 | <param2 xsi:type="language:BoolTypeReference" href="generation.logicproblem#//@relations.48/@parameters.1"/> | ||
248 | </partialrelationinterpretation> | ||
249 | <partialrelationinterpretation> | ||
250 | <interpretationOf href="generation.logicproblem#//@relations.49"/> | ||
251 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.49/@parameters.0"/> | ||
252 | <param2 xsi:type="language:BoolTypeReference" href="generation.logicproblem#//@relations.49/@parameters.1"/> | ||
253 | </partialrelationinterpretation> | ||
254 | <partialrelationinterpretation> | ||
255 | <interpretationOf href="generation.logicproblem#//@relations.50"/> | ||
256 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.50/@parameters.0"/> | ||
257 | <param2 xsi:type="language:StringTypeReference" href="generation.logicproblem#//@relations.50/@parameters.1"/> | ||
258 | </partialrelationinterpretation> | ||
259 | <partialrelationinterpretation> | ||
260 | <interpretationOf href="generation.logicproblem#//@relations.51"/> | ||
261 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.51/@parameters.0"/> | ||
262 | <param2 xsi:type="language:StringTypeReference" href="generation.logicproblem#//@relations.51/@parameters.1"/> | ||
263 | </partialrelationinterpretation> | ||
264 | <partialrelationinterpretation> | ||
265 | <interpretationOf href="generation.logicproblem#//@relations.52"/> | ||
266 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.52/@parameters.0"/> | ||
267 | <param2 xsi:type="language:BoolTypeReference" href="generation.logicproblem#//@relations.52/@parameters.1"/> | ||
268 | </partialrelationinterpretation> | ||
269 | <partialrelationinterpretation> | ||
270 | <interpretationOf href="generation.logicproblem#//@relations.53"/> | ||
271 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.53/@parameters.0"/> | ||
272 | <param2 xsi:type="language:IntTypeReference" href="generation.logicproblem#//@relations.53/@parameters.1"/> | ||
273 | </partialrelationinterpretation> | ||
274 | <partialrelationinterpretation> | ||
275 | <interpretationOf href="generation.logicproblem#//@relations.54"/> | ||
276 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.54/@parameters.0"/> | ||
277 | <param2 xsi:type="language:StringTypeReference" href="generation.logicproblem#//@relations.54/@parameters.1"/> | ||
278 | </partialrelationinterpretation> | ||
279 | <partialrelationinterpretation> | ||
280 | <interpretationOf href="generation.logicproblem#//@relations.55"/> | ||
281 | <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param2="//@newElements.9"> | ||
282 | <param1 href="generation.logicproblem#//@elements.0"/> | ||
283 | </relationlinks> | ||
284 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.55/@parameters.0"/> | ||
285 | <param2 xsi:type="language:StringTypeReference" href="generation.logicproblem#//@relations.55/@parameters.1"/> | ||
286 | </partialrelationinterpretation> | ||
287 | <partialrelationinterpretation> | ||
288 | <interpretationOf href="generation.logicproblem#//@relations.56"/> | ||
289 | <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param2="//@newElements.8"> | ||
290 | <param1 href="generation.logicproblem#//@elements.0"/> | ||
291 | </relationlinks> | ||
292 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.56/@parameters.0"/> | ||
293 | <param2 xsi:type="language:StringTypeReference" href="generation.logicproblem#//@relations.56/@parameters.1"/> | ||
294 | </partialrelationinterpretation> | ||
295 | <partialrelationinterpretation> | ||
296 | <interpretationOf href="generation.logicproblem#//@relations.57"/> | ||
297 | <relationlinks xsi:type="partialinterpretation:BinaryElementRelationLink" param2="//@newElements.7"> | ||
298 | <param1 href="generation.logicproblem#//@elements.0"/> | ||
299 | </relationlinks> | ||
300 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.57/@parameters.0"/> | ||
301 | <param2 xsi:type="language:StringTypeReference" href="generation.logicproblem#//@relations.57/@parameters.1"/> | ||
302 | </partialrelationinterpretation> | ||
303 | <partialrelationinterpretation> | ||
304 | <interpretationOf href="generation.logicproblem#//@relations.58"/> | ||
305 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.58/@parameters.0"/> | ||
306 | <param2 xsi:type="language:BoolTypeReference" href="generation.logicproblem#//@relations.58/@parameters.1"/> | ||
307 | </partialrelationinterpretation> | ||
308 | <partialrelationinterpretation> | ||
309 | <interpretationOf href="generation.logicproblem#//@relations.59"/> | ||
310 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.59/@parameters.0"/> | ||
311 | <param2 xsi:type="language:BoolTypeReference" href="generation.logicproblem#//@relations.59/@parameters.1"/> | ||
312 | </partialrelationinterpretation> | ||
313 | <partialrelationinterpretation> | ||
314 | <interpretationOf href="generation.logicproblem#//@relations.60"/> | ||
315 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.60/@parameters.0"/> | ||
316 | <param2 xsi:type="language:BoolTypeReference" href="generation.logicproblem#//@relations.60/@parameters.1"/> | ||
317 | </partialrelationinterpretation> | ||
318 | <partialrelationinterpretation> | ||
319 | <interpretationOf href="generation.logicproblem#//@relations.61"/> | ||
320 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.61/@parameters.0"/> | ||
321 | <param2 xsi:type="language:BoolTypeReference" href="generation.logicproblem#//@relations.61/@parameters.1"/> | ||
322 | </partialrelationinterpretation> | ||
323 | <partialrelationinterpretation> | ||
324 | <interpretationOf href="generation.logicproblem#//@relations.62"/> | ||
325 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.62/@parameters.0"/> | ||
326 | <param2 xsi:type="language:BoolTypeReference" href="generation.logicproblem#//@relations.62/@parameters.1"/> | ||
327 | </partialrelationinterpretation> | ||
328 | <partialrelationinterpretation> | ||
329 | <interpretationOf href="generation.logicproblem#//@relations.63"/> | ||
330 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.63/@parameters.0"/> | ||
331 | <param2 xsi:type="language:BoolTypeReference" href="generation.logicproblem#//@relations.63/@parameters.1"/> | ||
332 | </partialrelationinterpretation> | ||
333 | <partialrelationinterpretation> | ||
334 | <interpretationOf href="generation.logicproblem#//@relations.64"/> | ||
335 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.64/@parameters.0"/> | ||
336 | <param2 xsi:type="language:StringTypeReference" href="generation.logicproblem#//@relations.64/@parameters.1"/> | ||
337 | </partialrelationinterpretation> | ||
338 | <partialrelationinterpretation> | ||
339 | <interpretationOf href="generation.logicproblem#//@relations.65"/> | ||
340 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.65/@parameters.0"/> | ||
341 | <param2 xsi:type="language:BoolTypeReference" href="generation.logicproblem#//@relations.65/@parameters.1"/> | ||
342 | </partialrelationinterpretation> | ||
343 | <partialrelationinterpretation> | ||
344 | <interpretationOf href="generation.logicproblem#//@relations.66"/> | ||
345 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.66/@parameters.0"/> | ||
346 | <param2 xsi:type="language:BoolTypeReference" href="generation.logicproblem#//@relations.66/@parameters.1"/> | ||
347 | </partialrelationinterpretation> | ||
348 | <partialrelationinterpretation> | ||
349 | <interpretationOf href="generation.logicproblem#//@relations.67"/> | ||
350 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.67/@parameters.0"/> | ||
351 | <param2 xsi:type="language:BoolTypeReference" href="generation.logicproblem#//@relations.67/@parameters.1"/> | ||
352 | </partialrelationinterpretation> | ||
353 | <partialrelationinterpretation> | ||
354 | <interpretationOf href="generation.logicproblem#//@relations.68"/> | ||
355 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.68/@parameters.0"/> | ||
356 | <param2 xsi:type="language:BoolTypeReference" href="generation.logicproblem#//@relations.68/@parameters.1"/> | ||
357 | </partialrelationinterpretation> | ||
358 | <partialrelationinterpretation> | ||
359 | <interpretationOf href="generation.logicproblem#//@relations.69"/> | ||
360 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.69/@parameters.0"/> | ||
361 | <param2 xsi:type="language:IntTypeReference" href="generation.logicproblem#//@relations.69/@parameters.1"/> | ||
362 | </partialrelationinterpretation> | ||
363 | <partialrelationinterpretation> | ||
364 | <interpretationOf href="generation.logicproblem#//@relations.70"/> | ||
365 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.70/@parameters.0"/> | ||
366 | <param2 xsi:type="language:IntTypeReference" href="generation.logicproblem#//@relations.70/@parameters.1"/> | ||
367 | </partialrelationinterpretation> | ||
368 | <partialrelationinterpretation> | ||
369 | <interpretationOf href="generation.logicproblem#//@relations.71"/> | ||
370 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.71/@parameters.0"/> | ||
371 | <param2 xsi:type="language:BoolTypeReference" href="generation.logicproblem#//@relations.71/@parameters.1"/> | ||
372 | </partialrelationinterpretation> | ||
373 | <partialrelationinterpretation> | ||
374 | <interpretationOf href="generation.logicproblem#//@relations.72"/> | ||
375 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.72/@parameters.0"/> | ||
376 | <param2 xsi:type="language:BoolTypeReference" href="generation.logicproblem#//@relations.72/@parameters.1"/> | ||
377 | </partialrelationinterpretation> | ||
378 | <partialrelationinterpretation> | ||
379 | <interpretationOf href="generation.logicproblem#//@relations.73"/> | ||
380 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.73/@parameters.0"/> | ||
381 | <param2 xsi:type="language:StringTypeReference" href="generation.logicproblem#//@relations.73/@parameters.1"/> | ||
382 | </partialrelationinterpretation> | ||
383 | <partialrelationinterpretation> | ||
384 | <interpretationOf href="generation.logicproblem#//@relations.74"/> | ||
385 | <param1 xsi:type="language:ComplexTypeReference" href="generation.logicproblem#//@relations.74/@parameters.0"/> | ||
386 | <param2 xsi:type="language:StringTypeReference" href="generation.logicproblem#//@relations.74/@parameters.1"/> | ||
387 | </partialrelationinterpretation> | ||
388 | <newElements xsi:type="partialinterpretation:BooleanElement" name="true" valueSet="true" value="true"/> | ||
389 | <newElements xsi:type="partialinterpretation:BooleanElement" name="false" valueSet="true"/> | ||
390 | <newElements xsi:type="partialinterpretation:IntegerElement" name="-1" valueSet="true" value="-1"/> | ||
391 | <newElements xsi:type="partialinterpretation:IntegerElement" name="0" valueSet="true"/> | ||
392 | <newElements xsi:type="partialinterpretation:IntegerElement" name="1" valueSet="true" value="1"/> | ||
393 | <newElements xsi:type="partialinterpretation:StringElement" name=""A"" valueSet="true" value="A"/> | ||
394 | <newElements xsi:type="partialinterpretation:StringElement" name=""B"" valueSet="true" value="B"/> | ||
395 | <newElements xsi:type="partialinterpretation:StringElement" name=""nsPrefix"" valueSet="true" value="nsPrefix"/> | ||
396 | <newElements xsi:type="partialinterpretation:StringElement" name=""nsUri"" valueSet="true" value="nsUri"/> | ||
397 | <newElements xsi:type="partialinterpretation:StringElement" name=""packageName"" valueSet="true" value="packageName"/> | ||
398 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialBooleanInterpretation" elements="//@newElements.0 //@newElements.1"/> | ||
399 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialIntegerInterpretation" elements="//@newElements.2 //@newElements.3 //@newElements.4 //@openWorldElements.0"/> | ||
400 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialRealInterpretation" elements="//@openWorldElements.1"/> | ||
401 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialStringInterpretation" elements="//@newElements.5 //@newElements.6 //@newElements.7 //@newElements.8 //@newElements.9 //@openWorldElements.2"/> | ||
402 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" scopes="//@scopes.0" supertypeInterpretation="//@partialtypeinterpratation.18 //@partialtypeinterpratation.19 //@partialtypeinterpratation.12 //@partialtypeinterpratation.11 //@partialtypeinterpratation.24 //@partialtypeinterpratation.23"> | ||
403 | <interpretationOf href="generation.logicproblem#//@types.0"/> | ||
404 | </partialtypeinterpratation> | ||
405 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" scopes="//@scopes.1" supertypeInterpretation="//@partialtypeinterpratation.11 //@partialtypeinterpratation.23"> | ||
406 | <interpretationOf href="generation.logicproblem#//@types.1"/> | ||
407 | </partialtypeinterpratation> | ||
408 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" scopes="//@scopes.2" supertypeInterpretation="//@partialtypeinterpratation.7 //@partialtypeinterpratation.12 //@partialtypeinterpratation.11 //@partialtypeinterpratation.24 //@partialtypeinterpratation.23"> | ||
409 | <interpretationOf href="generation.logicproblem#//@types.2"/> | ||
410 | </partialtypeinterpratation> | ||
411 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" scopes="//@scopes.3" supertypeInterpretation="//@partialtypeinterpratation.12 //@partialtypeinterpratation.11 //@partialtypeinterpratation.24 //@partialtypeinterpratation.23"> | ||
412 | <interpretationOf href="generation.logicproblem#//@types.3"/> | ||
413 | </partialtypeinterpratation> | ||
414 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" scopes="//@scopes.4" supertypeInterpretation="//@partialtypeinterpratation.7 //@partialtypeinterpratation.12 //@partialtypeinterpratation.11 //@partialtypeinterpratation.24 //@partialtypeinterpratation.23"> | ||
415 | <interpretationOf href="generation.logicproblem#//@types.4"/> | ||
416 | </partialtypeinterpratation> | ||
417 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" scopes="//@scopes.5" supertypeInterpretation="//@partialtypeinterpratation.8 //@partialtypeinterpratation.7 //@partialtypeinterpratation.12 //@partialtypeinterpratation.11 //@partialtypeinterpratation.24 //@partialtypeinterpratation.23"> | ||
418 | <interpretationOf href="generation.logicproblem#//@types.5"/> | ||
419 | </partialtypeinterpratation> | ||
420 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" scopes="//@scopes.6" supertypeInterpretation="//@partialtypeinterpratation.12 //@partialtypeinterpratation.11 //@partialtypeinterpratation.24 //@partialtypeinterpratation.23"> | ||
421 | <interpretationOf href="generation.logicproblem#//@types.6"/> | ||
422 | </partialtypeinterpratation> | ||
423 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" scopes="//@scopes.7"> | ||
424 | <elements href="generation.logicproblem#//@elements.0"/> | ||
425 | <interpretationOf href="generation.logicproblem#//@types.7"/> | ||
426 | </partialtypeinterpratation> | ||
427 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" scopes="//@scopes.8" supertypeInterpretation="//@partialtypeinterpratation.11"> | ||
428 | <elements href="generation.logicproblem#//@elements.0"/> | ||
429 | <interpretationOf href="generation.logicproblem#//@types.8"/> | ||
430 | </partialtypeinterpratation> | ||
431 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" scopes="//@scopes.9"> | ||
432 | <interpretationOf href="generation.logicproblem#//@types.9"/> | ||
433 | </partialtypeinterpratation> | ||
434 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" scopes="//@scopes.10" supertypeInterpretation="//@partialtypeinterpratation.19 //@partialtypeinterpratation.12 //@partialtypeinterpratation.11 //@partialtypeinterpratation.24 //@partialtypeinterpratation.23"> | ||
435 | <interpretationOf href="generation.logicproblem#//@types.10"/> | ||
436 | </partialtypeinterpratation> | ||
437 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" scopes="//@scopes.11" supertypeInterpretation="//@partialtypeinterpratation.12 //@partialtypeinterpratation.11"> | ||
438 | <elements href="generation.logicproblem#//@elements.0"/> | ||
439 | <interpretationOf href="generation.logicproblem#//@types.11"/> | ||
440 | </partialtypeinterpratation> | ||
441 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" scopes="//@scopes.12" supertypeInterpretation="//@partialtypeinterpratation.19 //@partialtypeinterpratation.12 //@partialtypeinterpratation.11 //@partialtypeinterpratation.24 //@partialtypeinterpratation.23"> | ||
442 | <interpretationOf href="generation.logicproblem#//@types.12"/> | ||
443 | </partialtypeinterpratation> | ||
444 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" scopes="//@scopes.13" supertypeInterpretation="//@partialtypeinterpratation.18 //@partialtypeinterpratation.19 //@partialtypeinterpratation.12 //@partialtypeinterpratation.11 //@partialtypeinterpratation.24 //@partialtypeinterpratation.23"> | ||
445 | <interpretationOf href="generation.logicproblem#//@types.13"/> | ||
446 | </partialtypeinterpratation> | ||
447 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" scopes="//@scopes.14" supertypeInterpretation="//@partialtypeinterpratation.19 //@partialtypeinterpratation.12 //@partialtypeinterpratation.11 //@partialtypeinterpratation.24 //@partialtypeinterpratation.23"> | ||
448 | <interpretationOf href="generation.logicproblem#//@types.14"/> | ||
449 | </partialtypeinterpratation> | ||
450 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" scopes="//@scopes.15" supertypeInterpretation="//@partialtypeinterpratation.12 //@partialtypeinterpratation.11 //@partialtypeinterpratation.24 //@partialtypeinterpratation.23"> | ||
451 | <interpretationOf href="generation.logicproblem#//@types.15"/> | ||
452 | </partialtypeinterpratation> | ||
453 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" scopes="//@scopes.16"> | ||
454 | <interpretationOf href="generation.logicproblem#//@types.16"/> | ||
455 | </partialtypeinterpratation> | ||
456 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" scopes="//@scopes.17"> | ||
457 | <interpretationOf href="generation.logicproblem#//@types.17"/> | ||
458 | </partialtypeinterpratation> | ||
459 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" scopes="//@scopes.18" supertypeInterpretation="//@partialtypeinterpratation.12 //@partialtypeinterpratation.11 //@partialtypeinterpratation.24 //@partialtypeinterpratation.23"> | ||
460 | <interpretationOf href="generation.logicproblem#//@types.18"/> | ||
461 | </partialtypeinterpratation> | ||
462 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" scopes="//@scopes.19" supertypeInterpretation="//@partialtypeinterpratation.11"> | ||
463 | <interpretationOf href="generation.logicproblem#//@types.20"/> | ||
464 | </partialtypeinterpratation> | ||
465 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" scopes="//@scopes.20" supertypeInterpretation="//@partialtypeinterpratation.12 //@partialtypeinterpratation.11 //@partialtypeinterpratation.23"> | ||
466 | <interpretationOf href="generation.logicproblem#//@types.22"/> | ||
467 | </partialtypeinterpratation> | ||
468 | <partialtypeinterpratation xsi:type="partialinterpretation:PartialComplexTypeInterpretation" scopes="//@scopes.21" supertypeInterpretation="//@partialtypeinterpratation.15 //@partialtypeinterpratation.12 //@partialtypeinterpratation.11 //@partialtypeinterpratation.24 //@partialtypeinterpratation.23"> | ||
469 | <interpretationOf href="generation.logicproblem#//@types.24"/> | ||
470 | </partialtypeinterpratation> | ||
471 | <openWorldElements xsi:type="partialinterpretation:IntegerElement" name="New Integers"/> | ||
472 | <openWorldElements xsi:type="partialinterpretation:RealElement" name="New Reals"/> | ||
473 | <openWorldElements xsi:type="partialinterpretation:StringElement" name="New Strings"/> | ||
474 | <openWorldElements name="New Objects"/> | ||
475 | <scopes targetTypeInterpretation="//@partialtypeinterpratation.4"/> | ||
476 | <scopes targetTypeInterpretation="//@partialtypeinterpratation.5"/> | ||
477 | <scopes targetTypeInterpretation="//@partialtypeinterpratation.6"/> | ||
478 | <scopes targetTypeInterpretation="//@partialtypeinterpratation.7"/> | ||
479 | <scopes targetTypeInterpretation="//@partialtypeinterpratation.8"/> | ||
480 | <scopes targetTypeInterpretation="//@partialtypeinterpratation.9"/> | ||
481 | <scopes targetTypeInterpretation="//@partialtypeinterpratation.10"/> | ||
482 | <scopes targetTypeInterpretation="//@partialtypeinterpratation.11"/> | ||
483 | <scopes targetTypeInterpretation="//@partialtypeinterpratation.12"/> | ||
484 | <scopes targetTypeInterpretation="//@partialtypeinterpratation.13"/> | ||
485 | <scopes targetTypeInterpretation="//@partialtypeinterpratation.14"/> | ||
486 | <scopes targetTypeInterpretation="//@partialtypeinterpratation.15"/> | ||
487 | <scopes targetTypeInterpretation="//@partialtypeinterpratation.16"/> | ||
488 | <scopes targetTypeInterpretation="//@partialtypeinterpratation.17"/> | ||
489 | <scopes targetTypeInterpretation="//@partialtypeinterpratation.18"/> | ||
490 | <scopes targetTypeInterpretation="//@partialtypeinterpratation.19"/> | ||
491 | <scopes targetTypeInterpretation="//@partialtypeinterpratation.20"/> | ||
492 | <scopes targetTypeInterpretation="//@partialtypeinterpratation.21"/> | ||
493 | <scopes targetTypeInterpretation="//@partialtypeinterpratation.22"/> | ||
494 | <scopes targetTypeInterpretation="//@partialtypeinterpratation.23"/> | ||
495 | <scopes targetTypeInterpretation="//@partialtypeinterpratation.24"/> | ||
496 | <scopes targetTypeInterpretation="//@partialtypeinterpratation.25"/> | ||
497 | </partialinterpretation:PartialInterpretation> | ||