Re: Future Work: I didn’t think about the particular predicates in detail, but the author could consider using the cut predicate (!) to prevent some unnecessary backtracking. Without more thought I can’t guarantee that actually could be effectively applied here, though