diff options
Diffstat (limited to 'Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/ca/mcgill/ecse/dslreasoner/realistic')
-rw-r--r-- | Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/CSERposterSample.xtend | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/CSERposterSample.xtend b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/CSERposterSample.xtend index 8dd16090..44aad755 100644 --- a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/CSERposterSample.xtend +++ b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/CSERposterSample.xtend | |||
@@ -18,6 +18,7 @@ import org.eclipse.viatra.query.runtime.rete.matcher.ReteEngine | |||
18 | import java.io.PrintWriter | 18 | import java.io.PrintWriter |
19 | import linkedList.LinkedListPackage | 19 | import linkedList.LinkedListPackage |
20 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.Neighbourhood2Gml | 20 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.Neighbourhood2Gml |
21 | import simpleStatechart.SimpleStatechartPackage | ||
21 | 22 | ||
22 | class CSERposterSample { | 23 | class CSERposterSample { |
23 | static val partialInterpretation2Logic = new InstanceModel2PartialInterpretation | 24 | static val partialInterpretation2Logic = new InstanceModel2PartialInterpretation |
@@ -26,15 +27,18 @@ class CSERposterSample { | |||
26 | static val partialVisualizer = new PartialInterpretation2Gml | 27 | static val partialVisualizer = new PartialInterpretation2Gml |
27 | static val neighbourhoodVisualizer = new Neighbourhood2Gml | 28 | static val neighbourhoodVisualizer = new Neighbourhood2Gml |
28 | static val depth = 1 | 29 | static val depth = 1 |
30 | static val REALISTIC = "simpleSCRealistic" | ||
31 | static val IRREALISTIC = "simpleSCIrrealistic" | ||
29 | 32 | ||
30 | def static void main(String[] args) { | 33 | def static void main(String[] args) { |
31 | Resource.Factory.Registry.INSTANCE.extensionToFactoryMap.put("*", new XMIResourceFactoryImpl) | 34 | Resource.Factory.Registry.INSTANCE.extensionToFactoryMap.put("*", new XMIResourceFactoryImpl) |
32 | YakindummPackage.eINSTANCE.eClass | 35 | YakindummPackage.eINSTANCE.eClass |
33 | LinkedListPackage.eINSTANCE.eClass | 36 | LinkedListPackage.eINSTANCE.eClass |
37 | SimpleStatechartPackage.eINSTANCE.eClass | ||
34 | ReteEngine.getClass | 38 | ReteEngine.getClass |
35 | 39 | ||
36 | val outputs = "outputs" | 40 | val outputs = "outputs" |
37 | val instModName = "realisticModel" | 41 | val instModName = REALISTIC |
38 | val workspace = new FileSystemWorkspace('''resources''', "") | 42 | val workspace = new FileSystemWorkspace('''resources''', "") |
39 | val model = workspace.readModel(EObject, instModName+".xmi") | 43 | val model = workspace.readModel(EObject, instModName+".xmi") |
40 | 44 | ||
@@ -60,7 +64,7 @@ class CSERposterSample { | |||
60 | 64 | ||
61 | val hood = neighbourhoodComputer.createRepresentation(partialModelOutput, depth, Integer.MAX_VALUE, Integer.MAX_VALUE) | 65 | val hood = neighbourhoodComputer.createRepresentation(partialModelOutput, depth, Integer.MAX_VALUE, Integer.MAX_VALUE) |
62 | 66 | ||
63 | val w2 = new PrintWriter(outputs+"/"+instModName+"NEIGHBOURHOOD.gml") | 67 | val w2 = new PrintWriter(outputs+"/"+instModName+depth+"NEIGHBOURHOOD.gml") |
64 | 68 | ||
65 | w2.print(neighbourhoodVisualizer.transform(hood, partialModelOutput)) | 69 | w2.print(neighbourhoodVisualizer.transform(hood, partialModelOutput)) |
66 | 70 | ||