diff options
author | 2019-02-16 15:45:14 -0500 | |
---|---|---|
committer | 2020-06-07 19:18:52 -0400 | |
commit | d6839b05d1e1f2dede0acc58ba2d39f89e8163e4 (patch) | |
tree | 34e6bc5f42f1dcb15434aa784bcaece040e9f60a /Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/problem.als | |
parent | Set up #19 (diff) | |
download | VIATRA-Generator-d6839b05d1e1f2dede0acc58ba2d39f89e8163e4.tar.gz VIATRA-Generator-d6839b05d1e1f2dede0acc58ba2d39f89e8163e4.tar.zst VIATRA-Generator-d6839b05d1e1f2dede0acc58ba2d39f89e8163e4.zip |
Integrate queries partially #19
Diffstat (limited to 'Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/problem.als')
-rw-r--r-- | Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/problem.als | 203 |
1 files changed, 203 insertions, 0 deletions
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/problem.als b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/problem.als new file mode 100644 index 00000000..16ff4006 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/problem.als | |||
@@ -0,0 +1,203 @@ | |||
1 | one sig util'language { | ||
2 | util'root : one type'FunctionalArchitectureModel'class + (type'FunctionalData'class + (type'Function'class + (type'FAMTerminator'class + (type'InformationLink'class + (type'FunctionalInterface'class + (type'FunctionalElement'class + (type'FunctionalInput'class + (type'FunctionalOutput'class + (type'FunctionalArchitectureModel'class'DefinedPart + type'FunctionalArchitectureModel'class'UndefinedPart))))))))), | ||
3 | util'contains : (type'FunctionalArchitectureModel'class + (type'FunctionalData'class + (type'Function'class + (type'FAMTerminator'class + (type'InformationLink'class + (type'FunctionalInterface'class + (type'FunctionalElement'class + (type'FunctionalInput'class + (type'FunctionalOutput'class + (type'FunctionalArchitectureModel'class'DefinedPart + type'FunctionalArchitectureModel'class'UndefinedPart)))))))))) lone->set (type'FunctionalArchitectureModel'class + (type'FunctionalData'class + (type'Function'class + (type'FAMTerminator'class + (type'InformationLink'class + (type'FunctionalInterface'class + (type'FunctionalElement'class + (type'FunctionalInput'class + (type'FunctionalOutput'class + (type'FunctionalArchitectureModel'class'DefinedPart + type'FunctionalArchitectureModel'class'UndefinedPart)))))))))) | ||
4 | } | ||
5 | abstract sig util'Object { | ||
6 | } | ||
7 | sig type'FunctionalElement'class in util'Object { | ||
8 | interface'reference'FunctionalElement : lone type'FunctionalInterface'class, | ||
9 | parent'reference'FunctionalElement : lone type'Function'class | ||
10 | } | ||
11 | sig type'FunctionalArchitectureModel'class in util'Object { | ||
12 | rootElements'reference'FunctionalArchitectureModel : set type'FunctionalElement'class | ||
13 | } | ||
14 | sig type'Function'class in type'FunctionalElement'class { | ||
15 | subElements'reference'Function : set type'FunctionalElement'class | ||
16 | } | ||
17 | sig type'FAMTerminator'class in util'Object { | ||
18 | data'reference'FAMTerminator : lone type'FunctionalData'class | ||
19 | } | ||
20 | sig type'InformationLink'class in util'Object { | ||
21 | from'reference'InformationLink : lone type'FunctionalOutput'class, | ||
22 | to'reference'InformationLink : one type'FunctionalInput'class | ||
23 | } | ||
24 | sig type'FunctionalInterface'class in util'Object { | ||
25 | data'reference'FunctionalInterface : set type'FunctionalData'class, | ||
26 | element'reference'FunctionalInterface : lone type'FunctionalElement'class | ||
27 | } | ||
28 | sig type'FunctionalInput'class in type'FunctionalData'class { | ||
29 | IncomingLinks'reference'FunctionalInput : set type'InformationLink'class | ||
30 | } | ||
31 | sig type'FunctionalOutput'class in type'FunctionalData'class { | ||
32 | outgoingLinks'reference'FunctionalOutput : set type'InformationLink'class | ||
33 | } | ||
34 | sig type'FunctionalData'class in util'Object { | ||
35 | terminator'reference'FunctionalData : lone type'FAMTerminator'class, | ||
36 | interface'reference'FunctionalData : lone type'FunctionalInterface'class | ||
37 | } | ||
38 | sig type'FunctionType'enum in util'Object { | ||
39 | } | ||
40 | sig type'FunctionalArchitectureModel'class'DefinedPart in type'FunctionalArchitectureModel'class { | ||
41 | } | ||
42 | sig type'FunctionalArchitectureModel'class'UndefinedPart in type'FunctionalArchitectureModel'class { | ||
43 | } | ||
44 | one sig element'o'1 in type'FunctionalArchitectureModel'class'DefinedPart { | ||
45 | } | ||
46 | one sig element'Root'literal'FunctionType, | ||
47 | element'Intermediate'literal'FunctionType, | ||
48 | element'Leaf'literal'FunctionType in type'FunctionType'enum { | ||
49 | } | ||
50 | pred pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'terminatorAndInformation [parameter'T: type'FAMTerminator'class, parameter'I: type'InformationLink'class] { | ||
51 | (some variable'Out: type'FunctionalOutput'class { parameter'I in variable'Out.outgoingLinks'reference'FunctionalOutput && parameter'T in variable'Out.terminator'reference'FunctionalData }) || (some variable'In: type'FunctionalInput'class { variable'In in parameter'I.to'reference'InformationLink && (variable'In in type'FunctionalInput'class && parameter'T in variable'In.terminator'reference'FunctionalData) }) | ||
52 | } | ||
53 | pred pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'type [parameter'This: type'Function'class, parameter'Target: type'FunctionType'enum] { | ||
54 | (some variable'Model: type'FunctionalArchitectureModel'class { pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'rootElements [ variable'Model , parameter'This ] && parameter'Target = element'Root'literal'FunctionType }) || ((all variable'Child: type'Function'class, variable'Model: type'FunctionalArchitectureModel'class { parameter'This in type'Function'class && (! (pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'parent [ variable'Child , parameter'This ]) && (! (pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'rootElements [ variable'Model , parameter'This ]) && parameter'Target = element'Leaf'literal'FunctionType)) }) || (some variable'Par: type'Function'class, variable'Child: type'Function'class { pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'parent [ parameter'This , variable'Par ] && (pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'parent [ variable'Child , parameter'This ] && parameter'Target = element'Intermediate'literal'FunctionType) })) | ||
55 | } | ||
56 | pred pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'rootElements [parameter'Model: type'FunctionalArchitectureModel'class, parameter'Root: type'Function'class] { | ||
57 | parameter'Root in type'Function'class && parameter'Root in parameter'Model.rootElements'reference'FunctionalArchitectureModel | ||
58 | } | ||
59 | pred pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'parent [parameter'Func: type'Function'class, parameter'Par: type'Function'class] { | ||
60 | parameter'Func in type'Function'class && (parameter'Par in parameter'Func.parent'reference'FunctionalElement && parameter'Par in type'Function'class) | ||
61 | } | ||
62 | pred pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'model [parameter'This: type'FunctionalElement'class, parameter'Target: type'FunctionalArchitectureModel'class] { | ||
63 | parameter'This in type'FunctionalElement'class && parameter'Target in type'FunctionalArchitectureModel'class | ||
64 | } | ||
65 | fact typedefinition'FunctionType'enum { | ||
66 | type'FunctionType'enum = element'Root'literal'FunctionType + (element'Intermediate'literal'FunctionType + element'Leaf'literal'FunctionType) | ||
67 | } | ||
68 | fact typedefinition'FunctionalArchitectureModel'class'DefinedPart { | ||
69 | type'FunctionalArchitectureModel'class'DefinedPart = element'o'1 | ||
70 | } | ||
71 | fact typeElementsUnique'FunctionType'enum { | ||
72 | element'Root'literal'FunctionType != element'Intermediate'literal'FunctionType && (element'Root'literal'FunctionType != element'Leaf'literal'FunctionType && (element'Root'literal'FunctionType != element'o'1 && (element'Intermediate'literal'FunctionType != element'Leaf'literal'FunctionType && (element'Intermediate'literal'FunctionType != element'o'1 && element'Leaf'literal'FunctionType != element'o'1)))) | ||
73 | } | ||
74 | fact typeElementsUnique'FunctionalArchitectureModel'class'DefinedPart { | ||
75 | element'Root'literal'FunctionType != element'Intermediate'literal'FunctionType && (element'Root'literal'FunctionType != element'Leaf'literal'FunctionType && (element'Root'literal'FunctionType != element'o'1 && (element'Intermediate'literal'FunctionType != element'Leaf'literal'FunctionType && (element'Intermediate'literal'FunctionType != element'o'1 && element'Leaf'literal'FunctionType != element'o'1)))) | ||
76 | } | ||
77 | fact abstract'FunctionalElement'class { | ||
78 | type'FunctionalElement'class = type'Function'class | ||
79 | } | ||
80 | fact abstract'FunctionalArchitectureModel'class { | ||
81 | type'FunctionalArchitectureModel'class = type'FunctionalArchitectureModel'class'DefinedPart + type'FunctionalArchitectureModel'class'UndefinedPart | ||
82 | } | ||
83 | fact abstract'FunctionalData'class { | ||
84 | type'FunctionalData'class = type'FunctionalInput'class + type'FunctionalOutput'class | ||
85 | } | ||
86 | fact ObjectTypeDefinition { | ||
87 | util'Object = type'FunctionalElement'class + (type'FunctionalArchitectureModel'class + (type'FAMTerminator'class + (type'InformationLink'class + (type'FunctionalInterface'class + (type'FunctionalData'class + type'FunctionType'enum))))) | ||
88 | } | ||
89 | fact common'types'FunctionalArchitectureModel'class'FunctionalElement'class { | ||
90 | type'FunctionalArchitectureModel'class & type'FunctionalElement'class = none | ||
91 | } | ||
92 | fact common'types'FAMTerminator'class'FunctionalElement'class { | ||
93 | type'FAMTerminator'class & type'FunctionalElement'class = none | ||
94 | } | ||
95 | fact common'types'FAMTerminator'class'FunctionalArchitectureModel'class { | ||
96 | type'FAMTerminator'class & type'FunctionalArchitectureModel'class = none | ||
97 | } | ||
98 | fact common'types'InformationLink'class'FunctionalElement'class { | ||
99 | type'InformationLink'class & type'FunctionalElement'class = none | ||
100 | } | ||
101 | fact common'types'InformationLink'class'FunctionalArchitectureModel'class { | ||
102 | type'InformationLink'class & type'FunctionalArchitectureModel'class = none | ||
103 | } | ||
104 | fact common'types'InformationLink'class'FAMTerminator'class { | ||
105 | type'InformationLink'class & type'FAMTerminator'class = none | ||
106 | } | ||
107 | fact common'types'FunctionalInterface'class'FunctionalElement'class { | ||
108 | type'FunctionalInterface'class & type'FunctionalElement'class = none | ||
109 | } | ||
110 | fact common'types'FunctionalInterface'class'FunctionalArchitectureModel'class { | ||
111 | type'FunctionalInterface'class & type'FunctionalArchitectureModel'class = none | ||
112 | } | ||
113 | fact common'types'FunctionalInterface'class'FAMTerminator'class { | ||
114 | type'FunctionalInterface'class & type'FAMTerminator'class = none | ||
115 | } | ||
116 | fact common'types'FunctionalInterface'class'InformationLink'class { | ||
117 | type'FunctionalInterface'class & type'InformationLink'class = none | ||
118 | } | ||
119 | fact common'types'FunctionalData'class'FunctionalElement'class { | ||
120 | type'FunctionalData'class & type'FunctionalElement'class = none | ||
121 | } | ||
122 | fact common'types'FunctionalData'class'FunctionalArchitectureModel'class { | ||
123 | type'FunctionalData'class & type'FunctionalArchitectureModel'class = none | ||
124 | } | ||
125 | fact common'types'FunctionalData'class'FAMTerminator'class { | ||
126 | type'FunctionalData'class & type'FAMTerminator'class = none | ||
127 | } | ||
128 | fact common'types'FunctionalData'class'InformationLink'class { | ||
129 | type'FunctionalData'class & type'InformationLink'class = none | ||
130 | } | ||
131 | fact common'types'FunctionalData'class'FunctionalInterface'class { | ||
132 | type'FunctionalData'class & type'FunctionalInterface'class = none | ||
133 | } | ||
134 | fact common'types'FunctionType'enum'FunctionalElement'class { | ||
135 | type'FunctionType'enum & type'FunctionalElement'class = none | ||
136 | } | ||
137 | fact common'types'FunctionType'enum'FunctionalArchitectureModel'class { | ||
138 | type'FunctionType'enum & type'FunctionalArchitectureModel'class = none | ||
139 | } | ||
140 | fact common'types'FunctionType'enum'FAMTerminator'class { | ||
141 | type'FunctionType'enum & type'FAMTerminator'class = none | ||
142 | } | ||
143 | fact common'types'FunctionType'enum'InformationLink'class { | ||
144 | type'FunctionType'enum & type'InformationLink'class = none | ||
145 | } | ||
146 | fact common'types'FunctionType'enum'FunctionalInterface'class { | ||
147 | type'FunctionType'enum & type'FunctionalInterface'class = none | ||
148 | } | ||
149 | fact common'types'FunctionType'enum'FunctionalData'class { | ||
150 | type'FunctionType'enum & type'FunctionalData'class = none | ||
151 | } | ||
152 | fact common'types'FunctionalArchitectureModel'class'UndefinedPart'FunctionalArchitectureModel'class'DefinedPart { | ||
153 | type'FunctionalArchitectureModel'class'UndefinedPart & type'FunctionalArchitectureModel'class'DefinedPart = none | ||
154 | } | ||
155 | fact common'types'FunctionalOutput'class'FunctionalInput'class { | ||
156 | type'FunctionalOutput'class & type'FunctionalInput'class = none | ||
157 | } | ||
158 | fact util'containmentDefinition { | ||
159 | util'language.util'contains = interface'reference'FunctionalElement + (rootElements'reference'FunctionalArchitectureModel + (subElements'reference'Function + (data'reference'FunctionalInterface + (outgoingLinks'reference'FunctionalOutput + terminator'reference'FunctionalData)))) | ||
160 | } | ||
161 | fact util'noParentForRoot { | ||
162 | no parent: type'FunctionalArchitectureModel'class + (type'FunctionalData'class + (type'Function'class + (type'FAMTerminator'class + (type'InformationLink'class + (type'FunctionalInterface'class + (type'FunctionalElement'class + (type'FunctionalInput'class + (type'FunctionalOutput'class + (type'FunctionalArchitectureModel'class'DefinedPart + type'FunctionalArchitectureModel'class'UndefinedPart))))))))) { parent->(util'language.util'root) in util'language.util'contains } | ||
163 | } | ||
164 | fact util'atLeastOneParent { | ||
165 | all child: type'FunctionalArchitectureModel'class + (type'FunctionalData'class + (type'Function'class + (type'FAMTerminator'class + (type'InformationLink'class + (type'FunctionalInterface'class + (type'FunctionalElement'class + (type'FunctionalInput'class + (type'FunctionalOutput'class + (type'FunctionalArchitectureModel'class'DefinedPart + type'FunctionalArchitectureModel'class'UndefinedPart))))))))) { child = util'language.util'root || (some parent: type'FunctionalArchitectureModel'class + (type'FunctionalData'class + (type'Function'class + (type'FAMTerminator'class + (type'InformationLink'class + (type'FunctionalInterface'class + (type'FunctionalElement'class + (type'FunctionalInput'class + (type'FunctionalOutput'class + (type'FunctionalArchitectureModel'class'DefinedPart + type'FunctionalArchitectureModel'class'UndefinedPart))))))))) { parent->child in util'language.util'contains }) } | ||
166 | } | ||
167 | fact util'noCircularContainment { | ||
168 | no circle: type'FunctionalArchitectureModel'class + (type'FunctionalData'class + (type'Function'class + (type'FAMTerminator'class + (type'InformationLink'class + (type'FunctionalInterface'class + (type'FunctionalElement'class + (type'FunctionalInput'class + (type'FunctionalOutput'class + (type'FunctionalArchitectureModel'class'DefinedPart + type'FunctionalArchitectureModel'class'UndefinedPart))))))))) { circle->circle in ^ (util'language.util'contains) } | ||
169 | } | ||
170 | fact lowerMultiplicity'model'FunctionalElement { | ||
171 | all src: type'FunctionalElement'class { some trg'1: type'FunctionalArchitectureModel'class { pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'model [ src , trg'1 ] } } | ||
172 | } | ||
173 | fact upperMultiplicity'model'FunctionalElement { | ||
174 | all src: type'FunctionalElement'class, trg'1: type'FunctionalArchitectureModel'class, trg'2: type'FunctionalArchitectureModel'class { pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'model [ src , trg'1 ] && pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'model [ src , trg'2 ] => ! (trg'1 != trg'2) } | ||
175 | } | ||
176 | fact oppositeReference'interface'FunctionalElement { | ||
177 | interface'reference'FunctionalElement = ~ element'reference'FunctionalInterface | ||
178 | } | ||
179 | fact oppositeReference'parent'FunctionalElement { | ||
180 | parent'reference'FunctionalElement = ~ subElements'reference'Function | ||
181 | } | ||
182 | fact oppositeReference'data'FAMTerminator { | ||
183 | data'reference'FAMTerminator = ~ terminator'reference'FunctionalData | ||
184 | } | ||
185 | fact oppositeReference'from'InformationLink { | ||
186 | from'reference'InformationLink = ~ outgoingLinks'reference'FunctionalOutput | ||
187 | } | ||
188 | fact oppositeReference'to'InformationLink { | ||
189 | to'reference'InformationLink = ~ IncomingLinks'reference'FunctionalInput | ||
190 | } | ||
191 | fact oppositeReference'data'FunctionalInterface { | ||
192 | data'reference'FunctionalInterface = ~ interface'reference'FunctionalData | ||
193 | } | ||
194 | fact lowerMultiplicity'type'Function { | ||
195 | all src: type'Function'class { some trg'1: type'FunctionType'enum { pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'type [ src , trg'1 ] } } | ||
196 | } | ||
197 | fact upperMultiplicity'type'Function { | ||
198 | all src: type'Function'class, trg'1: type'FunctionType'enum, trg'2: type'FunctionType'enum { pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'type [ src , trg'1 ] && pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'type [ src , trg'2 ] => ! (trg'1 != trg'2) } | ||
199 | } | ||
200 | fact errorpattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'terminatorAndInformation { | ||
201 | all p0: type'FAMTerminator'class, p1: type'InformationLink'class { ! (pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'terminatorAndInformation [ p0 , p1 ]) } | ||
202 | } | ||
203 | run { } for exactly 5 util'Object , 31 Int , exactly 0 String \ No newline at end of file | ||