Warning: session_start(): open(/var/lib/php/sessions/sess_iohcphb6dipr735qnovp24cfil, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
svoid gazelle_splitMultiRule_v2(S ruleID) {
PairS p = dm_textAndCommentForRule(ruleID);
if (p == null || !cic(p.b, "multi-rule")) ret;
LPair lines = ai_findDoubleArrowRulesAsPairs(p.a);
Set textsNeeded = asSet(mapPairsToList gazelle_constructRuleText(lines));
S extractedComment = "extracted from multi-rule " + ruleID;
S deployedPrefix = "deployed as rule ";
LS allComments = tlft(p.b);
LS coreComments = listWithoutIC(allComments, "multi-rule");
L rules = dm_gazelle_allRulesWithComment(extractedComment);
LS coreComments2 = withoutStartingWithIC(coreComments, deployedPrefix);
S commentsForDeployed = lines_rtrim(listPlus(coreComments2, extractedComment));
new LS deployed;
for (T3S t : rules)
if (!textsNeeded.remove(t.a))
gazelle_deleteRule(t.c);
else {
gazelle_setRuleComment(t.c, commentsForDeployed);
deployed.add(t.c);
}
for (S text : textsNeeded)
deployed.add(dm_gazelle_addRuleWithComment(text, commentsForDeployed).a);
LS allComments2 = withoutStartingWithIC(allComments, deployedPrefix);
for (S deployedID : deployed)
allComments2.add(deployedPrefix + deployedID);
gazelle_setRuleComment(ruleID, allComments2);
}