!7 cmodule Spike > DynPrintLog { transient S program = [[ import bool import or theory rules { on $x say $out & input matches $x => say $out on $x or $y say $out & ((input matches $x) | (input matches $y)) => say $out } ]]; start-thread { S input = "hello"; PhilosophyBot1 bot = makeBot(input); bot.addFact("on hello say yo"); bot.run(); assertTrue(bot.hasFact("say yo")); } PhilosophyBot1 makeBot(S input) { PhilosophyBot1 bot = new(program); bot.autoOpenTheories(); bot.addNativePredicate("input matches $x", map -> match(map.get("$x"), input)); ret bot; } }