!7 cmodule Spike > DynPrintLog { start-thread { 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 } ]]; S input = "hello"; PhilosophyBot1 bot = new(program); bot.autoOpenTheories(); bot.addNativePredicate("input matches $x", map -> match(map.get("$x"), input)); bot.addFact("on hello say yo"); bot.run(); assertTrue(bot.hasFact("say yo")); } }