diff options
author | ArenBabikian <aren.babikian@mail.mcgill.ca> | 2019-04-24 19:54:57 -0400 |
---|---|---|
committer | ArenBabikian <aren.babikian@mail.mcgill.ca> | 2020-06-07 19:37:06 -0400 |
commit | 06b2801cd5893ced25745d79959592f99b4ef83b (patch) | |
tree | c1b5ae4feb156332847bf0cc7c30a30f5f893d64 /Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner | |
parent | VAMPIRE: add to #40. I am tired (diff) | |
download | VIATRA-Generator-06b2801cd5893ced25745d79959592f99b4ef83b.tar.gz VIATRA-Generator-06b2801cd5893ced25745d79959592f99b4ef83b.tar.zst VIATRA-Generator-06b2801cd5893ced25745d79959592f99b4ef83b.zip |
VAMPIRE : initial model handling almost done. only typeScope remains #40
Diffstat (limited to 'Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner')
3 files changed, 13 insertions, 9 deletions
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/FAMTest.xtend b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/FAMTest.xtend index bbea9822..ccf36550 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/FAMTest.xtend +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/FAMTest.xtend | |||
@@ -17,6 +17,7 @@ import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace | |||
17 | import java.util.HashMap | 17 | import java.util.HashMap |
18 | import org.eclipse.emf.ecore.resource.Resource | 18 | import org.eclipse.emf.ecore.resource.Resource |
19 | import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl | 19 | import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl |
20 | import functionalarchitecture.FunctionalArchitectureModel | ||
20 | 21 | ||
21 | class FAMTest { | 22 | class FAMTest { |
22 | def static void main(String[] args) { | 23 | def static void main(String[] args) { |
@@ -46,7 +47,7 @@ class FAMTest { | |||
46 | 47 | ||
47 | val modelGenerationProblem = ecore2Logic.transformMetamodel(metamodel, new Ecore2LogicConfiguration()) | 48 | val modelGenerationProblem = ecore2Logic.transformMetamodel(metamodel, new Ecore2LogicConfiguration()) |
48 | var problem = modelGenerationProblem.output | 49 | var problem = modelGenerationProblem.output |
49 | problem = instanceModel2Logic.transform(modelGenerationProblem, partialModel).output | 50 | // problem = instanceModel2Logic.transform(modelGenerationProblem, partialModel).output |
50 | // problem = viatra2Logic.transformQueries(queries, modelGenerationProblem, new Viatra2LogicConfiguration).output | 51 | // problem = viatra2Logic.transformQueries(queries, modelGenerationProblem, new Viatra2LogicConfiguration).output |
51 | workspace.writeModel(problem, "Fam.logicproblem") | 52 | workspace.writeModel(problem, "Fam.logicproblem") |
52 | 53 | ||
@@ -62,6 +63,7 @@ class FAMTest { | |||
62 | // ///////////////////////////////////////////////////// | 63 | // ///////////////////////////////////////////////////// |
63 | // Minimum Scope | 64 | // Minimum Scope |
64 | val classMapMin = new HashMap<Class, Integer> | 65 | val classMapMin = new HashMap<Class, Integer> |
66 | classMapMin.put(FunctionalArchitectureModel, 1) | ||
65 | classMapMin.put(Function, 1) | 67 | classMapMin.put(Function, 1) |
66 | classMapMin.put(FunctionalInterface, 2) | 68 | classMapMin.put(FunctionalInterface, 2) |
67 | classMapMin.put(FunctionalOutput, 3) | 69 | classMapMin.put(FunctionalOutput, 3) |
@@ -70,6 +72,7 @@ class FAMTest { | |||
70 | 72 | ||
71 | // Maximum Scope | 73 | // Maximum Scope |
72 | val classMapMax = new HashMap<Class, Integer> | 74 | val classMapMax = new HashMap<Class, Integer> |
75 | classMapMax.put(FunctionalArchitectureModel, 3) | ||
73 | classMapMax.put(Function, 5) | 76 | classMapMax.put(Function, 5) |
74 | classMapMax.put(FunctionalInterface, 2) | 77 | classMapMax.put(FunctionalInterface, 2) |
75 | classMapMax.put(FunctionalOutput, 4) | 78 | classMapMax.put(FunctionalOutput, 4) |
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/FileSystemTest.xtend b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/FileSystemTest.xtend index d4cbb299..61a20a34 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/FileSystemTest.xtend +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/FileSystemTest.xtend | |||
@@ -43,7 +43,7 @@ class FileSystemTest { | |||
43 | 43 | ||
44 | val modelGenerationProblem = ecore2Logic.transformMetamodel(metamodel, new Ecore2LogicConfiguration()) | 44 | val modelGenerationProblem = ecore2Logic.transformMetamodel(metamodel, new Ecore2LogicConfiguration()) |
45 | var problem = modelGenerationProblem.output | 45 | var problem = modelGenerationProblem.output |
46 | // problem = instanceModel2Logic.transform(modelGenerationProblem, partialModel).output | 46 | problem = instanceModel2Logic.transform(modelGenerationProblem, partialModel).output |
47 | // problem = viatra2Logic.transformQueries(queries, modelGenerationProblem, new Viatra2LogicConfiguration).output | 47 | // problem = viatra2Logic.transformQueries(queries, modelGenerationProblem, new Viatra2LogicConfiguration).output |
48 | workspace.writeModel(problem, "FileSystem.logicproblem") | 48 | workspace.writeModel(problem, "FileSystem.logicproblem") |
49 | 49 | ||
@@ -76,8 +76,8 @@ class FileSystemTest { | |||
76 | // add configuration things, in config file first | 76 | // add configuration things, in config file first |
77 | it.documentationLevel = DocumentationLevel::FULL | 77 | it.documentationLevel = DocumentationLevel::FULL |
78 | 78 | ||
79 | it.typeScopes.minNewElements = 40 | 79 | it.typeScopes.minNewElements = 10 |
80 | it.typeScopes.maxNewElements = 59 | 80 | it.typeScopes.maxNewElements = 25 |
81 | if(typeMapMin.size != 0) it.typeScopes.minNewElementsByType = typeMapMin | 81 | if(typeMapMin.size != 0) it.typeScopes.minNewElementsByType = typeMapMin |
82 | if(typeMapMin.size != 0) it.typeScopes.maxNewElementsByType = typeMapMax | 82 | if(typeMapMin.size != 0) it.typeScopes.maxNewElementsByType = typeMapMax |
83 | it.contCycleLevel = 5 | 83 | it.contCycleLevel = 5 |
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/YakinduTest.xtend b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/YakinduTest.xtend index f0d88b49..3342c18a 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/YakinduTest.xtend +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/YakinduTest.xtend | |||
@@ -14,6 +14,7 @@ import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace | |||
14 | import java.util.HashMap | 14 | import java.util.HashMap |
15 | import org.eclipse.emf.ecore.resource.Resource | 15 | import org.eclipse.emf.ecore.resource.Resource |
16 | import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl | 16 | import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl |
17 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region | ||
17 | 18 | ||
18 | class YakinduTest { | 19 | class YakinduTest { |
19 | def static void main(String[] args) { | 20 | def static void main(String[] args) { |
@@ -42,7 +43,7 @@ class YakinduTest { | |||
42 | 43 | ||
43 | val modelGenerationProblem = ecore2Logic.transformMetamodel(metamodel, new Ecore2LogicConfiguration()) | 44 | val modelGenerationProblem = ecore2Logic.transformMetamodel(metamodel, new Ecore2LogicConfiguration()) |
44 | var problem = modelGenerationProblem.output | 45 | var problem = modelGenerationProblem.output |
45 | // problem = instanceModel2Logic.transform(modelGenerationProblem, partialModel).output | 46 | problem = instanceModel2Logic.transform(modelGenerationProblem, partialModel).output |
46 | // problem = viatra2Logic.transformQueries(queries, modelGenerationProblem, new Viatra2LogicConfiguration).output | 47 | // problem = viatra2Logic.transformQueries(queries, modelGenerationProblem, new Viatra2LogicConfiguration).output |
47 | workspace.writeModel(problem, "Yakindu.logicproblem") | 48 | workspace.writeModel(problem, "Yakindu.logicproblem") |
48 | 49 | ||
@@ -58,14 +59,14 @@ class YakinduTest { | |||
58 | // ///////////////////////////////////////////////////// | 59 | // ///////////////////////////////////////////////////// |
59 | // Minimum Scope | 60 | // Minimum Scope |
60 | val classMapMin = new HashMap<Class, Integer> | 61 | val classMapMin = new HashMap<Class, Integer> |
61 | // classMapMin.put(Function, 1) | 62 | classMapMin.put(Region, 1) |
62 | // classMapMin.put(FunctionalInterface, 2) | 63 | // classMapMin.put(FunctionalInterface, 2) |
63 | // classMapMin.put(FunctionalOutput, 3) | 64 | // classMapMin.put(FunctionalOutput, 3) |
64 | val typeMapMin = GeneralTest.getTypeMap(classMapMin, metamodel, ecore2Logic, modelGenerationProblem.trace) | 65 | val typeMapMin = GeneralTest.getTypeMap(classMapMin, metamodel, ecore2Logic, modelGenerationProblem.trace) |
65 | 66 | ||
66 | // Maximum Scope | 67 | // Maximum Scope |
67 | val classMapMax = new HashMap<Class, Integer> | 68 | val classMapMax = new HashMap<Class, Integer> |
68 | // classMapMax.put(Function, 5) | 69 | classMapMax.put(Region, 5) |
69 | // classMapMax.put(FunctionalInterface, 2) | 70 | // classMapMax.put(FunctionalInterface, 2) |
70 | // classMapMax.put(FunctionalOutput, 4) | 71 | // classMapMax.put(FunctionalOutput, 4) |
71 | val typeMapMax = GeneralTest.getTypeMap(classMapMax, metamodel, ecore2Logic, modelGenerationProblem.trace) | 72 | val typeMapMax = GeneralTest.getTypeMap(classMapMax, metamodel, ecore2Logic, modelGenerationProblem.trace) |
@@ -75,8 +76,8 @@ class YakinduTest { | |||
75 | // add configuration things, in config file first | 76 | // add configuration things, in config file first |
76 | it.documentationLevel = DocumentationLevel::FULL | 77 | it.documentationLevel = DocumentationLevel::FULL |
77 | 78 | ||
78 | it.typeScopes.minNewElements = 53 | 79 | it.typeScopes.minNewElements = 20 |
79 | it.typeScopes.maxNewElements = 53 | 80 | it.typeScopes.maxNewElements = 30 |
80 | if(typeMapMin.size != 0) it.typeScopes.minNewElementsByType = typeMapMin | 81 | if(typeMapMin.size != 0) it.typeScopes.minNewElementsByType = typeMapMin |
81 | if(typeMapMin.size != 0) it.typeScopes.maxNewElementsByType = typeMapMax | 82 | if(typeMapMin.size != 0) it.typeScopes.maxNewElementsByType = typeMapMax |
82 | it.contCycleLevel = 5 | 83 | it.contCycleLevel = 5 |