Commit 4411a1fa authored by Jonathan Shahen's avatar Jonathan Shahen

ASASPTimeSA, TREDROLE, and TREDRULE now use the second Remover CanEnable reduction

parent f74dca41
......@@ -18,6 +18,7 @@ import mohawk.global.timing.MohawkTiming;
public class ConvertToASAPTimeSA extends ConvertTo {
public static final Logger logger = Logger.getLogger("mohawk");
public int canEnableVersion = 2;
public ConvertToASAPTimeSA(MohawkTiming timing) {
super(timing);
......@@ -38,9 +39,17 @@ public class ConvertToASAPTimeSA extends ConvertTo {
/* Timing */timing.stopTimer(tPrefix + "_" + "deepcopy");
// removeEnableDisableRules and alwaysOnRules are Deep Copies
/* Timing */timing.startTimer(tPrefix + "_" + "removeEnableDisableRules");
workableRules = roleHelper.removeEnableDisableRules(m.getAllRules());
/* Timing */timing.stopTimer(tPrefix + "_" + "removeEnableDisableRules");
/* Timing */timing.startTimer(tPrefix + "_removeEnableDisableRules");
switch (canEnableVersion) {
case 1:
workableRules = roleHelper.removeEnableDisableRules(m.getAllRules());
break;
case 2:
workableRules = roleHelper.removeEnableDisableRulesv2(m.getAllRules());
break;
}
/* Timing */timing.stopTimer(tPrefix + "_removeEnableDisableRules");
if (logger.isLoggable(Level.FINE)) {
logger.fine("[STEPWISE] Query Before roleHelper.alwaysOnRules Conversion: " + workableQuery);
......
......@@ -21,6 +21,7 @@ import mohawk.global.timing.MohawkTiming;
public class ConvertToTRole extends ConvertTo {
public static final Logger logger = Logger.getLogger("mohawk");
public int canEnableVersion = 2;
public ConvertToTRole(MohawkTiming timing) {
super(timing);
......@@ -40,9 +41,17 @@ public class ConvertToTRole extends ConvertTo {
Query workableQuery = new Query(m.query);
/* Timing */timing.stopTimer(tPrefix + "_" + "deepcopy");
/* Timing */timing.startTimer(tPrefix + "_" + "removeEnableDisableRules");
workableRules = roleHelper.removeEnableDisableRules(m.getAllRules());
/* Timing */timing.stopTimer(tPrefix + "_" + "removeEnableDisableRules");
/* Timing */timing.startTimer(tPrefix + "_removeEnableDisableRules");
switch (canEnableVersion) {
case 1:
workableRules = roleHelper.removeEnableDisableRules(m.getAllRules());
break;
case 2:
workableRules = roleHelper.removeEnableDisableRulesv2(m.getAllRules());
break;
}
/* Timing */timing.stopTimer(tPrefix + "_removeEnableDisableRules");
/* Timing */timing.startTimer(tPrefix + "_" + "alwaysOnRules");
workableRules = roleHelper.alwaysOnRules(workableRules, workableQuery, timeIntervalHelper);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment