diff options
Diffstat (limited to 'Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire')
12 files changed, 1 insertions, 113 deletions
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.EcoreTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.EcoreTest.xtendbin index 57fe8c2d..99a457d4 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.EcoreTest.xtendbin +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.EcoreTest.xtendbin | |||
Binary files differ | |||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FAMTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FAMTest.xtendbin index 41284af1..e8451eb9 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FAMTest.xtendbin +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FAMTest.xtendbin | |||
Binary files differ | |||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FileSystemTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FileSystemTest.xtendbin index 36f2c6e1..73c6ab49 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FileSystemTest.xtendbin +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FileSystemTest.xtendbin | |||
Binary files differ | |||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.GeneralTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.GeneralTest.xtendbin index ce6042ea..b6cabaa6 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.GeneralTest.xtendbin +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.GeneralTest.xtendbin | |||
Binary files differ | |||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.YakinduTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.YakinduTest.xtendbin index 270ac043..ae6fb160 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.YakinduTest.xtendbin +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.YakinduTest.xtendbin | |||
Binary files differ | |||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/GeneralTest.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/GeneralTest.java index 13a0e74a..80cec4b9 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/GeneralTest.java +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/GeneralTest.java | |||
@@ -108,7 +108,7 @@ public class GeneralTest { | |||
108 | final Procedure1<VampireSolverConfiguration> _function_2 = (VampireSolverConfiguration it) -> { | 108 | final Procedure1<VampireSolverConfiguration> _function_2 = (VampireSolverConfiguration it) -> { |
109 | it.documentationLevel = DocumentationLevel.FULL; | 109 | it.documentationLevel = DocumentationLevel.FULL; |
110 | it.typeScopes.minNewElements = 6; | 110 | it.typeScopes.minNewElements = 6; |
111 | it.typeScopes.maxNewElements = 8; | 111 | it.typeScopes.maxNewElements = 40; |
112 | it.typeScopes.minNewElementsByType = typeMapMin; | 112 | it.typeScopes.minNewElementsByType = typeMapMin; |
113 | it.typeScopes.maxNewElementsByType = typeMapMax; | 113 | it.typeScopes.maxNewElementsByType = typeMapMax; |
114 | }; | 114 | }; |
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icseTest/.gitignore b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icseTest/.gitignore deleted file mode 100644 index f3e21798..00000000 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icseTest/.gitignore +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | /.FAMTest.java._trace | ||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.DslTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.DslTest.xtendbin deleted file mode 100644 index 59f57d8b..00000000 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.DslTest.xtendbin +++ /dev/null | |||
Binary files differ | |||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.MedicalSystem.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.MedicalSystem.xtendbin index 693ee01d..6cae3219 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.MedicalSystem.xtendbin +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.MedicalSystem.xtendbin | |||
Binary files differ | |||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.SimpleRun.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.SimpleRun.xtendbin index 7e61c0ef..22dda149 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.SimpleRun.xtendbin +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.SimpleRun.xtendbin | |||
Binary files differ | |||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.VampireTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.VampireTest.xtendbin index 8a554a42..857ee2e7 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.VampireTest.xtendbin +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.VampireTest.xtendbin | |||
Binary files differ | |||
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/FAMTest.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/FAMTest.java deleted file mode 100644 index 7b4849e1..00000000 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/FAMTest.java +++ /dev/null | |||
@@ -1,111 +0,0 @@ | |||
1 | package ca.mcgill.ecse.dslreasoner.vampire.test; | ||
2 | |||
3 | import ca.mcgill.ecse.dslreasoner.vampire.reasoner.VampireSolver; | ||
4 | import ca.mcgill.ecse.dslreasoner.vampire.reasoner.VampireSolverConfiguration; | ||
5 | import com.google.common.collect.Iterables; | ||
6 | import functionalarchitecture.FunctionalarchitecturePackage; | ||
7 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic; | ||
8 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2LogicConfiguration; | ||
9 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace; | ||
10 | import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor; | ||
11 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner; | ||
12 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.TracedOutput; | ||
13 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem; | ||
14 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicResult; | ||
15 | import hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore; | ||
16 | import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic; | ||
17 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2Logic; | ||
18 | import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace; | ||
19 | import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace; | ||
20 | import java.util.Collections; | ||
21 | import java.util.List; | ||
22 | import java.util.Map; | ||
23 | import org.eclipse.emf.common.util.EList; | ||
24 | import org.eclipse.emf.ecore.EAttribute; | ||
25 | import org.eclipse.emf.ecore.EClass; | ||
26 | import org.eclipse.emf.ecore.EEnum; | ||
27 | import org.eclipse.emf.ecore.EEnumLiteral; | ||
28 | import org.eclipse.emf.ecore.EObject; | ||
29 | import org.eclipse.emf.ecore.EReference; | ||
30 | import org.eclipse.emf.ecore.resource.Resource; | ||
31 | import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; | ||
32 | import org.eclipse.xtend2.lib.StringConcatenation; | ||
33 | import org.eclipse.xtext.xbase.lib.CollectionLiterals; | ||
34 | import org.eclipse.xtext.xbase.lib.Exceptions; | ||
35 | import org.eclipse.xtext.xbase.lib.Functions.Function1; | ||
36 | import org.eclipse.xtext.xbase.lib.InputOutput; | ||
37 | import org.eclipse.xtext.xbase.lib.IterableExtensions; | ||
38 | import org.eclipse.xtext.xbase.lib.IteratorExtensions; | ||
39 | import org.eclipse.xtext.xbase.lib.ListExtensions; | ||
40 | import org.eclipse.xtext.xbase.lib.ObjectExtensions; | ||
41 | import org.eclipse.xtext.xbase.lib.Procedures.Procedure1; | ||
42 | |||
43 | @SuppressWarnings("all") | ||
44 | public class DslTest { | ||
45 | public static void main(final String[] args) { | ||
46 | try { | ||
47 | StringConcatenation _builder = new StringConcatenation(); | ||
48 | _builder.append("initialModels/"); | ||
49 | final FileSystemWorkspace inputs = new FileSystemWorkspace(_builder.toString(), ""); | ||
50 | StringConcatenation _builder_1 = new StringConcatenation(); | ||
51 | _builder_1.append("outputDslModels/"); | ||
52 | final FileSystemWorkspace workspace = new FileSystemWorkspace(_builder_1.toString(), ""); | ||
53 | workspace.initAndClear(); | ||
54 | InputOutput.<String>println("Input and output workspaces are created"); | ||
55 | final EcoreMetamodelDescriptor metamodel = DslTest.loadMetamodel(); | ||
56 | final List<EObject> partialModel = DslTest.loadPartialModel(inputs); | ||
57 | InputOutput.<String>println("DSL loaded"); | ||
58 | final Ecore2Logic ecore2Logic = new Ecore2Logic(); | ||
59 | final Logic2Ecore logic2Ecore = new Logic2Ecore(ecore2Logic); | ||
60 | final Viatra2Logic viatra2Logic = new Viatra2Logic(ecore2Logic); | ||
61 | final InstanceModel2Logic instanceModel2Logic = new InstanceModel2Logic(); | ||
62 | Ecore2LogicConfiguration _ecore2LogicConfiguration = new Ecore2LogicConfiguration(); | ||
63 | final TracedOutput<LogicProblem, Ecore2Logic_Trace> modelGenerationProblem = ecore2Logic.transformMetamodel(metamodel, _ecore2LogicConfiguration); | ||
64 | final LogicProblem logicProblem = modelGenerationProblem.getOutput(); | ||
65 | InputOutput.<String>println("Problem created"); | ||
66 | LogicResult solution = null; | ||
67 | LogicReasoner reasoner = null; | ||
68 | VampireSolver _vampireSolver = new VampireSolver(); | ||
69 | reasoner = _vampireSolver; | ||
70 | VampireSolverConfiguration _vampireSolverConfiguration = new VampireSolverConfiguration(); | ||
71 | final Procedure1<VampireSolverConfiguration> _function = (VampireSolverConfiguration it) -> { | ||
72 | it.writeToFile = false; | ||
73 | }; | ||
74 | final VampireSolverConfiguration vampireConfig = ObjectExtensions.<VampireSolverConfiguration>operator_doubleArrow(_vampireSolverConfiguration, _function); | ||
75 | solution = reasoner.solve(logicProblem, vampireConfig, workspace); | ||
76 | InputOutput.<String>println("Problem solved"); | ||
77 | } catch (Throwable _e) { | ||
78 | throw Exceptions.sneakyThrow(_e); | ||
79 | } | ||
80 | } | ||
81 | |||
82 | private static EcoreMetamodelDescriptor loadMetamodel() { | ||
83 | final FunctionalarchitecturePackage pckg = FunctionalarchitecturePackage.eINSTANCE; | ||
84 | final List<EClass> classes = IterableExtensions.<EClass>toList(Iterables.<EClass>filter(pckg.getEClassifiers(), EClass.class)); | ||
85 | final List<EEnum> enums = IterableExtensions.<EEnum>toList(Iterables.<EEnum>filter(pckg.getEClassifiers(), EEnum.class)); | ||
86 | final Function1<EEnum, EList<EEnumLiteral>> _function = (EEnum it) -> { | ||
87 | return it.getELiterals(); | ||
88 | }; | ||
89 | final List<EEnumLiteral> literals = IterableExtensions.<EEnumLiteral>toList(Iterables.<EEnumLiteral>concat(ListExtensions.<EEnum, EList<EEnumLiteral>>map(enums, _function))); | ||
90 | final Function1<EClass, EList<EReference>> _function_1 = (EClass it) -> { | ||
91 | return it.getEReferences(); | ||
92 | }; | ||
93 | final List<EReference> references = IterableExtensions.<EReference>toList(Iterables.<EReference>concat(ListExtensions.<EClass, EList<EReference>>map(classes, _function_1))); | ||
94 | final Function1<EClass, EList<EAttribute>> _function_2 = (EClass it) -> { | ||
95 | return it.getEAttributes(); | ||
96 | }; | ||
97 | final List<EAttribute> attributes = IterableExtensions.<EAttribute>toList(Iterables.<EAttribute>concat(ListExtensions.<EClass, EList<EAttribute>>map(classes, _function_2))); | ||
98 | return new EcoreMetamodelDescriptor(classes, Collections.<EClass>unmodifiableSet(CollectionLiterals.<EClass>newHashSet()), false, enums, literals, references, attributes); | ||
99 | } | ||
100 | |||
101 | private static List<EObject> loadPartialModel(final ReasonerWorkspace inputs) { | ||
102 | List<EObject> _xblockexpression = null; | ||
103 | { | ||
104 | Map<String, Object> _extensionToFactoryMap = Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap(); | ||
105 | XMIResourceFactoryImpl _xMIResourceFactoryImpl = new XMIResourceFactoryImpl(); | ||
106 | _extensionToFactoryMap.put("*", _xMIResourceFactoryImpl); | ||
107 | _xblockexpression = IteratorExtensions.<EObject>toList(inputs.<EObject>readModel(EObject.class, "FunctionalArchitectureModel.xmi").eResource().getAllContents()); | ||
108 | } | ||
109 | return _xblockexpression; | ||
110 | } | ||
111 | } | ||