a study of prolog interpreter