aboutsummaryrefslogtreecommitdiffstats
path: root/Domains
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <marussy@mit.bme.hu>2020-05-07 17:26:07 +0200
committerLibravatar Kristóf Marussy <marussy@mit.bme.hu>2020-05-07 17:26:07 +0200
commit6a3ff9bb588bf47242a56b91e35479dbba38eb19 (patch)
tree0432ecd0edafb99dc9f017d0a8cfee31a931583a /Domains
parentFix concurrency bug in AlloyHandler (diff)
downloadVIATRA-Generator-6a3ff9bb588bf47242a56b91e35479dbba38eb19.tar.gz
VIATRA-Generator-6a3ff9bb588bf47242a56b91e35479dbba38eb19.tar.zst
VIATRA-Generator-6a3ff9bb588bf47242a56b91e35479dbba38eb19.zip
Scope unsat benchmarks
Diffstat (limited to 'Domains')
-rw-r--r--Domains/Examples/ModelGenExampleFAM_plugin/.project6
-rw-r--r--Domains/Examples/ModelGenExampleFAM_plugin/plugin.xml18
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/patterns/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Ecore.vql10
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/plugin.xml2
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/.gitignore5
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Unsat_loopInInheritance.java566
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Unsat_subpackage.java704
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/internal/.gitignore4
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/plugin.xml12
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql13
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/plugin.xml1
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/queries/hu/bme/mit/inf/dslreasoner/partialsnapshot_mavo/yakindu/patterns.vql11
12 files changed, 1334 insertions, 18 deletions
diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/.project b/Domains/Examples/ModelGenExampleFAM_plugin/.project
index 6e1b3a06..570f8a60 100644
--- a/Domains/Examples/ModelGenExampleFAM_plugin/.project
+++ b/Domains/Examples/ModelGenExampleFAM_plugin/.project
@@ -6,6 +6,11 @@
6 </projects> 6 </projects>
7 <buildSpec> 7 <buildSpec>
8 <buildCommand> 8 <buildCommand>
9 <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
10 <arguments>
11 </arguments>
12 </buildCommand>
13 <buildCommand>
9 <name>org.eclipse.viatra.query.tooling.ui.projectbuilder</name> 14 <name>org.eclipse.viatra.query.tooling.ui.projectbuilder</name>
10 <arguments> 15 <arguments>
11 </arguments> 16 </arguments>
@@ -30,5 +35,6 @@
30 <nature>org.eclipse.jdt.core.javanature</nature> 35 <nature>org.eclipse.jdt.core.javanature</nature>
31 <nature>org.eclipse.viatra.query.projectnature</nature> 36 <nature>org.eclipse.viatra.query.projectnature</nature>
32 <nature>org.eclipse.pde.PluginNature</nature> 37 <nature>org.eclipse.pde.PluginNature</nature>
38 <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
33 </natures> 39 </natures>
34</projectDescription> 40</projectDescription>
diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/plugin.xml b/Domains/Examples/ModelGenExampleFAM_plugin/plugin.xml
index c117a28e..8d99d401 100644
--- a/Domains/Examples/ModelGenExampleFAM_plugin/plugin.xml
+++ b/Domains/Examples/ModelGenExampleFAM_plugin/plugin.xml
@@ -5,23 +5,13 @@
5 <extension id="extension.derived.hu.bme.mit.inf.dslreasoner.domains.transima.fam.type" point="org.eclipse.viatra.query.runtime.base.wellbehaving.derived.features"> 5 <extension id="extension.derived.hu.bme.mit.inf.dslreasoner.domains.transima.fam.type" point="org.eclipse.viatra.query.runtime.base.wellbehaving.derived.features">
6 <wellbehaving-derived-feature classifier-name="Function" feature-name="type" package-nsUri="http://www.inf.mit.bme.hu/viatrasolver/example/fam"/> 6 <wellbehaving-derived-feature classifier-name="Function" feature-name="type" package-nsUri="http://www.inf.mit.bme.hu/viatrasolver/example/fam"/>
7 </extension> 7 </extension>
8 <extension point="org.eclipse.emf.ecore.generated_package"> 8 <extension point="org.eclipse.emf.ecore.generated_package">
9 <!-- @generated FamMetamodel --> 9 <!-- @generated FamMetamodel -->
10 <package 10 <package class="functionalarchitecture.FunctionalarchitecturePackage" genModel="model/FamMetamodel.genmodel" uri="http://www.inf.mit.bme.hu/viatrasolver/example/fam"/>
11 uri="http://www.inf.mit.bme.hu/viatrasolver/example/fam" 11 </extension>
12 class="functionalarchitecture.FunctionalarchitecturePackage"
13 genModel="model/FamMetamodel.genmodel"/>
14 </extension>
15 <extension id="hu.bme.mit.inf.dslreasoner.domains.transima.fam.FamPatterns" point="org.eclipse.viatra.query.runtime.queryspecification"> 12 <extension id="hu.bme.mit.inf.dslreasoner.domains.transima.fam.FamPatterns" point="org.eclipse.viatra.query.runtime.queryspecification">
16 <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:hu.bme.mit.inf.dslreasoner.domains.transima.fam.FamPatterns" id="hu.bme.mit.inf.dslreasoner.domains.transima.fam.FamPatterns"> 13 <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:hu.bme.mit.inf.dslreasoner.domains.transima.fam.FamPatterns" id="hu.bme.mit.inf.dslreasoner.domains.transima.fam.FamPatterns">
17 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.transima.fam.terminatorAndInformation"/> 14 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.transima.fam.terminatorAndInformation"/>
18 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.transima.fam.type"/>
19 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.transima.fam.rootElements"/>
20 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.transima.fam.parent"/>
21 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.transima.fam.model"/>
22 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.transima.fam.hasRoot"/>
23 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.transima.fam.hasInt"/>
24 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.transima.fam.hasLeaf"/>
25 </group> 15 </group>
26 </extension> 16 </extension>
27</plugin> 17</plugin>
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/patterns/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Ecore.vql b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/patterns/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Ecore.vql
index 78525a35..16c24d05 100644
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/patterns/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Ecore.vql
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/patterns/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Ecore.vql
@@ -11,6 +11,16 @@ pattern loopInInheritence(a: EClass) {
11 find directSupertype+(a,a); 11 find directSupertype+(a,a);
12} 12}
13 13
14pattern unsat_subpackage(a: EPackage, b: EPackage) {
15 EPackage.eSubpackages(a, b);
16}
17
18@Constraint(key={p}, severity="error", message="error")
19pattern unsat_loopInInheritance(p: EPackage) {
20 neg find unsat_subpackage(_, p);
21 neg find loopInInheritence(_);
22}
23
14pattern opposite(a:EReference, b: EReference) { 24pattern opposite(a:EReference, b: EReference) {
15 EReference.eOpposite(a,b); 25 EReference.eOpposite(a,b);
16} 26}
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/plugin.xml b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/plugin.xml
index 6eae8535..eddd482c 100644
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/plugin.xml
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/plugin.xml
@@ -11,6 +11,8 @@
11 <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Ecore" id="hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Ecore"> 11 <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Ecore" id="hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Ecore">
12 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.alloyexamples.directSupertype"/> 12 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.alloyexamples.directSupertype"/>
13 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.alloyexamples.loopInInheritence"/> 13 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.alloyexamples.loopInInheritence"/>
14 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.alloyexamples.unsat_subpackage"/>
15 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.alloyexamples.unsat_loopInInheritance"/>
14 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.alloyexamples.opposite"/> 16 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.alloyexamples.opposite"/>
15 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.alloyexamples.oppositeDifferentClass"/> 17 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.alloyexamples.oppositeDifferentClass"/>
16 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.alloyexamples.nonSymmetricOpposite"/> 18 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.alloyexamples.nonSymmetricOpposite"/>
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/.gitignore
index 0f8c77a1..70eab455 100644
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/.gitignore
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/.gitignore
@@ -54,3 +54,8 @@
54/.RootIsNotDir.java._trace 54/.RootIsNotDir.java._trace
55/Dir.java 55/Dir.java
56/RootIsNotDir.java 56/RootIsNotDir.java
57/.Unsat_loopInInheritance.java._trace
58/.Subpackage.java._trace
59/.Unsat_subpackage.java._trace
60/.Unsat_subpackageOrSelf.java._trace
61/.Unsat_topLevelPackageWithLoop.java._trace
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Unsat_loopInInheritance.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Unsat_loopInInheritance.java
new file mode 100644
index 00000000..83bd0f66
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Unsat_loopInInheritance.java
@@ -0,0 +1,566 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/patterns/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Ecore.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.alloyexamples;
5
6import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.LoopInInheritence;
7import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Unsat_subpackage;
8import java.util.Arrays;
9import java.util.Collection;
10import java.util.LinkedHashSet;
11import java.util.List;
12import java.util.Objects;
13import java.util.Optional;
14import java.util.Set;
15import java.util.function.Consumer;
16import java.util.stream.Collectors;
17import java.util.stream.Stream;
18import org.apache.log4j.Logger;
19import org.eclipse.emf.ecore.EClass;
20import org.eclipse.emf.ecore.EPackage;
21import org.eclipse.viatra.query.runtime.api.IPatternMatch;
22import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
23import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
24import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
25import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
26import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
27import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
28import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
29import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
30import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
31import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
32import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
33import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
34import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
35import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall;
36import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
37import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
38import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
39import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
40import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
41import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
42import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
43
44/**
45 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
46 *
47 * <p>Original source:
48 * <code><pre>
49 * {@literal @}Constraint(key={p}, severity="error", message="error")
50 * pattern unsat_loopInInheritance(p: EPackage) {
51 * neg find unsat_subpackage(_, p);
52 * neg find loopInInheritence(_);
53 * }
54 * </pre></code>
55 *
56 * @see Matcher
57 * @see Match
58 *
59 */
60@SuppressWarnings("all")
61public final class Unsat_loopInInheritance extends BaseGeneratedEMFQuerySpecification<Unsat_loopInInheritance.Matcher> {
62 /**
63 * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.alloyexamples.unsat_loopInInheritance pattern,
64 * to be used in conjunction with {@link Matcher}.
65 *
66 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
67 * Each instance is a (possibly partial) substitution of pattern parameters,
68 * usable to represent a match of the pattern in the result of a query,
69 * or to specify the bound (fixed) input parameters when issuing a query.
70 *
71 * @see Matcher
72 *
73 */
74 public static abstract class Match extends BasePatternMatch {
75 private EPackage fP;
76
77 private static List<String> parameterNames = makeImmutableList("p");
78
79 private Match(final EPackage pP) {
80 this.fP = pP;
81 }
82
83 @Override
84 public Object get(final String parameterName) {
85 switch(parameterName) {
86 case "p": return this.fP;
87 default: return null;
88 }
89 }
90
91 @Override
92 public Object get(final int index) {
93 switch(index) {
94 case 0: return this.fP;
95 default: return null;
96 }
97 }
98
99 public EPackage getP() {
100 return this.fP;
101 }
102
103 @Override
104 public boolean set(final String parameterName, final Object newValue) {
105 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
106 if ("p".equals(parameterName) ) {
107 this.fP = (EPackage) newValue;
108 return true;
109 }
110 return false;
111 }
112
113 public void setP(final EPackage pP) {
114 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
115 this.fP = pP;
116 }
117
118 @Override
119 public String patternName() {
120 return "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.unsat_loopInInheritance";
121 }
122
123 @Override
124 public List<String> parameterNames() {
125 return Unsat_loopInInheritance.Match.parameterNames;
126 }
127
128 @Override
129 public Object[] toArray() {
130 return new Object[]{fP};
131 }
132
133 @Override
134 public Unsat_loopInInheritance.Match toImmutable() {
135 return isMutable() ? newMatch(fP) : this;
136 }
137
138 @Override
139 public String prettyPrint() {
140 StringBuilder result = new StringBuilder();
141 result.append("\"p\"=" + prettyPrintValue(fP));
142 return result.toString();
143 }
144
145 @Override
146 public int hashCode() {
147 return Objects.hash(fP);
148 }
149
150 @Override
151 public boolean equals(final Object obj) {
152 if (this == obj)
153 return true;
154 if (obj == null) {
155 return false;
156 }
157 if ((obj instanceof Unsat_loopInInheritance.Match)) {
158 Unsat_loopInInheritance.Match other = (Unsat_loopInInheritance.Match) obj;
159 return Objects.equals(fP, other.fP);
160 } else {
161 // this should be infrequent
162 if (!(obj instanceof IPatternMatch)) {
163 return false;
164 }
165 IPatternMatch otherSig = (IPatternMatch) obj;
166 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
167 }
168 }
169
170 @Override
171 public Unsat_loopInInheritance specification() {
172 return Unsat_loopInInheritance.instance();
173 }
174
175 /**
176 * Returns an empty, mutable match.
177 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
178 *
179 * @return the empty match.
180 *
181 */
182 public static Unsat_loopInInheritance.Match newEmptyMatch() {
183 return new Mutable(null);
184 }
185
186 /**
187 * Returns a mutable (partial) match.
188 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
189 *
190 * @param pP the fixed value of pattern parameter p, or null if not bound.
191 * @return the new, mutable (partial) match object.
192 *
193 */
194 public static Unsat_loopInInheritance.Match newMutableMatch(final EPackage pP) {
195 return new Mutable(pP);
196 }
197
198 /**
199 * Returns a new (partial) match.
200 * This can be used e.g. to call the matcher with a partial match.
201 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
202 * @param pP the fixed value of pattern parameter p, or null if not bound.
203 * @return the (partial) match object.
204 *
205 */
206 public static Unsat_loopInInheritance.Match newMatch(final EPackage pP) {
207 return new Immutable(pP);
208 }
209
210 private static final class Mutable extends Unsat_loopInInheritance.Match {
211 Mutable(final EPackage pP) {
212 super(pP);
213 }
214
215 @Override
216 public boolean isMutable() {
217 return true;
218 }
219 }
220
221 private static final class Immutable extends Unsat_loopInInheritance.Match {
222 Immutable(final EPackage pP) {
223 super(pP);
224 }
225
226 @Override
227 public boolean isMutable() {
228 return false;
229 }
230 }
231 }
232
233 /**
234 * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.alloyexamples.unsat_loopInInheritance pattern,
235 * providing pattern-specific query methods.
236 *
237 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
238 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
239 *
240 * <p>Matches of the pattern will be represented as {@link Match}.
241 *
242 * <p>Original source:
243 * <code><pre>
244 * {@literal @}Constraint(key={p}, severity="error", message="error")
245 * pattern unsat_loopInInheritance(p: EPackage) {
246 * neg find unsat_subpackage(_, p);
247 * neg find loopInInheritence(_);
248 * }
249 * </pre></code>
250 *
251 * @see Match
252 * @see Unsat_loopInInheritance
253 *
254 */
255 public static class Matcher extends BaseMatcher<Unsat_loopInInheritance.Match> {
256 /**
257 * Initializes the pattern matcher within an existing VIATRA Query engine.
258 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
259 *
260 * @param engine the existing VIATRA Query engine in which this matcher will be created.
261 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
262 *
263 */
264 public static Unsat_loopInInheritance.Matcher on(final ViatraQueryEngine engine) {
265 // check if matcher already exists
266 Matcher matcher = engine.getExistingMatcher(querySpecification());
267 if (matcher == null) {
268 matcher = (Matcher)engine.getMatcher(querySpecification());
269 }
270 return matcher;
271 }
272
273 /**
274 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
275 * @return an initialized matcher
276 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
277 *
278 */
279 public static Unsat_loopInInheritance.Matcher create() {
280 return new Matcher();
281 }
282
283 private static final int POSITION_P = 0;
284
285 private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(Unsat_loopInInheritance.Matcher.class);
286
287 /**
288 * Initializes the pattern matcher within an existing VIATRA Query engine.
289 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
290 *
291 * @param engine the existing VIATRA Query engine in which this matcher will be created.
292 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
293 *
294 */
295 private Matcher() {
296 super(querySpecification());
297 }
298
299 /**
300 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
301 * @param pP the fixed value of pattern parameter p, or null if not bound.
302 * @return matches represented as a Match object.
303 *
304 */
305 public Collection<Unsat_loopInInheritance.Match> getAllMatches(final EPackage pP) {
306 return rawStreamAllMatches(new Object[]{pP}).collect(Collectors.toSet());
307 }
308
309 /**
310 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
311 * </p>
312 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
313 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
314 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
315 * @param pP the fixed value of pattern parameter p, or null if not bound.
316 * @return a stream of matches represented as a Match object.
317 *
318 */
319 public Stream<Unsat_loopInInheritance.Match> streamAllMatches(final EPackage pP) {
320 return rawStreamAllMatches(new Object[]{pP});
321 }
322
323 /**
324 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
325 * Neither determinism nor randomness of selection is guaranteed.
326 * @param pP the fixed value of pattern parameter p, or null if not bound.
327 * @return a match represented as a Match object, or null if no match is found.
328 *
329 */
330 public Optional<Unsat_loopInInheritance.Match> getOneArbitraryMatch(final EPackage pP) {
331 return rawGetOneArbitraryMatch(new Object[]{pP});
332 }
333
334 /**
335 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
336 * under any possible substitution of the unspecified parameters (if any).
337 * @param pP the fixed value of pattern parameter p, or null if not bound.
338 * @return true if the input is a valid (partial) match of the pattern.
339 *
340 */
341 public boolean hasMatch(final EPackage pP) {
342 return rawHasMatch(new Object[]{pP});
343 }
344
345 /**
346 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
347 * @param pP the fixed value of pattern parameter p, or null if not bound.
348 * @return the number of pattern matches found.
349 *
350 */
351 public int countMatches(final EPackage pP) {
352 return rawCountMatches(new Object[]{pP});
353 }
354
355 /**
356 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
357 * Neither determinism nor randomness of selection is guaranteed.
358 * @param pP the fixed value of pattern parameter p, or null if not bound.
359 * @param processor the action that will process the selected match.
360 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
361 *
362 */
363 public boolean forOneArbitraryMatch(final EPackage pP, final Consumer<? super Unsat_loopInInheritance.Match> processor) {
364 return rawForOneArbitraryMatch(new Object[]{pP}, processor);
365 }
366
367 /**
368 * Returns a new (partial) match.
369 * This can be used e.g. to call the matcher with a partial match.
370 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
371 * @param pP the fixed value of pattern parameter p, or null if not bound.
372 * @return the (partial) match object.
373 *
374 */
375 public Unsat_loopInInheritance.Match newMatch(final EPackage pP) {
376 return Unsat_loopInInheritance.Match.newMatch(pP);
377 }
378
379 /**
380 * Retrieve the set of values that occur in matches for p.
381 * @return the Set of all values or empty set if there are no matches
382 *
383 */
384 protected Stream<EPackage> rawStreamAllValuesOfp(final Object[] parameters) {
385 return rawStreamAllValues(POSITION_P, parameters).map(EPackage.class::cast);
386 }
387
388 /**
389 * Retrieve the set of values that occur in matches for p.
390 * @return the Set of all values or empty set if there are no matches
391 *
392 */
393 public Set<EPackage> getAllValuesOfp() {
394 return rawStreamAllValuesOfp(emptyArray()).collect(Collectors.toSet());
395 }
396
397 /**
398 * Retrieve the set of values that occur in matches for p.
399 * @return the Set of all values or empty set if there are no matches
400 *
401 */
402 public Stream<EPackage> streamAllValuesOfp() {
403 return rawStreamAllValuesOfp(emptyArray());
404 }
405
406 @Override
407 protected Unsat_loopInInheritance.Match tupleToMatch(final Tuple t) {
408 try {
409 return Unsat_loopInInheritance.Match.newMatch((EPackage) t.get(POSITION_P));
410 } catch(ClassCastException e) {
411 LOGGER.error("Element(s) in tuple not properly typed!",e);
412 return null;
413 }
414 }
415
416 @Override
417 protected Unsat_loopInInheritance.Match arrayToMatch(final Object[] match) {
418 try {
419 return Unsat_loopInInheritance.Match.newMatch((EPackage) match[POSITION_P]);
420 } catch(ClassCastException e) {
421 LOGGER.error("Element(s) in array not properly typed!",e);
422 return null;
423 }
424 }
425
426 @Override
427 protected Unsat_loopInInheritance.Match arrayToMatchMutable(final Object[] match) {
428 try {
429 return Unsat_loopInInheritance.Match.newMutableMatch((EPackage) match[POSITION_P]);
430 } catch(ClassCastException e) {
431 LOGGER.error("Element(s) in array not properly typed!",e);
432 return null;
433 }
434 }
435
436 /**
437 * @return the singleton instance of the query specification of this pattern
438 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
439 *
440 */
441 public static IQuerySpecification<Unsat_loopInInheritance.Matcher> querySpecification() {
442 return Unsat_loopInInheritance.instance();
443 }
444 }
445
446 private Unsat_loopInInheritance() {
447 super(GeneratedPQuery.INSTANCE);
448 }
449
450 /**
451 * @return the singleton instance of the query specification
452 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
453 *
454 */
455 public static Unsat_loopInInheritance instance() {
456 try{
457 return LazyHolder.INSTANCE;
458 } catch (ExceptionInInitializerError err) {
459 throw processInitializerError(err);
460 }
461 }
462
463 @Override
464 protected Unsat_loopInInheritance.Matcher instantiate(final ViatraQueryEngine engine) {
465 return Unsat_loopInInheritance.Matcher.on(engine);
466 }
467
468 @Override
469 public Unsat_loopInInheritance.Matcher instantiate() {
470 return Unsat_loopInInheritance.Matcher.create();
471 }
472
473 @Override
474 public Unsat_loopInInheritance.Match newEmptyMatch() {
475 return Unsat_loopInInheritance.Match.newEmptyMatch();
476 }
477
478 @Override
479 public Unsat_loopInInheritance.Match newMatch(final Object... parameters) {
480 return Unsat_loopInInheritance.Match.newMatch((org.eclipse.emf.ecore.EPackage) parameters[0]);
481 }
482
483 /**
484 * Inner class allowing the singleton instance of {@link Unsat_loopInInheritance} to be created
485 * <b>not</b> at the class load time of the outer class,
486 * but rather at the first call to {@link Unsat_loopInInheritance#instance()}.
487 *
488 * <p> This workaround is required e.g. to support recursion.
489 *
490 */
491 private static class LazyHolder {
492 private static final Unsat_loopInInheritance INSTANCE = new Unsat_loopInInheritance();
493
494 /**
495 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
496 * This initialization order is required to support indirect recursion.
497 *
498 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
499 *
500 */
501 private static final Object STATIC_INITIALIZER = ensureInitialized();
502
503 public static Object ensureInitialized() {
504 INSTANCE.ensureInitializedInternal();
505 return null;
506 }
507 }
508
509 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
510 private static final Unsat_loopInInheritance.GeneratedPQuery INSTANCE = new GeneratedPQuery();
511
512 private final PParameter parameter_p = new PParameter("p", "org.eclipse.emf.ecore.EPackage", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/emf/2002/Ecore", "EPackage")), PParameterDirection.INOUT);
513
514 private final List<PParameter> parameters = Arrays.asList(parameter_p);
515
516 private GeneratedPQuery() {
517 super(PVisibility.PUBLIC);
518 }
519
520 @Override
521 public String getFullyQualifiedName() {
522 return "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.unsat_loopInInheritance";
523 }
524
525 @Override
526 public List<String> getParameterNames() {
527 return Arrays.asList("p");
528 }
529
530 @Override
531 public List<PParameter> getParameters() {
532 return parameters;
533 }
534
535 @Override
536 public Set<PBody> doGetContainedBodies() {
537 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
538 Set<PBody> bodies = new LinkedHashSet<>();
539 {
540 PBody body = new PBody(this);
541 PVariable var_p = body.getOrCreateVariableByName("p");
542 PVariable var___0_ = body.getOrCreateVariableByName("_<0>");
543 PVariable var___1_ = body.getOrCreateVariableByName("_<1>");
544 new TypeConstraint(body, Tuples.flatTupleOf(var_p), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EPackage")));
545 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
546 new ExportedParameter(body, var_p, parameter_p)
547 ));
548 // neg find unsat_subpackage(_, p)
549 new NegativePatternCall(body, Tuples.flatTupleOf(var___0_, var_p), Unsat_subpackage.instance().getInternalQueryRepresentation());
550 // neg find loopInInheritence(_)
551 new NegativePatternCall(body, Tuples.flatTupleOf(var___1_), LoopInInheritence.instance().getInternalQueryRepresentation());
552 bodies.add(body);
553 }
554 {
555 PAnnotation annotation = new PAnnotation("Constraint");
556 annotation.addAttribute("key", Arrays.asList(new Object[] {
557 new ParameterReference("p")
558 }));
559 annotation.addAttribute("severity", "error");
560 annotation.addAttribute("message", "error");
561 addAnnotation(annotation);
562 }
563 return bodies;
564 }
565 }
566}
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Unsat_subpackage.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Unsat_subpackage.java
new file mode 100644
index 00000000..a9c8aed8
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Unsat_subpackage.java
@@ -0,0 +1,704 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/patterns/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Ecore.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.alloyexamples;
5
6import java.util.Arrays;
7import java.util.Collection;
8import java.util.LinkedHashSet;
9import java.util.List;
10import java.util.Objects;
11import java.util.Optional;
12import java.util.Set;
13import java.util.function.Consumer;
14import java.util.stream.Collectors;
15import java.util.stream.Stream;
16import org.apache.log4j.Logger;
17import org.eclipse.emf.ecore.EClass;
18import org.eclipse.emf.ecore.EPackage;
19import org.eclipse.viatra.query.runtime.api.IPatternMatch;
20import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
21import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
22import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
23import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
24import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
25import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
26import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
27import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
28import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
29import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
30import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
31import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
32import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
33import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
34import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
35import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
36import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
37import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
38import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
39import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
40
41/**
42 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
43 *
44 * <p>Original source:
45 * <code><pre>
46 * pattern unsat_subpackage(a: EPackage, b: EPackage) {
47 * EPackage.eSubpackages(a, b);
48 * }
49 * </pre></code>
50 *
51 * @see Matcher
52 * @see Match
53 *
54 */
55@SuppressWarnings("all")
56public final class Unsat_subpackage extends BaseGeneratedEMFQuerySpecification<Unsat_subpackage.Matcher> {
57 /**
58 * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.alloyexamples.unsat_subpackage pattern,
59 * to be used in conjunction with {@link Matcher}.
60 *
61 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
62 * Each instance is a (possibly partial) substitution of pattern parameters,
63 * usable to represent a match of the pattern in the result of a query,
64 * or to specify the bound (fixed) input parameters when issuing a query.
65 *
66 * @see Matcher
67 *
68 */
69 public static abstract class Match extends BasePatternMatch {
70 private EPackage fA;
71
72 private EPackage fB;
73
74 private static List<String> parameterNames = makeImmutableList("a", "b");
75
76 private Match(final EPackage pA, final EPackage pB) {
77 this.fA = pA;
78 this.fB = pB;
79 }
80
81 @Override
82 public Object get(final String parameterName) {
83 switch(parameterName) {
84 case "a": return this.fA;
85 case "b": return this.fB;
86 default: return null;
87 }
88 }
89
90 @Override
91 public Object get(final int index) {
92 switch(index) {
93 case 0: return this.fA;
94 case 1: return this.fB;
95 default: return null;
96 }
97 }
98
99 public EPackage getA() {
100 return this.fA;
101 }
102
103 public EPackage getB() {
104 return this.fB;
105 }
106
107 @Override
108 public boolean set(final String parameterName, final Object newValue) {
109 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
110 if ("a".equals(parameterName) ) {
111 this.fA = (EPackage) newValue;
112 return true;
113 }
114 if ("b".equals(parameterName) ) {
115 this.fB = (EPackage) newValue;
116 return true;
117 }
118 return false;
119 }
120
121 public void setA(final EPackage pA) {
122 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
123 this.fA = pA;
124 }
125
126 public void setB(final EPackage pB) {
127 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
128 this.fB = pB;
129 }
130
131 @Override
132 public String patternName() {
133 return "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.unsat_subpackage";
134 }
135
136 @Override
137 public List<String> parameterNames() {
138 return Unsat_subpackage.Match.parameterNames;
139 }
140
141 @Override
142 public Object[] toArray() {
143 return new Object[]{fA, fB};
144 }
145
146 @Override
147 public Unsat_subpackage.Match toImmutable() {
148 return isMutable() ? newMatch(fA, fB) : this;
149 }
150
151 @Override
152 public String prettyPrint() {
153 StringBuilder result = new StringBuilder();
154 result.append("\"a\"=" + prettyPrintValue(fA) + ", ");
155 result.append("\"b\"=" + prettyPrintValue(fB));
156 return result.toString();
157 }
158
159 @Override
160 public int hashCode() {
161 return Objects.hash(fA, fB);
162 }
163
164 @Override
165 public boolean equals(final Object obj) {
166 if (this == obj)
167 return true;
168 if (obj == null) {
169 return false;
170 }
171 if ((obj instanceof Unsat_subpackage.Match)) {
172 Unsat_subpackage.Match other = (Unsat_subpackage.Match) obj;
173 return Objects.equals(fA, other.fA) && Objects.equals(fB, other.fB);
174 } else {
175 // this should be infrequent
176 if (!(obj instanceof IPatternMatch)) {
177 return false;
178 }
179 IPatternMatch otherSig = (IPatternMatch) obj;
180 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
181 }
182 }
183
184 @Override
185 public Unsat_subpackage specification() {
186 return Unsat_subpackage.instance();
187 }
188
189 /**
190 * Returns an empty, mutable match.
191 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
192 *
193 * @return the empty match.
194 *
195 */
196 public static Unsat_subpackage.Match newEmptyMatch() {
197 return new Mutable(null, null);
198 }
199
200 /**
201 * Returns a mutable (partial) match.
202 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
203 *
204 * @param pA the fixed value of pattern parameter a, or null if not bound.
205 * @param pB the fixed value of pattern parameter b, or null if not bound.
206 * @return the new, mutable (partial) match object.
207 *
208 */
209 public static Unsat_subpackage.Match newMutableMatch(final EPackage pA, final EPackage pB) {
210 return new Mutable(pA, pB);
211 }
212
213 /**
214 * Returns a new (partial) match.
215 * This can be used e.g. to call the matcher with a partial match.
216 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
217 * @param pA the fixed value of pattern parameter a, or null if not bound.
218 * @param pB the fixed value of pattern parameter b, or null if not bound.
219 * @return the (partial) match object.
220 *
221 */
222 public static Unsat_subpackage.Match newMatch(final EPackage pA, final EPackage pB) {
223 return new Immutable(pA, pB);
224 }
225
226 private static final class Mutable extends Unsat_subpackage.Match {
227 Mutable(final EPackage pA, final EPackage pB) {
228 super(pA, pB);
229 }
230
231 @Override
232 public boolean isMutable() {
233 return true;
234 }
235 }
236
237 private static final class Immutable extends Unsat_subpackage.Match {
238 Immutable(final EPackage pA, final EPackage pB) {
239 super(pA, pB);
240 }
241
242 @Override
243 public boolean isMutable() {
244 return false;
245 }
246 }
247 }
248
249 /**
250 * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.alloyexamples.unsat_subpackage pattern,
251 * providing pattern-specific query methods.
252 *
253 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
254 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
255 *
256 * <p>Matches of the pattern will be represented as {@link Match}.
257 *
258 * <p>Original source:
259 * <code><pre>
260 * pattern unsat_subpackage(a: EPackage, b: EPackage) {
261 * EPackage.eSubpackages(a, b);
262 * }
263 * </pre></code>
264 *
265 * @see Match
266 * @see Unsat_subpackage
267 *
268 */
269 public static class Matcher extends BaseMatcher<Unsat_subpackage.Match> {
270 /**
271 * Initializes the pattern matcher within an existing VIATRA Query engine.
272 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
273 *
274 * @param engine the existing VIATRA Query engine in which this matcher will be created.
275 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
276 *
277 */
278 public static Unsat_subpackage.Matcher on(final ViatraQueryEngine engine) {
279 // check if matcher already exists
280 Matcher matcher = engine.getExistingMatcher(querySpecification());
281 if (matcher == null) {
282 matcher = (Matcher)engine.getMatcher(querySpecification());
283 }
284 return matcher;
285 }
286
287 /**
288 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
289 * @return an initialized matcher
290 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
291 *
292 */
293 public static Unsat_subpackage.Matcher create() {
294 return new Matcher();
295 }
296
297 private static final int POSITION_A = 0;
298
299 private static final int POSITION_B = 1;
300
301 private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(Unsat_subpackage.Matcher.class);
302
303 /**
304 * Initializes the pattern matcher within an existing VIATRA Query engine.
305 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
306 *
307 * @param engine the existing VIATRA Query engine in which this matcher will be created.
308 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
309 *
310 */
311 private Matcher() {
312 super(querySpecification());
313 }
314
315 /**
316 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
317 * @param pA the fixed value of pattern parameter a, or null if not bound.
318 * @param pB the fixed value of pattern parameter b, or null if not bound.
319 * @return matches represented as a Match object.
320 *
321 */
322 public Collection<Unsat_subpackage.Match> getAllMatches(final EPackage pA, final EPackage pB) {
323 return rawStreamAllMatches(new Object[]{pA, pB}).collect(Collectors.toSet());
324 }
325
326 /**
327 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
328 * </p>
329 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
330 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
331 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
332 * @param pA the fixed value of pattern parameter a, or null if not bound.
333 * @param pB the fixed value of pattern parameter b, or null if not bound.
334 * @return a stream of matches represented as a Match object.
335 *
336 */
337 public Stream<Unsat_subpackage.Match> streamAllMatches(final EPackage pA, final EPackage pB) {
338 return rawStreamAllMatches(new Object[]{pA, pB});
339 }
340
341 /**
342 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
343 * Neither determinism nor randomness of selection is guaranteed.
344 * @param pA the fixed value of pattern parameter a, or null if not bound.
345 * @param pB the fixed value of pattern parameter b, or null if not bound.
346 * @return a match represented as a Match object, or null if no match is found.
347 *
348 */
349 public Optional<Unsat_subpackage.Match> getOneArbitraryMatch(final EPackage pA, final EPackage pB) {
350 return rawGetOneArbitraryMatch(new Object[]{pA, pB});
351 }
352
353 /**
354 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
355 * under any possible substitution of the unspecified parameters (if any).
356 * @param pA the fixed value of pattern parameter a, or null if not bound.
357 * @param pB the fixed value of pattern parameter b, or null if not bound.
358 * @return true if the input is a valid (partial) match of the pattern.
359 *
360 */
361 public boolean hasMatch(final EPackage pA, final EPackage pB) {
362 return rawHasMatch(new Object[]{pA, pB});
363 }
364
365 /**
366 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
367 * @param pA the fixed value of pattern parameter a, or null if not bound.
368 * @param pB the fixed value of pattern parameter b, or null if not bound.
369 * @return the number of pattern matches found.
370 *
371 */
372 public int countMatches(final EPackage pA, final EPackage pB) {
373 return rawCountMatches(new Object[]{pA, pB});
374 }
375
376 /**
377 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
378 * Neither determinism nor randomness of selection is guaranteed.
379 * @param pA the fixed value of pattern parameter a, or null if not bound.
380 * @param pB the fixed value of pattern parameter b, or null if not bound.
381 * @param processor the action that will process the selected match.
382 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
383 *
384 */
385 public boolean forOneArbitraryMatch(final EPackage pA, final EPackage pB, final Consumer<? super Unsat_subpackage.Match> processor) {
386 return rawForOneArbitraryMatch(new Object[]{pA, pB}, processor);
387 }
388
389 /**
390 * Returns a new (partial) match.
391 * This can be used e.g. to call the matcher with a partial match.
392 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
393 * @param pA the fixed value of pattern parameter a, or null if not bound.
394 * @param pB the fixed value of pattern parameter b, or null if not bound.
395 * @return the (partial) match object.
396 *
397 */
398 public Unsat_subpackage.Match newMatch(final EPackage pA, final EPackage pB) {
399 return Unsat_subpackage.Match.newMatch(pA, pB);
400 }
401
402 /**
403 * Retrieve the set of values that occur in matches for a.
404 * @return the Set of all values or empty set if there are no matches
405 *
406 */
407 protected Stream<EPackage> rawStreamAllValuesOfa(final Object[] parameters) {
408 return rawStreamAllValues(POSITION_A, parameters).map(EPackage.class::cast);
409 }
410
411 /**
412 * Retrieve the set of values that occur in matches for a.
413 * @return the Set of all values or empty set if there are no matches
414 *
415 */
416 public Set<EPackage> getAllValuesOfa() {
417 return rawStreamAllValuesOfa(emptyArray()).collect(Collectors.toSet());
418 }
419
420 /**
421 * Retrieve the set of values that occur in matches for a.
422 * @return the Set of all values or empty set if there are no matches
423 *
424 */
425 public Stream<EPackage> streamAllValuesOfa() {
426 return rawStreamAllValuesOfa(emptyArray());
427 }
428
429 /**
430 * Retrieve the set of values that occur in matches for a.
431 * </p>
432 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
433 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
434 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
435 *
436 * @return the Stream of all values or empty set if there are no matches
437 *
438 */
439 public Stream<EPackage> streamAllValuesOfa(final Unsat_subpackage.Match partialMatch) {
440 return rawStreamAllValuesOfa(partialMatch.toArray());
441 }
442
443 /**
444 * Retrieve the set of values that occur in matches for a.
445 * </p>
446 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
447 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
448 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
449 *
450 * @return the Stream of all values or empty set if there are no matches
451 *
452 */
453 public Stream<EPackage> streamAllValuesOfa(final EPackage pB) {
454 return rawStreamAllValuesOfa(new Object[]{null, pB});
455 }
456
457 /**
458 * Retrieve the set of values that occur in matches for a.
459 * @return the Set of all values or empty set if there are no matches
460 *
461 */
462 public Set<EPackage> getAllValuesOfa(final Unsat_subpackage.Match partialMatch) {
463 return rawStreamAllValuesOfa(partialMatch.toArray()).collect(Collectors.toSet());
464 }
465
466 /**
467 * Retrieve the set of values that occur in matches for a.
468 * @return the Set of all values or empty set if there are no matches
469 *
470 */
471 public Set<EPackage> getAllValuesOfa(final EPackage pB) {
472 return rawStreamAllValuesOfa(new Object[]{null, pB}).collect(Collectors.toSet());
473 }
474
475 /**
476 * Retrieve the set of values that occur in matches for b.
477 * @return the Set of all values or empty set if there are no matches
478 *
479 */
480 protected Stream<EPackage> rawStreamAllValuesOfb(final Object[] parameters) {
481 return rawStreamAllValues(POSITION_B, parameters).map(EPackage.class::cast);
482 }
483
484 /**
485 * Retrieve the set of values that occur in matches for b.
486 * @return the Set of all values or empty set if there are no matches
487 *
488 */
489 public Set<EPackage> getAllValuesOfb() {
490 return rawStreamAllValuesOfb(emptyArray()).collect(Collectors.toSet());
491 }
492
493 /**
494 * Retrieve the set of values that occur in matches for b.
495 * @return the Set of all values or empty set if there are no matches
496 *
497 */
498 public Stream<EPackage> streamAllValuesOfb() {
499 return rawStreamAllValuesOfb(emptyArray());
500 }
501
502 /**
503 * Retrieve the set of values that occur in matches for b.
504 * </p>
505 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
506 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
507 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
508 *
509 * @return the Stream of all values or empty set if there are no matches
510 *
511 */
512 public Stream<EPackage> streamAllValuesOfb(final Unsat_subpackage.Match partialMatch) {
513 return rawStreamAllValuesOfb(partialMatch.toArray());
514 }
515
516 /**
517 * Retrieve the set of values that occur in matches for b.
518 * </p>
519 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
520 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
521 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
522 *
523 * @return the Stream of all values or empty set if there are no matches
524 *
525 */
526 public Stream<EPackage> streamAllValuesOfb(final EPackage pA) {
527 return rawStreamAllValuesOfb(new Object[]{pA, null});
528 }
529
530 /**
531 * Retrieve the set of values that occur in matches for b.
532 * @return the Set of all values or empty set if there are no matches
533 *
534 */
535 public Set<EPackage> getAllValuesOfb(final Unsat_subpackage.Match partialMatch) {
536 return rawStreamAllValuesOfb(partialMatch.toArray()).collect(Collectors.toSet());
537 }
538
539 /**
540 * Retrieve the set of values that occur in matches for b.
541 * @return the Set of all values or empty set if there are no matches
542 *
543 */
544 public Set<EPackage> getAllValuesOfb(final EPackage pA) {
545 return rawStreamAllValuesOfb(new Object[]{pA, null}).collect(Collectors.toSet());
546 }
547
548 @Override
549 protected Unsat_subpackage.Match tupleToMatch(final Tuple t) {
550 try {
551 return Unsat_subpackage.Match.newMatch((EPackage) t.get(POSITION_A), (EPackage) t.get(POSITION_B));
552 } catch(ClassCastException e) {
553 LOGGER.error("Element(s) in tuple not properly typed!",e);
554 return null;
555 }
556 }
557
558 @Override
559 protected Unsat_subpackage.Match arrayToMatch(final Object[] match) {
560 try {
561 return Unsat_subpackage.Match.newMatch((EPackage) match[POSITION_A], (EPackage) match[POSITION_B]);
562 } catch(ClassCastException e) {
563 LOGGER.error("Element(s) in array not properly typed!",e);
564 return null;
565 }
566 }
567
568 @Override
569 protected Unsat_subpackage.Match arrayToMatchMutable(final Object[] match) {
570 try {
571 return Unsat_subpackage.Match.newMutableMatch((EPackage) match[POSITION_A], (EPackage) match[POSITION_B]);
572 } catch(ClassCastException e) {
573 LOGGER.error("Element(s) in array not properly typed!",e);
574 return null;
575 }
576 }
577
578 /**
579 * @return the singleton instance of the query specification of this pattern
580 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
581 *
582 */
583 public static IQuerySpecification<Unsat_subpackage.Matcher> querySpecification() {
584 return Unsat_subpackage.instance();
585 }
586 }
587
588 private Unsat_subpackage() {
589 super(GeneratedPQuery.INSTANCE);
590 }
591
592 /**
593 * @return the singleton instance of the query specification
594 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
595 *
596 */
597 public static Unsat_subpackage instance() {
598 try{
599 return LazyHolder.INSTANCE;
600 } catch (ExceptionInInitializerError err) {
601 throw processInitializerError(err);
602 }
603 }
604
605 @Override
606 protected Unsat_subpackage.Matcher instantiate(final ViatraQueryEngine engine) {
607 return Unsat_subpackage.Matcher.on(engine);
608 }
609
610 @Override
611 public Unsat_subpackage.Matcher instantiate() {
612 return Unsat_subpackage.Matcher.create();
613 }
614
615 @Override
616 public Unsat_subpackage.Match newEmptyMatch() {
617 return Unsat_subpackage.Match.newEmptyMatch();
618 }
619
620 @Override
621 public Unsat_subpackage.Match newMatch(final Object... parameters) {
622 return Unsat_subpackage.Match.newMatch((org.eclipse.emf.ecore.EPackage) parameters[0], (org.eclipse.emf.ecore.EPackage) parameters[1]);
623 }
624
625 /**
626 * Inner class allowing the singleton instance of {@link Unsat_subpackage} to be created
627 * <b>not</b> at the class load time of the outer class,
628 * but rather at the first call to {@link Unsat_subpackage#instance()}.
629 *
630 * <p> This workaround is required e.g. to support recursion.
631 *
632 */
633 private static class LazyHolder {
634 private static final Unsat_subpackage INSTANCE = new Unsat_subpackage();
635
636 /**
637 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
638 * This initialization order is required to support indirect recursion.
639 *
640 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
641 *
642 */
643 private static final Object STATIC_INITIALIZER = ensureInitialized();
644
645 public static Object ensureInitialized() {
646 INSTANCE.ensureInitializedInternal();
647 return null;
648 }
649 }
650
651 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
652 private static final Unsat_subpackage.GeneratedPQuery INSTANCE = new GeneratedPQuery();
653
654 private final PParameter parameter_a = new PParameter("a", "org.eclipse.emf.ecore.EPackage", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/emf/2002/Ecore", "EPackage")), PParameterDirection.INOUT);
655
656 private final PParameter parameter_b = new PParameter("b", "org.eclipse.emf.ecore.EPackage", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/emf/2002/Ecore", "EPackage")), PParameterDirection.INOUT);
657
658 private final List<PParameter> parameters = Arrays.asList(parameter_a, parameter_b);
659
660 private GeneratedPQuery() {
661 super(PVisibility.PUBLIC);
662 }
663
664 @Override
665 public String getFullyQualifiedName() {
666 return "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.unsat_subpackage";
667 }
668
669 @Override
670 public List<String> getParameterNames() {
671 return Arrays.asList("a","b");
672 }
673
674 @Override
675 public List<PParameter> getParameters() {
676 return parameters;
677 }
678
679 @Override
680 public Set<PBody> doGetContainedBodies() {
681 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
682 Set<PBody> bodies = new LinkedHashSet<>();
683 {
684 PBody body = new PBody(this);
685 PVariable var_a = body.getOrCreateVariableByName("a");
686 PVariable var_b = body.getOrCreateVariableByName("b");
687 new TypeConstraint(body, Tuples.flatTupleOf(var_a), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EPackage")));
688 new TypeConstraint(body, Tuples.flatTupleOf(var_b), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EPackage")));
689 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
690 new ExportedParameter(body, var_a, parameter_a),
691 new ExportedParameter(body, var_b, parameter_b)
692 ));
693 // EPackage.eSubpackages(a, b)
694 new TypeConstraint(body, Tuples.flatTupleOf(var_a), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EPackage")));
695 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
696 new TypeConstraint(body, Tuples.flatTupleOf(var_a, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.eclipse.org/emf/2002/Ecore", "EPackage", "eSubpackages")));
697 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EPackage")));
698 new Equality(body, var__virtual_0_, var_b);
699 bodies.add(body);
700 }
701 return bodies;
702 }
703 }
704}
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/internal/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/internal/.gitignore
new file mode 100644
index 00000000..995169ff
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/internal/.gitignore
@@ -0,0 +1,4 @@
1/.EcoreAll.java._trace
2/.SubpackageOrSelf.java._trace
3/.Subpackage.java._trace
4/.TopLevelPackageWithLoop.java._trace
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/plugin.xml b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/plugin.xml
index b0b77996..fe1af62e 100644
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/plugin.xml
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/plugin.xml
@@ -1,9 +1,12 @@
1<?xml version="1.0" encoding="UTF-8"?><?eclipse version="3.0"?><!-- 1<?xml version="1.0" encoding="UTF-8"?><?eclipse version="3.0"?><!--
2--><plugin> 2--><plugin>
3 <extension point="org.eclipse.emf.ecore.generated_package"> 3 <extension point="org.eclipse.emf.ecore.generated_package">
4 <!-- @generated satellite --> 4 <!-- @generated satellite -->
5 <package class="satellite.SatellitePackage" genModel="model/satellite.genmodel" uri="http://www.example.org/satellite"/> 5 <package
6 </extension> 6 uri="http://www.example.org/satellite"
7 class="satellite.SatellitePackage"
8 genModel="model/satellite.genmodel"/>
9 </extension>
7 <extension id="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SatelliteQueries" point="org.eclipse.viatra.query.runtime.queryspecification"> 10 <extension id="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SatelliteQueries" point="org.eclipse.viatra.query.runtime.queryspecification">
8 <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SatelliteQueries" id="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SatelliteQueries"> 11 <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SatelliteQueries" id="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SatelliteQueries">
9 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.communicationLinkDoesNotStartAtContainingElement"/> 12 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.communicationLinkDoesNotStartAtContainingElement"/>
@@ -11,6 +14,7 @@
11 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.roundStationNetworkUHF"/> 14 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.roundStationNetworkUHF"/>
12 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.notEnoughInterferometryPayloads"/> 15 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.notEnoughInterferometryPayloads"/>
13 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.noLinkToGroundStation"/> 16 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.noLinkToGroundStation"/>
17 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.unsat_linkToGroundStation"/>
14 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.noPotentialLinkToGroundStation"/> 18 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.noPotentialLinkToGroundStation"/>
15 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.communicationLoop"/> 19 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.communicationLoop"/>
16 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.incompatibleSourceAndTargetBand"/> 20 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.incompatibleSourceAndTargetBand"/>
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql
index 1f83a3b0..ba12bbda 100644
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql
@@ -59,6 +59,19 @@ pattern noLinkToGroundStation(Spacecraft : Spacecraft) {
59 neg find indirectCommunicationLink(Spacecraft, GroundStation); 59 neg find indirectCommunicationLink(Spacecraft, GroundStation);
60} 60}
61 61
62//@Constraint(severity = "error", key = {Spacecraft}, message = "UNSAT")
63//pattern unsat_linkToGroundStation(Spacecraft : Spacecraft) {
64// ConstellationMission.groundStationNetwork(Mission, GroundStation);
65// ConstellationMission.spacecraft(Mission, Spacecraft);
66// find indirectCommunicationLink(Spacecraft, GroundStation);
67//}
68
69@Constraint(severity = "error", key = {Mission}, message = "UNSAT")
70pattern unsat_linkToGroundStation(Mission : InterferometryMission) {
71 InterferometryMission(Mission);
72 neg find noLinkToGroundStation(_);
73}
74
62@Constraint(severity = "error", key = {Spacecraft}, 75@Constraint(severity = "error", key = {Spacecraft},
63 message = "Spacecraft has no potential communication path to the ground station.") 76 message = "Spacecraft has no potential communication path to the ground station.")
64pattern noPotentialLinkToGroundStation(Spacecraft : Spacecraft) { 77pattern noPotentialLinkToGroundStation(Spacecraft : Spacecraft) {
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/plugin.xml b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/plugin.xml
index 7bf4a20b..d4ab204e 100644
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/plugin.xml
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/plugin.xml
@@ -8,6 +8,7 @@
8 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.entryInRegion"/> 8 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.entryInRegion"/>
9 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.noEntryInRegion"/> 9 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.noEntryInRegion"/>
10 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.multipleEntryInRegion"/> 10 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.multipleEntryInRegion"/>
11 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.unsat_multipleEntryInRegion"/>
11 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.transition"/> 12 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.transition"/>
12 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.transitionFrom"/> 13 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.transitionFrom"/>
13 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.transitionTo"/> 14 <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.transitionTo"/>
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/queries/hu/bme/mit/inf/dslreasoner/partialsnapshot_mavo/yakindu/patterns.vql b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/queries/hu/bme/mit/inf/dslreasoner/partialsnapshot_mavo/yakindu/patterns.vql
index 98a10cde..49fb5b2f 100644
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/queries/hu/bme/mit/inf/dslreasoner/partialsnapshot_mavo/yakindu/patterns.vql
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/queries/hu/bme/mit/inf/dslreasoner/partialsnapshot_mavo/yakindu/patterns.vql
@@ -22,6 +22,12 @@ pattern multipleEntryInRegion(r : Region) {
22 e1 != e2; 22 e1 != e2;
23} 23}
24 24
25@Constraint(severity="error", message="error", key = {sct})
26pattern unsat_multipleEntryInRegion(sct : Statechart) {
27 Statechart(sct);
28 neg find multipleEntryInRegion(_);
29}
30
25pattern transition(t : Transition, src : Vertex, trg : Vertex) { 31pattern transition(t : Transition, src : Vertex, trg : Vertex) {
26 Transition.source(t, src); 32 Transition.source(t, src);
27 Transition.target(t, trg); 33 Transition.target(t, trg);
@@ -197,6 +203,11 @@ pattern SynchronizedRegionDoesNotHaveMultipleRegions(s : Synchronization, v : Ve
197 neg find hasMultipleRegions(c); 203 neg find hasMultipleRegions(c);
198} 204}
199 205
206//@Constraint(severity="error", message="error", key = {sct})
207//pattern unsat_SynchronizedRegionDoesNotHaveMultipleRegions(sct : Statechart) {
208// Statechart(sct);
209// neg find SynchronizedRegionDoesNotHaveMultipleRegions(_, _);
210//}
200 211
201pattern hasMultipleRegions(composite: CompositeElement) { 212pattern hasMultipleRegions(composite: CompositeElement) {
202 CompositeElement.regions(composite,region1); 213 CompositeElement.regions(composite,region1);