    program(npda,[(accept(Xs1) :-  initial(Q1), accept(Xs1,Q1,[ ])),
        (accept([X2jXs2],Q2,S2) :-  delta(Q2,X2,S2,Q12,S12),
        accept(Xs2,Q12,S12)), (accept([ ],Q3,[ ]) :-  true)]).

    should_unfold(initial(Q)).
    should_unfold(final(Q)).
    should_unfold(delta(A,B,C,D,E)).

    should_fold(accept(Q,Xs,Q1),palindrome(Q,Xs,Q1)).
    should_fold(accept(Xs),palindrome(Xs)).

%    Program 18.4: Specializing an NPDA
