diff options
Diffstat (limited to 'Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/CountMatches.xtend')
-rw-r--r-- | Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/CountMatches.xtend | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/CountMatches.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/CountMatches.xtend index f9086683..02caf9dd 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/CountMatches.xtend +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/CountMatches.xtend | |||
@@ -58,7 +58,7 @@ class CountMatches { | |||
58 | FOR mutant : wfPatterns.filter[query2Reference.keySet.contains(it)] SEPARATOR ';'»diff(« | 58 | FOR mutant : wfPatterns.filter[query2Reference.keySet.contains(it)] SEPARATOR ';'»diff(« |
59 | mutant.fullyQualifiedName.split("\\.").last»)«ENDFOR»''' | 59 | mutant.fullyQualifiedName.split("\\.").last»)«ENDFOR»''' |
60 | ) | 60 | ) |
61 | countMatches('''D:/FASE18Meas/MetamodelOnly_Alloy_Symmetry30''') | 61 | countMatches('''D:/FASE18Meas/RemoHF''') |
62 | } | 62 | } |
63 | 63 | ||
64 | def private static simpleName(IQuerySpecification<?> wfPattern) { | 64 | def private static simpleName(IQuerySpecification<?> wfPattern) { |
@@ -82,15 +82,21 @@ class CountMatches { | |||
82 | } | 82 | } |
83 | 83 | ||
84 | def static void countMatches(File file, String path) { | 84 | def static void countMatches(File file, String path) { |
85 | val parent = file.parent | 85 | |
86 | 86 | ||
87 | val pathSegments = path.split("/") | 87 | val pathSegments = path.split("/") |
88 | val groupName = pathSegments.get(pathSegments.size-2).split("\\.").last.split("_").get(0) | 88 | val groupName = pathSegments.get(pathSegments.size-2).split("\\.").last.split("_").get(0) |
89 | print(groupName +";") | 89 | print(groupName +";") |
90 | val nameExtension = pathSegments.get(pathSegments.size-1).split("\\.").get(0).split("_") | 90 | val nameExtension = pathSegments.get(pathSegments.size-1).split("\\.").get(0).split("_") |
91 | val runNumber = nameExtension.get(1) | 91 | try{ |
92 | val modelNumber = nameExtension.get(2) | 92 | val runNumber = nameExtension.get(1) |
93 | print('''«runNumber»;«modelNumber»''') | 93 | val modelNumber = nameExtension.get(2) |
94 | print('''«runNumber»;«modelNumber»''') | ||
95 | } catch(Exception e) { | ||
96 | print('''«file.name»;0''') | ||
97 | } | ||
98 | |||
99 | val parent = file.parent | ||
94 | val workspace = new FileSystemWorkspace(parent,"") | 100 | val workspace = new FileSystemWorkspace(parent,"") |
95 | val model = workspace.readModel(EObject,file.name) | 101 | val model = workspace.readModel(EObject,file.name) |
96 | 102 | ||