diff options
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/case.study.pledge.run/src')
5 files changed, 387 insertions, 16 deletions
diff --git a/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/queries/case_study_A.vql b/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/queries/case_study_A.vql index f736ec58..01cdf372 100644 --- a/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/queries/case_study_A.vql +++ b/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/queries/case_study_A.vql | |||
@@ -285,29 +285,34 @@ pattern inv47(lur : Legal_Union_Record) { | |||
285 | Legal_Union_Record.start_year(lur, startY); | 285 | Legal_Union_Record.start_year(lur, startY); |
286 | neg find x_inv47(lur); | 286 | neg find x_inv47(lur); |
287 | check(startY >= endY); | 287 | check(startY >= endY); |
288 | } or { | ||
289 | Legal_Union_Record.end_year(lur, endY); | ||
290 | Legal_Union_Record.start_year(lur, startY); | ||
291 | check(endY!= -1); | ||
292 | check(startY >= endY); | ||
288 | } | 293 | } |
289 | pattern x_inv47(lur : Legal_Union_Record) { | 294 | pattern x_inv47(lur : Legal_Union_Record) { |
290 | Legal_Union_Record.separation_cause(lur, ::NONE); | 295 | Legal_Union_Record.separation_cause(lur, ::NONE); |
291 | Legal_Union_Record.end_year(lur, -1); | ||
292 | } | 296 | } |
293 | 297 | ||
294 | //inv48-attributes-handled by multiplicity | 298 | //inv48-attributes-handled by multiplicity |
295 | @Constraint(message = "inv48", severity = "error", key = {p}) | 299 | @Constraint(message = "inv48", severity = "error", key = {p}) |
296 | pattern inv48(p : Physical_Person) { | 300 | pattern inv48(p : Physical_Person) { |
297 | neg find x_inv48_notDis(p); | 301 | Physical_Person.disability_percentage(p, disPer); |
298 | neg find x_inv48_Dis(p); | 302 | check(disPer > 1.0); |
299 | } | 303 | } or { |
300 | pattern x_inv48_notDis(p : Physical_Person) { | 304 | Physical_Person.disability_percentage(p, disPer); |
301 | Physical_Person.disability_type(p, ::NONE); | 305 | check(disPer < 0.0); |
302 | Physical_Person.disability_percentage(p, 0.0); | 306 | } or { |
303 | } | 307 | Physical_Person.disability_type(p, ::NONE); |
304 | pattern x_inv48_Dis(p : Physical_Person) { | 308 | Physical_Person.disability_percentage(p, disPer); |
305 | neg find x_inv48_3(p); | 309 | check(disPer != 0.0); |
306 | Physical_Person.disability_percentage(p, disPer); | 310 | } or { |
307 | check(disPer > 0.0); | 311 | neg find x_inv48(p); |
308 | check(disPer <= 1.0); | 312 | Physical_Person.disability_percentage(p, disPer); |
313 | check(disPer == 0.0); | ||
309 | } | 314 | } |
310 | pattern x_inv48_3(p : Physical_Person) { | 315 | pattern x_inv48(p : Physical_Person) { |
311 | Physical_Person.disability_type(p, ::NONE); | 316 | Physical_Person.disability_type(p, ::NONE); |
312 | } | 317 | } |
313 | 318 | ||
diff --git a/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/queries/case_study_short.vql b/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/queries/case_study_short.vql new file mode 100644 index 00000000..f11ef7b7 --- /dev/null +++ b/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/queries/case_study_short.vql | |||
@@ -0,0 +1,51 @@ | |||
1 | package queries | ||
2 | |||
3 | import "http:///TaxCard.ecore" | ||
4 | |||
5 | //inv47-attributes-handled by multiplicity | ||
6 | //@Constraint(message = "inv47", severity = "error", key = {lur}) | ||
7 | //pattern inv47(lur : Legal_Union_Record) { | ||
8 | // Legal_Union_Record.end_year(lur, endY); | ||
9 | // Legal_Union_Record.start_year(lur, startY); | ||
10 | // neg find x_inv47(lur); | ||
11 | // check(startY >= endY); | ||
12 | //} or { | ||
13 | // Legal_Union_Record.end_year(lur, endY); | ||
14 | // Legal_Union_Record.start_year(lur, startY); | ||
15 | // check(endY!= -1); | ||
16 | // check(startY >= endY); | ||
17 | //} | ||
18 | //pattern x_inv47(lur : Legal_Union_Record) { | ||
19 | // Legal_Union_Record.separation_cause(lur, ::NONE); | ||
20 | //} | ||
21 | // | ||
22 | ////inv17-attribute-handled by multiplicity | ||
23 | //@Constraint(message = "inv17", severity = "error", key = {lur}) | ||
24 | //pattern inv17(lur : Legal_Union_Record) { | ||
25 | // Legal_Union_Record.start_year(lur, sy); | ||
26 | // check(sy < 1950); | ||
27 | //} or { | ||
28 | // Legal_Union_Record.start_year(lur, sy); | ||
29 | // check(sy > 2018); | ||
30 | //} | ||
31 | |||
32 | ////inv48-attributes-handled by multiplicity | ||
33 | @Constraint(message = "inv48", severity = "error", key = {p}) | ||
34 | pattern inv48(p : Physical_Person) { | ||
35 | Physical_Person.disability_percentage(p, disPer); | ||
36 | check(disPer > 1.0); | ||
37 | } or { | ||
38 | Physical_Person.disability_percentage(p, disPer); | ||
39 | check(disPer < 0.0); | ||
40 | } or { | ||
41 | Physical_Person.disability_type(p, ::NONE); | ||
42 | Physical_Person.disability_percentage(p, disPer); | ||
43 | check(disPer != 0.0); | ||
44 | } or { | ||
45 | neg find x_inv48(p); | ||
46 | Physical_Person.disability_percentage(p, disPer); | ||
47 | check(disPer == 0.0); | ||
48 | } | ||
49 | pattern x_inv48(p : Physical_Person) { | ||
50 | Physical_Person.disability_type(p, ::NONE); | ||
51 | } \ No newline at end of file | ||
diff --git a/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/queries/familyTreeConstraints.vql b/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/queries/familyTreeConstraints.vql new file mode 100644 index 00000000..fdbac640 --- /dev/null +++ b/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/queries/familyTreeConstraints.vql | |||
@@ -0,0 +1,41 @@ | |||
1 | package queries | ||
2 | |||
3 | import "http://www.example.org/familytree" | ||
4 | |||
5 | @Constraint(message="memberIsItsOwnParent", severity="error", key={m}) | ||
6 | pattern memberIsItsOwnParent(m: Member) = { | ||
7 | FamilyTree.members(_, m); | ||
8 | Member.parents(m, p); | ||
9 | m == p; | ||
10 | } | ||
11 | |||
12 | @Constraint(message="twoMembersHaveNoParent", severity="error", key={m1, m2}) | ||
13 | pattern twoMembersHaveNoParent(m1:Member, m2:Member) = { | ||
14 | neg find memberHasParent(m1); | ||
15 | neg find memberHasParent(m2); | ||
16 | m1 != m2; | ||
17 | } | ||
18 | |||
19 | pattern memberHasParent(m: Member) = { | ||
20 | Member.parents(m, _); | ||
21 | } | ||
22 | |||
23 | @Constraint(message="negativeAge", severity="error",key={m}) | ||
24 | pattern negativeAge(m: Member) { | ||
25 | Member.age(m,mage); | ||
26 | check(mage<0); | ||
27 | } | ||
28 | |||
29 | @Constraint(message="parentTooYoung", severity="error", key={c, p}) | ||
30 | pattern parentTooYoung(c: Member, p: Member) = { | ||
31 | FamilyTree.members(_, c); | ||
32 | Member.parents(c, p); | ||
33 | Member.age(c, cAge); | ||
34 | Member.age(p, pAge); | ||
35 | check (pAge <= (cAge + 12)); | ||
36 | } | ||
37 | |||
38 | |||
39 | |||
40 | |||
41 | |||
diff --git a/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/run/GenerateFromConfig.xtend b/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/run/GenerateFromConfig.xtend new file mode 100644 index 00000000..859a4455 --- /dev/null +++ b/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/run/GenerateFromConfig.xtend | |||
@@ -0,0 +1,274 @@ | |||
1 | package run | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigSpecification | ||
4 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigurationScript | ||
5 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.FileSpecification | ||
6 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.GenerationTask | ||
7 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.IntervallNumber | ||
8 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ObjectTypeScope | ||
9 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.RuntimeEntry | ||
10 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ScopeSpecification | ||
11 | import hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor | ||
12 | import hu.bme.mit.inf.dslreasoner.application.execution.StandaloneScriptExecutor | ||
13 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic | ||
14 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace | ||
15 | import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor | ||
16 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.TracedOutput | ||
17 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
18 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
19 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicResult | ||
20 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.ModelResult | ||
21 | import hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore | ||
22 | import hu.bme.mit.inf.dslreasoner.viatra2logic.ViatraQuerySetDescriptor | ||
23 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
24 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretation2Gml | ||
25 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasoner | ||
26 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasonerConfiguration | ||
27 | import hu.bme.mit.inf.dslreasoner.visualisation.pi2graphviz.GraphvizVisualiser | ||
28 | import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace | ||
29 | import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace | ||
30 | import java.io.PrintWriter | ||
31 | import java.math.BigDecimal | ||
32 | import java.text.SimpleDateFormat | ||
33 | import java.util.ArrayList | ||
34 | import java.util.Date | ||
35 | import java.util.HashMap | ||
36 | import java.util.List | ||
37 | import java.util.Map | ||
38 | import org.eclipse.core.runtime.NullProgressMonitor | ||
39 | import org.eclipse.emf.ecore.EAttribute | ||
40 | import org.eclipse.emf.ecore.EClass | ||
41 | import org.eclipse.emf.ecore.EEnum | ||
42 | import org.eclipse.emf.ecore.EEnumLiteral | ||
43 | import org.eclipse.emf.ecore.EObject | ||
44 | import org.eclipse.emf.ecore.EPackage | ||
45 | import org.eclipse.emf.ecore.EReference | ||
46 | import org.eclipse.emf.ecore.resource.Resource | ||
47 | import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl | ||
48 | import org.eclipse.viatra.query.runtime.api.IQueryGroup | ||
49 | |||
50 | class GenerateFromConfig { | ||
51 | static val SIZE_LB = 1 | ||
52 | static val SIZE_UB = 1 | ||
53 | static val SIZE_MUL = 1 | ||
54 | static val SIZE_INC = 5 | ||
55 | |||
56 | static var REPS = 1 | ||
57 | static val RUNTIME = 2100 | ||
58 | |||
59 | static val DOMAIN = "Taxation" // "FamilyTree", "Taxation" | ||
60 | static val QUERIES = true | ||
61 | static val INITIAL = true | ||
62 | static val INDIV_WRT = false | ||
63 | static val GLOBAL_WRT = false | ||
64 | static val q2t = if(QUERIES) "Y" else "N" | ||
65 | |||
66 | def static void main(String[] args) { | ||
67 | Resource.Factory.Registry.INSTANCE.extensionToFactoryMap.put("xmi", new XMIResourceFactoryImpl) | ||
68 | |||
69 | // Workspace setup | ||
70 | val Date date = new Date(System.currentTimeMillis) | ||
71 | val SimpleDateFormat format = new SimpleDateFormat("dd-HHmm"); | ||
72 | val formattedDate = DOMAIN + "-" + format.format(date) | ||
73 | |||
74 | val workspace = new FileSystemWorkspace('''output/''' + formattedDate + '''/''', "") | ||
75 | workspace.initAndClear | ||
76 | |||
77 | println("Input and output workspaces are created") | ||
78 | |||
79 | val executor = new ScriptExecutor | ||
80 | val path = "config//generic" + DOMAIN + ".vsconfig" | ||
81 | var ConfigurationScript config = StandaloneScriptExecutor.loadScript(path) | ||
82 | |||
83 | println("Config File loaded") | ||
84 | |||
85 | // ///////////////////////// | ||
86 | // BEGIN RUN | ||
87 | var PrintWriter global_writer = null | ||
88 | val header = "domain, queries?,size,model?,timeout,measuredTime,TransformatonTime,SolverTime\n" | ||
89 | if (GLOBAL_WRT) { | ||
90 | global_writer = new PrintWriter( | ||
91 | workspace.workspaceURI + "//_" + DOMAIN + SIZE_LB + "to" + SIZE_UB + "x" + REPS + "q" + q2t + "-" + | ||
92 | formattedDate + ".csv") | ||
93 | global_writer.append(header) | ||
94 | } | ||
95 | |||
96 | var NEXT_INC = SIZE_INC | ||
97 | for (var size = SIZE_LB; size <= SIZE_UB; size += NEXT_INC) { | ||
98 | NEXT_INC *= SIZE_MUL | ||
99 | |||
100 | var PrintWriter indiv_writer = null | ||
101 | if (INDIV_WRT) { | ||
102 | indiv_writer = new PrintWriter( // TODO | ||
103 | workspace.workspaceURI + "//__" + DOMAIN + "Sz" + size + "x" + REPS + "q" + q2t + "-" + formattedDate + | ||
104 | ".csv") | ||
105 | indiv_writer.append(header) | ||
106 | } | ||
107 | |||
108 | println() | ||
109 | println("DOMAIN: " + DOMAIN + ", SIZE=" + size) | ||
110 | |||
111 | for (var i = 0; i < REPS; i++) { | ||
112 | |||
113 | print("<<Run number " + i + ">> : ") | ||
114 | |||
115 | |||
116 | // ///////////////////////////////////////////////////// | ||
117 | // Define Config File | ||
118 | val knownIntegers = new ArrayList<Integer> | ||
119 | knownIntegers.addAll(0, 10, 20, 30, 40, 50) | ||
120 | |||
121 | val knownReals = new ArrayList<BigDecimal> | ||
122 | knownReals.addAll(new BigDecimal("0.0")) | ||
123 | |||
124 | val knownStrings = new ArrayList<String> | ||
125 | knownStrings.addAll("r0", "r1", "r2", "r3", "r4", "r5", "r6") | ||
126 | |||
127 | val outputPath = "output/" + formattedDate + "/size" + size + "/run" + i + "/models/" | ||
128 | val debugPath = "output/" + formattedDate + "/size" + size + "/run" + i + "/debug/" | ||
129 | val logPath = debugPath + "log.txt" | ||
130 | val statsPath = debugPath + "statistics.csv" | ||
131 | |||
132 | // Adjust configuration | ||
133 | val genTask = config.commands.get(0) as GenerationTask | ||
134 | if(!QUERIES) genTask.patterns = null | ||
135 | if(!INITIAL) genTask.partialModel = null | ||
136 | |||
137 | val scopeSpec = genTask.scope as ScopeSpecification | ||
138 | val objScope = scopeSpec.scopes.get(0) as ObjectTypeScope | ||
139 | val interval = objScope.number as IntervallNumber | ||
140 | interval.min = size | ||
141 | interval.maxUnlimited = true | ||
142 | |||
143 | val configScope = genTask.config as ConfigSpecification | ||
144 | val runtimeEntry = configScope.entries.get(0) as RuntimeEntry | ||
145 | runtimeEntry.millisecLimit = RUNTIME | ||
146 | |||
147 | // TODO add known ints, reals, string... | ||
148 | val debug = genTask.debugFolder as FileSpecification | ||
149 | debug.path = debugPath | ||
150 | val output = genTask.tagetFolder as FileSpecification | ||
151 | output.path = outputPath | ||
152 | val log = genTask.targetLogFile as FileSpecification | ||
153 | log.path = logPath | ||
154 | val stats = genTask.targetStatisticsFile as FileSpecification | ||
155 | stats.path = statsPath | ||
156 | |||
157 | // workspace.writeModel(config, '''x.xmi''') | ||
158 | val startTime = System.currentTimeMillis | ||
159 | executor.executeScript(config, new NullProgressMonitor) | ||
160 | val measuredTime = System.currentTimeMillis - startTime | ||
161 | |||
162 | println("<<END ->" + measuredTime / 1000.0 + "s >>\n") | ||
163 | |||
164 | // val toAddtoCSV = DOMAIN + "," + QUERIES + "," + size + "," + | ||
165 | // (solution.class == ModelResultImpl).toString + "," + RUNTIME + "," + measuredTime / 1000.0 + "," + | ||
166 | // solution.statistics.transformationTime / 1000.0 + "," + solution.statistics.solverTime / 1000.0 + | ||
167 | // "\n" | ||
168 | // | ||
169 | // if(GLOBAL_WRT) global_writer.append(toAddtoCSV) | ||
170 | // if(INDIV_WRT) indiv_writer.append(toAddtoCSV) | ||
171 | // solution.writeStats(totalTime, solverConfig) | ||
172 | // Run Garbage Collector | ||
173 | val Runtime r = Runtime.getRuntime(); | ||
174 | r.gc(); | ||
175 | r.gc(); | ||
176 | r.gc(); | ||
177 | Thread.sleep(3000) | ||
178 | } | ||
179 | if(INDIV_WRT) indiv_writer.close | ||
180 | } | ||
181 | if(GLOBAL_WRT) global_writer.close | ||
182 | } | ||
183 | |||
184 | def static Map<Type, Integer> getTypeMap(Map<Class, Integer> classMap, EcoreMetamodelDescriptor metamodel, | ||
185 | Ecore2Logic e2l, Ecore2Logic_Trace trace) { | ||
186 | val typeMap = new HashMap<Type, Integer> | ||
187 | val listMap = metamodel.classes.toMap[s|s.name] | ||
188 | |||
189 | for (Class elem : classMap.keySet) { | ||
190 | typeMap.put(e2l.TypeofEClass( | ||
191 | trace, | ||
192 | listMap.get(elem.simpleName) | ||
193 | ), classMap.get(elem)) | ||
194 | } | ||
195 | return typeMap | ||
196 | } | ||
197 | |||
198 | def static loadMetamodel(EPackage pckg) { | ||
199 | val List<EClass> classes = pckg.getEClassifiers.filter(EClass).toList | ||
200 | val List<EEnum> enums = pckg.getEClassifiers.filter(EEnum).toList | ||
201 | val List<EEnumLiteral> literals = enums.map[getELiterals].flatten.toList | ||
202 | val List<EReference> references = classes.map[getEReferences].flatten.toList | ||
203 | val List<EAttribute> attributes = classes.map[getEAttributes].flatten.toList | ||
204 | return new EcoreMetamodelDescriptor(classes, #{}, false, enums, literals, references, attributes) | ||
205 | } | ||
206 | |||
207 | def static loadPartialModel(ReasonerWorkspace inputs, String path) { | ||
208 | Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("*", new XMIResourceFactoryImpl()) | ||
209 | inputs.readModel(EObject, path).eResource.contents | ||
210 | // inputs.readModel(EObject,"FamInstance.xmi").eResource.allContents.toList | ||
211 | } | ||
212 | |||
213 | def static loadQueries(EcoreMetamodelDescriptor metamodel, IQueryGroup i) { | ||
214 | val patterns = i.specifications.toList | ||
215 | val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name == "Constraint"]].toSet | ||
216 | val derivedFeatures = emptyMap | ||
217 | // NO DERIVED FEATURES | ||
218 | // val derivedFeatures = new LinkedHashMap | ||
219 | // derivedFeatures.put(i.type,metamodel.attributes.filter[it.name == "type"].head) | ||
220 | // derivedFeatures.put(i.model,metamodel.references.filter[it.name == "model"].head) | ||
221 | val res = new ViatraQuerySetDescriptor( | ||
222 | patterns, | ||
223 | wfPatterns, | ||
224 | derivedFeatures | ||
225 | ) | ||
226 | return res | ||
227 | } | ||
228 | |||
229 | def static writeInterpretation(LogicResult solution, Logic2Ecore logic2Ecore, ReasonerWorkspace workspace, | ||
230 | String id, ViatraReasoner reasoner, TracedOutput<LogicProblem, Ecore2Logic_Trace> mgProb) { | ||
231 | val interpretations = reasoner.getInterpretations(solution as ModelResult) | ||
232 | for (interpIndex : 0 ..< interpretations.size) { | ||
233 | // val extension b = new LogicStructureBuilder | ||
234 | // val extension a = new LogicProblemBuilder | ||
235 | val interpretation = interpretations.get(interpIndex) | ||
236 | val model = logic2Ecore.transformInterpretation(interpretation, mgProb.trace) | ||
237 | // println(model) | ||
238 | workspace.writeModel(model, '''sol-«id»_«interpIndex».xmi''') | ||
239 | } | ||
240 | } | ||
241 | |||
242 | def static writeRepresentation(LogicResult solution, ReasonerWorkspace workspace, String id) { | ||
243 | val representations = solution.representation | ||
244 | for (representationIndex : 0 ..< representations.size) { | ||
245 | val representation = representations.get(representationIndex) | ||
246 | if (representation instanceof PartialInterpretation) { | ||
247 | val gml = (new PartialInterpretation2Gml).transform(representation) | ||
248 | workspace.writeText('''sol-«id»_«representationIndex».gml''', gml) | ||
249 | |||
250 | val png = (new GraphvizVisualiser).visualiseConcretization(representation) | ||
251 | // println(png) | ||
252 | png.writeToFile(workspace, '''sol-«id»_«representationIndex».png''') | ||
253 | |||
254 | // workspace.writeModel(representation, '''solution«representationIndex».partialintrpretation''') | ||
255 | } else { | ||
256 | workspace.writeText('''sol-«representationIndex».txt''', representation.toString) | ||
257 | } | ||
258 | } | ||
259 | } | ||
260 | |||
261 | def static writeStats(LogicResult solution, long time, ViatraReasonerConfiguration config) { | ||
262 | val stats = solution.statistics | ||
263 | println(" Statistics:") | ||
264 | // for (e : stats.entries.filter[name.substring(0, 9) == "_Solution"]) { | ||
265 | // println(" " + e.name + ": " + (e as IntStatisticEntry).value + " ms") | ||
266 | // } | ||
267 | println( | ||
268 | " #new nodes : [" + config.typeScopes.minNewElements + ".." + | ||
269 | (if(config.typeScopes.maxNewElements == 2147483647) "*" else config.typeScopes.maxNewElements) + "]") | ||
270 | println(" \"solve\" time: " + time as double / 1000 + " s") | ||
271 | |||
272 | // println("<<End Statistics>>") | ||
273 | } | ||
274 | } | ||
diff --git a/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/run/GeneratePledgeModels.xtend b/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/run/GeneratePledgeModels.xtend index 3f5855d8..23a34bf1 100644 --- a/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/run/GeneratePledgeModels.xtend +++ b/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/run/GeneratePledgeModels.xtend | |||
@@ -99,12 +99,12 @@ def static void main(String[] args) { | |||
99 | case "Taxation": { | 99 | case "Taxation": { |
100 | metamodel = loadMetamodel(TaxationPackage.eINSTANCE) | 100 | metamodel = loadMetamodel(TaxationPackage.eINSTANCE) |
101 | partialModel = loadPartialModel(inputs, "Household.xmi") | 101 | partialModel = loadPartialModel(inputs, "Household.xmi") |
102 | queries = loadQueries(metamodel, Case_study_A.instance) | 102 | // queries = loadQueries(metamodel, Case_study_A.instance) |
103 | } | 103 | } |
104 | case "FamilyTree": { | 104 | case "FamilyTree": { |
105 | metamodel = loadMetamodel(FamilytreePackage.eINSTANCE) | 105 | metamodel = loadMetamodel(FamilytreePackage.eINSTANCE) |
106 | partialModel = loadPartialModel(inputs, "FamilyTree.xmi") | 106 | partialModel = loadPartialModel(inputs, "FamilyTree.xmi") |
107 | queries = loadQueries(metamodel, FamilyTreeConstraints.instance) | 107 | // queries = loadQueries(metamodel, FamilyTreeConstraints.instance) |
108 | } | 108 | } |
109 | default: { | 109 | default: { |
110 | System.err.println("Unsupported Domain") | 110 | System.err.println("Unsupported Domain") |