1
1
package ee .tkasekamp .ltlminer ;
2
2
3
3
import java .util .ArrayList ;
4
- import java .util .HashMap ;
4
+ import java .util .Properties ;
5
5
import java .util .Vector ;
6
6
7
7
import org .deckfour .xes .model .XLog ;
@@ -59,6 +59,11 @@ public ArrayList<RuleModel> mineWithEventTypes(XLog log,
59
59
Object [] objList = checkRules (log , rules );
60
60
return filter (objList , threshold );
61
61
}
62
+
63
+ public ArrayList <RuleModel > mine (XLog log , Properties properties ) {
64
+ // TODO
65
+ return null ;
66
+ }
62
67
63
68
private Object [] checkRules (XLog log , ArrayList <String > rules ) {
64
69
String modelString = LTLFileCreator .createLTLModel (rules );
@@ -68,145 +73,6 @@ private Object[] checkRules(XLog log, ArrayList<String> rules) {
68
73
return checker .analyse (log , model );
69
74
}
70
75
71
- // public ArrayList<RuleModel> mine(XLog log, String rule, double threshold)
72
- // {
73
- // ArrayList<String> ac = logFilter.getFrequent(log);
74
- // Object[] objList = analyseRule(log, rule, ac);
75
- // return filter(objList, threshold);
76
- // }
77
- //
78
- // public ArrayList<RuleModel> mine(XLog log, String[] rules, double
79
- // threshold) {
80
- // ArrayList<String> ac = logFilter.getFrequent(log);
81
- // Object[] objList = analyseRules(log, rules, ac);
82
- // return filter(objList, threshold);
83
- // }
84
- //
85
- // public ArrayList<RuleModel> mine(XLog log, String rule, double threshold,
86
- // int howManyEvents) {
87
- // ArrayList<String> ac = logFilter.getFrequent(log, howManyEvents);
88
- // Object[] objList = analyseRule(log, rule, ac);
89
- // return filter(objList, threshold);
90
- // }
91
- //
92
- // public ArrayList<RuleModel> mine(XLog log, String[] rules,
93
- // double threshold, int howManyEvents) {
94
- // ArrayList<String> ac = logFilter.getFrequent(log, howManyEvents);
95
- // Object[] objList = analyseRules(log, rules, ac);
96
- // return filter(objList, threshold);
97
- // }
98
- //
99
- // public ArrayList<RuleModel> mineAll(XLog log, String rule, double
100
- // threshold) {
101
- //
102
- // ArrayList<String> ac = logFilter.getAllEvents(log);
103
- // Object[] objList = analyseRule(log, rule, ac);
104
- // return filter(objList, threshold);
105
- // }
106
- //
107
- // public ArrayList<RuleModel> mineAll(XLog log, String[] rules,
108
- // double threshold) {
109
- //
110
- // ArrayList<String> ac = logFilter.getAllEvents(log);
111
- // Object[] objList = analyseRules(log, rules, ac);
112
- // return filter(objList, threshold);
113
- // }
114
- //
115
- // public ArrayList<RuleModel> mineAllLifecycles(XLog log, String rule,
116
- // double threshold) {
117
- //
118
- // ArrayList<String> ac = logFilter.getAllEvents(log);
119
- // ArrayList<String> li = logFilter.getLifecycles(log);
120
- // // System.out.println(li.size());
121
- // Object[] objList = analyseRule(log, rule, ac, li);
122
- // return filter(objList, threshold);
123
- // }
124
- // public ArrayList<RuleModel> mine(XLog log, String rule, double threshold,
125
- // HashMap<String, String[]> eventReplacement) {
126
- //
127
- // ArrayList<String> ac = logFilter.getAllEvents(log);
128
- // Object[] objList = analyseRule(log, rule, ac, eventReplacement);
129
- // return filter(objList, threshold);
130
- // }
131
- //
132
- // public ArrayList<RuleModel> mine(XLog log, String[] rules,
133
- // double threshold, HashMap<String, String[]> eventReplacement) {
134
- //
135
- // ArrayList<String> ac = logFilter.getAllEvents(log);
136
- // Object[] objList = analyseRules(log, rules, ac, eventReplacement);
137
- // return filter(objList, threshold);
138
- // }
139
- //
140
- // /**
141
- // * This is the first part of the miner. It creates all possible
142
- // combinations
143
- // * of rules using the input rule as a template. It then uses the
144
- // * {@link LTLChecker} to create an output.
145
- // *
146
- // * @param log
147
- // * {@link XLog}
148
- // * @param rule
149
- // * Valid LTL formula with no default arguments.
150
- // * @return Object [] form {@link LTLChecker}
151
- // */
152
- // public Object[] analyseRule(XLog log, String rule,
153
- // ArrayList<String> activities) {
154
- // String[] rules = creator.createRule(rule, activities);
155
- // String modelString = createLTLModel(rules);
156
- //
157
- // addRulesToChecker(rules);
158
- // LTLModel model = new LTLModel();
159
- // model.setFile(modelString);
160
- // return checker.analyse(log, model);
161
- // }
162
- //
163
- // public Object[] analyseRule(XLog log, String rule,
164
- // ArrayList<String> activities, ArrayList<String> lifecycles) {
165
- // String[] rules = creator.createRule(rule, activities,lifecycles);
166
- // String modelString = createLTLModel(rules);
167
- //
168
- // addRulesToChecker(rules);
169
- // LTLModel model = new LTLModel();
170
- // model.setFile(modelString);
171
- // return checker.analyse(log, model);
172
- // }
173
- //
174
- // public Object[] analyseRule(XLog log, String rule,
175
- // ArrayList<String> activities,
176
- // HashMap<String, String[]> eventReplacement) {
177
- // String[] rules = creator.createRule(rule, activities, eventReplacement);
178
- // String modelString = createLTLModel(rules);
179
- //
180
- // addRulesToChecker(rules);
181
- // LTLModel model = new LTLModel();
182
- // model.setFile(modelString);
183
- // return checker.analyse(log, model);
184
- // }
185
- //
186
- // public Object[] analyseRules(XLog log, String[] ltlFormulas,
187
- // ArrayList<String> activities) {
188
- // String[] rules = creator.createRules(ltlFormulas, activities);
189
- // String modelString = createLTLModel(rules);
190
- //
191
- // addRulesToChecker(rules);
192
- // LTLModel model = new LTLModel();
193
- // model.setFile(modelString);
194
- // return checker.analyse(log, model);
195
- // }
196
- //
197
- // public Object[] analyseRules(XLog log, String[] ltlFormulas,
198
- // ArrayList<String> activities,
199
- // HashMap<String, String[]> eventReplacement) {
200
- // String[] rules = creator.createRules(ltlFormulas, activities,
201
- // eventReplacement);
202
- // String modelString = createLTLModel(rules);
203
- //
204
- // addRulesToChecker(rules);
205
- // LTLModel model = new LTLModel();
206
- // model.setFile(modelString);
207
- // return checker.analyse(log, model);
208
- // }
209
-
210
76
private void addRulesToChecker (ArrayList <String > rules ) {
211
77
Vector <String > selectedRules = new Vector <>();
212
78
// Can do this because rules were just renamed and there are exactly
0 commit comments