diff options
author | 2019-08-14 18:26:33 +0200 | |
---|---|---|
committer | 2019-08-14 18:26:33 +0200 | |
commit | fc84d3fe670331bc89fb1e4c44104bc1fc811438 (patch) | |
tree | 466da8333151c51d2e17075600f9452ed35835da /Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/queries/hu/bme/mit/inf/dslreasoner/partialsnapshot_mavo/yakindu/patterns.vql | |
parent | Be more lenient with rounding IP solver results (diff) | |
download | VIATRA-Generator-fc84d3fe670331bc89fb1e4c44104bc1fc811438.tar.gz VIATRA-Generator-fc84d3fe670331bc89fb1e4c44104bc1fc811438.tar.zst VIATRA-Generator-fc84d3fe670331bc89fb1e4c44104bc1fc811438.zip |
Measurements WIP
Diffstat (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/queries/hu/bme/mit/inf/dslreasoner/partialsnapshot_mavo/yakindu/patterns.vql')
-rw-r--r-- | Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/queries/hu/bme/mit/inf/dslreasoner/partialsnapshot_mavo/yakindu/patterns.vql | 64 |
1 files changed, 42 insertions, 22 deletions
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 f4bfa3c1..98a10cde 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 | |||
@@ -27,14 +27,22 @@ pattern transition(t : Transition, src : Vertex, trg : Vertex) { | |||
27 | Transition.target(t, trg); | 27 | Transition.target(t, trg); |
28 | } | 28 | } |
29 | 29 | ||
30 | pattern transitionFrom(t : Transition, src : Vertex) { | ||
31 | Transition.source(t, src); | ||
32 | } | ||
33 | |||
34 | pattern transitionTo(t : Transition, trg : Vertex) { | ||
35 | Transition.target(t, trg); | ||
36 | } | ||
37 | |||
30 | @Constraint(severity="error", message="error", key = {e}) | 38 | @Constraint(severity="error", message="error", key = {e}) |
31 | pattern incomingToEntry(t : Transition, e : Entry) { | 39 | pattern incomingToEntry(t : Transition, e : Entry) { |
32 | find transition(t, _, e); | 40 | find transitionTo(t, e); |
33 | } | 41 | } |
34 | 42 | ||
35 | @Constraint(severity="error", message="error", key = {e}) | 43 | @Constraint(severity="error", message="error", key = {e}) |
36 | pattern noOutgoingTransitionFromEntry(e : Entry) { | 44 | pattern noOutgoingTransitionFromEntry(e : Entry) { |
37 | neg find transition(_, e, _); | 45 | neg find transitionFrom(_, e); |
38 | } | 46 | } |
39 | 47 | ||
40 | @Constraint(severity="error", message="error", key = {e}) | 48 | @Constraint(severity="error", message="error", key = {e}) |
@@ -80,12 +88,12 @@ pattern StateInRegion(region: Region, state: State) { | |||
80 | 88 | ||
81 | @Constraint(severity="error", message="error", key = {c}) | 89 | @Constraint(severity="error", message="error", key = {c}) |
82 | pattern choiceHasNoOutgoing(c : Choice) { | 90 | pattern choiceHasNoOutgoing(c : Choice) { |
83 | neg find transition(_, c, _); | 91 | neg find transitionFrom(_, c); |
84 | } | 92 | } |
85 | 93 | ||
86 | @Constraint(severity="error", message="error", key = {c}) | 94 | @Constraint(severity="error", message="error", key = {c}) |
87 | pattern choiceHasNoIncoming(c: Choice) { | 95 | pattern choiceHasNoIncoming(c: Choice) { |
88 | neg find transition(_, _, c); | 96 | neg find transitionTo(_, c); |
89 | } | 97 | } |
90 | 98 | ||
91 | ///////// | 99 | ///////// |
@@ -94,27 +102,33 @@ pattern choiceHasNoIncoming(c: Choice) { | |||
94 | 102 | ||
95 | @Constraint(severity="error", message="error", key = {s}) | 103 | @Constraint(severity="error", message="error", key = {s}) |
96 | pattern synchHasNoOutgoing(s : Synchronization) { | 104 | pattern synchHasNoOutgoing(s : Synchronization) { |
97 | neg find transition(_, s, _); | 105 | neg find transitionFrom(_, s); |
98 | } | 106 | } |
99 | 107 | ||
100 | @Constraint(severity="error", message="error", key = {s}) | 108 | @Constraint(severity="error", message="error", key = {s}) |
101 | pattern synchHasNoIncoming(s : Synchronization) { | 109 | pattern synchHasNoIncoming(s : Synchronization) { |
102 | neg find transition(_, _, s); | 110 | neg find transitionTo(_, s); |
103 | } | 111 | } |
104 | 112 | ||
105 | @Constraint(severity="error", message="error", key = {s}) | 113 | @Constraint(severity="error", message="error", key = {s}) |
106 | pattern SynchronizedIncomingInSameRegion(s : Synchronization, v1 : Vertex, v2 : Vertex) { | 114 | pattern SynchronizedIncomingInSameRegion(s : Synchronization, t1 : Transition, t2 : Transition) { |
107 | find transition(t1, v1, s); | 115 | find SynchronizedIncomingInSameRegionHelper1(r, s, t1); |
108 | find transition(t2, v2, s); | 116 | find SynchronizedIncomingInSameRegionHelper1(r, s, t2); |
109 | t1!=t2; | 117 | t1!=t2; |
110 | Region.vertices(r, v1); | ||
111 | Region.vertices(r, v2); | ||
112 | } or { | 118 | } or { |
113 | find transition(t1, s, v1); | 119 | find SynchronizedIncomingInSameRegionHelper2(r, s, t1); |
114 | find transition(t2, s, v2); | 120 | find SynchronizedIncomingInSameRegionHelper2(r, s, t2); |
115 | t1!=t2; | 121 | t1!=t2; |
122 | } | ||
123 | |||
124 | pattern SynchronizedIncomingInSameRegionHelper1(r : Region, s : Synchronization, t1 : Transition) { | ||
125 | find transition(t1, v1, s); | ||
126 | Region.vertices(r, v1); | ||
127 | } | ||
128 | |||
129 | pattern SynchronizedIncomingInSameRegionHelper2(r : Region, s : Synchronization, t1 : Transition) { | ||
130 | find transition(t1, s, v1); | ||
116 | Region.vertices(r, v1); | 131 | Region.vertices(r, v1); |
117 | Region.vertices(r, v2); | ||
118 | } | 132 | } |
119 | 133 | ||
120 | @Constraint(severity="error", message="error", key = {s}) | 134 | @Constraint(severity="error", message="error", key = {s}) |
@@ -136,18 +150,24 @@ pattern hasMultipleIncomingTrainsition(v : Synchronization) { | |||
136 | } | 150 | } |
137 | 151 | ||
138 | @Constraint(severity="error", message="error", key = {s}) | 152 | @Constraint(severity="error", message="error", key = {s}) |
139 | pattern SynchronizedRegionsAreNotSiblings(s : Synchronization, v1 : Vertex, v2 : Vertex) { | 153 | pattern SynchronizedRegionsAreNotSiblings(s : Synchronization, r1 : CompositeElement, r2 : CompositeElement) { |
140 | find transition(_, v1, s); | 154 | find SynchronizedRegionsAreNotSiblingsHelper1(s, r1); |
141 | find transition(_, v2, s); | 155 | find SynchronizedRegionsAreNotSiblingsHelper1(s, r2); |
142 | CompositeElement.regions.vertices(r1, v1); | ||
143 | CompositeElement.regions.vertices(r2, v2); | ||
144 | r1 != r2; | 156 | r1 != r2; |
145 | } or { | 157 | } or { |
158 | find SynchronizedRegionsAreNotSiblingsHelper2(s, r1); | ||
159 | find SynchronizedRegionsAreNotSiblingsHelper2(s, r2); | ||
160 | r1 != r2; | ||
161 | } | ||
162 | |||
163 | pattern SynchronizedRegionsAreNotSiblingsHelper1(s : Synchronization, r1 : CompositeElement) { | ||
146 | find transition(_, s, v1); | 164 | find transition(_, s, v1); |
147 | find transition(_, s, v2); | ||
148 | CompositeElement.regions.vertices(r1, v1); | 165 | CompositeElement.regions.vertices(r1, v1); |
149 | CompositeElement.regions.vertices(r2, v2); | 166 | } |
150 | r1 != r2; | 167 | |
168 | pattern SynchronizedRegionsAreNotSiblingsHelper2(s : Synchronization, r1 : CompositeElement) { | ||
169 | find transition(_, v1, s); | ||
170 | CompositeElement.regions.vertices(r1, v1); | ||
151 | } | 171 | } |
152 | 172 | ||
153 | /////////////////////////////// | 173 | /////////////////////////////// |