another shameful prolog project