Working prolog interpreter.