prolog implementation strategies 4921389