Question: Translation of Programs. Translate the program rev(X, Y, Z) ? X = [], Y = Z rev(X, Y, Z) ? X = [H|L], rev(L, [H|Y],
Translation of Programs. Translate the program rev(X, Y, Z) ? X = [], Y = Z rev(X, Y, Z) ? X = [H|L], rev(L, [H|Y], Z) reverse(X, Y) ? rev(X, [ ], Y) ? reverse(X, [4, 2, 1]) into WIM code. Apply the optimization of last goals.

9. Translation of Programs. Translate the program rev(X,Y, Z)?X=[], Y = Z rev(x,YZ)?x=[HlL].rev(L, [HlY], Z) reverse ( X, Y)?rev( X, [ ], X) ?reverse ( X, 14, 2, 11) into WIM code. Apply the optimization of last goals 9. Translation of Programs. Translate the program rev(X,Y, Z)?X=[], Y = Z rev(x,YZ)?x=[HlL].rev(L, [HlY], Z) reverse ( X, Y)?rev( X, [ ], X) ?reverse ( X, 14, 2, 11) into WIM code. Apply the optimization of last goals
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
