!759 p { // load log L log = scanEventLogForText("#1004032", "chemists"); print(indent("> ", trim(joinLines(log))) + "\n"); genLog_set(log); // infer stuff gRepeat("inferStuff"); // answer questions for (Matches m : gJMatch("if * then check(*)")) for (S statement : mapReplaceVars(m.unq(1), gSat(m.unq(0)))) gAdd(nempty(gSat(statement)) ? "yes, " + statement : "no @ " + quote(statement)); // check our performance! for (S s : gWants()) if (nempty(gJMatch(s))) print("Success! Found statement: " + s); else print("Statement " + quote(s) + " not found..."); } svoid inferStuff { for (Matches m : gJMatch("if * and * then *")) gAddAll(mapReplaceVars(m.unq(2), gSatAnd(m.unq(0), m.unq(1)))); }