Warning: session_start(): open(/var/lib/php/sessions/sess_b5rc4ap51mlbo0o78stidpmutt, 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
// e.g. in = "very $x", out = "$x"
svoid philosophyBot1_addSimplificationRule_withTrails(PhilosophyBot1 bot, S ruleIn, S ruleOut, S originalFact) {
Set replacements = cast bot.getExtension("simplification rules");
if (replacements == null) {
// first time, register extension and set up transformer
bot.addExtension("simplification rules", replacements = new Set);
Set _replacements = replacements;
bot.addTrailEnabledDeepTransformer(s -> {
for (T3S p : _replacements) {
S out = simpleRewriteWithDollarVars(p.a, p.b, s);
if (out != null)
ret WithTrail(litorderedmap(op := "simplification rule",
+p, +s, +out, originalFact := p.c), out);
}
null;
});
}
// after that, just add new replacement pair to the list
replacements.add(t3(ruleIn, ruleOut, originalFact));
}