Changeset 197 for trunk/EventBenchConsole
- Timestamp:
- 09/26/11 21:52:21 (13 years ago)
- Location:
- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/efg
- Files:
-
- 3 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/efg/commands/CMDefgToMM.java
r196 r197 10 10 import de.ugoe.cs.eventbench.data.Event; 11 11 import de.ugoe.cs.eventbench.data.GlobalDataContainer; 12 import de.ugoe.cs.eventbench.efg.data.EFGEvent; 12 13 import de.ugoe.cs.eventbench.models.FirstOrderMarkovModel; 13 14 import de.ugoe.cs.util.console.Command; … … 53 54 for (EventType event : efgEvents) { 54 55 /* 55 * Steffen (Question): I think the widgetId is only a hash value 56 * identifying the target Is it sufficient as a target or should it 57 * be somehow resolved into something more meaningful? If so, how? 58 * Where is it available? There is some kind of GUI file with this 59 * information, right? Should information of the GUI file be 60 * resolved or the GUI file simply be associated with the EFG 61 * internally. The best solution for this probably depends on the 62 * test-case structure, which I have not analyzed yet. 56 * the widgetId and eventId are only hash values, 57 * the "interpretation" is found in the GUI file. 58 */ 59 String eventTarget = event.getWidgetId(); 60 String eventId = event.getEventId(); 61 62 /* 63 * Not sure what these are used for. 64 String eventType = event.getType(); 65 String eventAction = event.getAction(); 63 66 */ 64 67 65 // both widget ID and eventType are always null in the sample EFGs 66 // ... 67 String eventTarget = event.getWidgetId(); 68 //String eventType = event.getType(); 69 70 /* 71 * What is the Action? What is the difference between the Action and 72 * the Type? 73 */ 74 String eventAction = event.getAction(); 75 76 Event<?> myEvent = new Event<Object>(eventAction); 68 Event<?> myEvent = new EFGEvent(eventId); 77 69 myEvent.setTarget(eventTarget); 78 70 myEvents.add(myEvent); … … 90 82 Collection<List<Event<?>>> subsequences = new LinkedList<List<Event<?>>>(); 91 83 92 /*93 * Code adapted from package94 * edu.umd.cs.guitar.testcase.plugin.TCPlugin#parseFollowRelations()95 * (part of testcase-generator-core)96 */97 84 int efgSize = efgEvents.size(); 98 85 for (int row = 0; row < efgSize; row++) { 99 86 for (int col = 0; col < efgSize; col++) { 100 87 int relation = efgGraph.getRow().get(row).getE().get(col); 101 102 88 // otherEvent is followed by currentEvent 103 89 if (relation != GUITARConstants.NO_EDGE) { … … 106 92 edge.add(myEvents.get(col)); 107 93 subsequences.add(edge); 108 109 /*110 * Steffen (Question): What is the purpose of this if? What111 * is the difference between a normal and a reaching edge?112 * if (relation == GUITARConstants.REACHING_EDGE &&113 * !otherEvent.getEventId().equals(114 * currentEvent.getEventId())) { I probably don't need this115 * anyways, since for usage analysis only successors are116 * relevant Vector<EventType> p = null;//117 * preds.get(otherEvent); if (p == null) { p = new118 * Vector<EventType>(); }119 *120 * p.add(currentEvent); preds.put(otherEvent, p); }121 */122 94 } 123 95 }
Note: See TracChangeset
for help on using the changeset viewer.