Visual Prolog implementation