diff options
Diffstat (limited to 'Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/MedicalSystem.java')
-rw-r--r-- | Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/MedicalSystem.java | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/MedicalSystem.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/MedicalSystem.java new file mode 100644 index 00000000..d4f53d65 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/MedicalSystem.java | |||
@@ -0,0 +1,78 @@ | |||
1 | package ca.mcgill.ecse.dslreasoner.vampire.test; | ||
2 | |||
3 | import ca.mcgill.ecse.dslreasoner.VampireLanguageStandaloneSetup; | ||
4 | import ca.mcgill.ecse.dslreasoner.vampire.reasoner.VampireSolver; | ||
5 | import ca.mcgill.ecse.dslreasoner.vampire.reasoner.VampireSolverConfiguration; | ||
6 | import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.Ecore2logicannotationsPackage; | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner; | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage; | ||
9 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem; | ||
10 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicproblemPackage; | ||
11 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicResult; | ||
12 | import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.Viatra2LogicAnnotationsPackage; | ||
13 | import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace; | ||
14 | import java.util.Map; | ||
15 | import org.eclipse.emf.common.util.URI; | ||
16 | import org.eclipse.emf.ecore.EObject; | ||
17 | import org.eclipse.emf.ecore.resource.Resource; | ||
18 | import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; | ||
19 | import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; | ||
20 | import org.eclipse.xtend2.lib.StringConcatenation; | ||
21 | import org.eclipse.xtext.xbase.lib.Exceptions; | ||
22 | import org.eclipse.xtext.xbase.lib.InputOutput; | ||
23 | import org.eclipse.xtext.xbase.lib.ObjectExtensions; | ||
24 | import org.eclipse.xtext.xbase.lib.Procedures.Procedure1; | ||
25 | |||
26 | @SuppressWarnings("all") | ||
27 | public class MedicalSystem { | ||
28 | public static void main(final String[] args) { | ||
29 | try { | ||
30 | MedicalSystem.init(); | ||
31 | StringConcatenation _builder = new StringConcatenation(); | ||
32 | _builder.append("outputModels/"); | ||
33 | final FileSystemWorkspace workspace = new FileSystemWorkspace(_builder.toString(), ""); | ||
34 | workspace.initAndClear(); | ||
35 | final LogicProblem root = MedicalSystem.load(); | ||
36 | InputOutput.<String>println("Problem Loaded"); | ||
37 | LogicResult solution = null; | ||
38 | LogicReasoner reasoner = null; | ||
39 | VampireSolver _vampireSolver = new VampireSolver(); | ||
40 | reasoner = _vampireSolver; | ||
41 | VampireSolverConfiguration _vampireSolverConfiguration = new VampireSolverConfiguration(); | ||
42 | final Procedure1<VampireSolverConfiguration> _function = (VampireSolverConfiguration it) -> { | ||
43 | it.writeToFile = false; | ||
44 | }; | ||
45 | final VampireSolverConfiguration vampireConfig = ObjectExtensions.<VampireSolverConfiguration>operator_doubleArrow(_vampireSolverConfiguration, _function); | ||
46 | solution = reasoner.solve(root, vampireConfig, workspace); | ||
47 | InputOutput.<String>println("Problem Solved"); | ||
48 | } catch (Throwable _e) { | ||
49 | throw Exceptions.sneakyThrow(_e); | ||
50 | } | ||
51 | } | ||
52 | |||
53 | protected static LogicProblem load() { | ||
54 | LogicProblem _xblockexpression = null; | ||
55 | { | ||
56 | final ResourceSetImpl resourceSet = new ResourceSetImpl(); | ||
57 | final Resource resource = resourceSet.getResource(URI.createURI("inputLPs/newMedicalSystem.logicproblem"), true); | ||
58 | EObject _get = resource.getContents().get(0); | ||
59 | final LogicProblem root = ((LogicProblem) _get); | ||
60 | _xblockexpression = root; | ||
61 | } | ||
62 | return _xblockexpression; | ||
63 | } | ||
64 | |||
65 | protected static void init() { | ||
66 | LogiclanguagePackage.eINSTANCE.eClass(); | ||
67 | LogicproblemPackage.eINSTANCE.eClass(); | ||
68 | Ecore2logicannotationsPackage.eINSTANCE.eClass(); | ||
69 | Viatra2LogicAnnotationsPackage.eINSTANCE.eClass(); | ||
70 | final Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE; | ||
71 | final Map<String, Object> map = reg.getExtensionToFactoryMap(); | ||
72 | XMIResourceFactoryImpl _xMIResourceFactoryImpl = new XMIResourceFactoryImpl(); | ||
73 | map.put("logicproblem", _xMIResourceFactoryImpl); | ||
74 | XMIResourceFactoryImpl _xMIResourceFactoryImpl_1 = new XMIResourceFactoryImpl(); | ||
75 | map.put("tptp", _xMIResourceFactoryImpl_1); | ||
76 | VampireLanguageStandaloneSetup.doSetup(); | ||
77 | } | ||
78 | } | ||