Liste des Groupes | Revenir à s logic |
So basically you would replace something like:I had `once` initially, as that certainly makes sense, but it was failing even some of the simpler pos cases. I shall try again.
nth1(N, List, Lit, List2)
select(Lit, List, List2)
member(Lit, List)
By this here:
once(nth1(N, List, Lit, List2))
once(select(Lit, List, List2))
once(member(Lit, List))
No need to backtrack over multiple literals.
With Gentzen inversion lemmas you can even go a step farther:
nth1(N, List, Lit, List2), !
select(Lit, List, List2), !
member(Lit, List), !
Cut away certain rules, avoiding even more backtracking.
Les messages affichés proviennent d'usenet.