Warning: session_start(): open(/var/lib/php/sessions/sess_ettpeh7sg3b3fik4l6gcs1r2km, 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
!7
//import static x30_pkg.x30_util.getOpt_cache;
//import static x30_pkg.x30_util.getOpt_cached;
// no cmodule b/c of DynamicObject+getOpt
module AnalyzeAppliedRules > DynSingleFunctionWithPrintLog {
sclass ByRule {
S ruleID;
new TreeSet statements;
}
Map ruleMap;
void doIt {
L concepts = cloneList((L) dm_requireAndCall("#1021413/AppliedRules", 'concepts));
print("Got " + n2(concepts, "concept"));
ruleMap = new Map;
for (O c : concepts) pcall {
S judgement = getString judgement(c);
S struct = getString matchedRuleStruct(c);
O matchedRule = safeUnstruct(struct); // RuleEngine2_MatchedRule
O rule = getOpt rule(matchedRule);
S ruleID = getString globalID(rule);
print(judgement + " : " + shorten(40, struct));
SS varMap = getOpt map(matchedRule);
//print(" Cached: " + getOpt_cache.get(_getClass(data)));
//print(" fieldValues:" + keys(data/DynamicObject.fieldValues));
print(" Var-Map: " + varMap);
print(" Rule-ID: " + ruleID);
ByRule r = getOrCreate_f1(ruleMap, ruleID, func(S ruleID) -> ByRule { nu ByRule(+ruleID) });
for (S a, b : varMap) {
r.statements.add(format("variable * was used in a * mapping", a, judgement));
r.statements.add(format("variable * was mapped to * in a * mapping", a, b, judgement));
}
}
pnlStruct(values(ruleMap));
}
}