A Prolog implementation based on generators