code_idx
int64 12
284
| code
stringlengths 36
24.7k
| query_type
int64 0
1
| query_code
stringlengths 7
49
| found_solution
bool 2
classes | result_explanation
stringlengths 55
33.4k
| result_variables
stringlengths 0
52
| __index_level_0__
int64 0
194k
|
---|---|---|---|---|---|---|---|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,c,l,t,a). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=c, Param4=l, Param5=t, Param6=a, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=c, Param4=l, Param5=t, Param6=a, ] | 100 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,c,o,a,Var2). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=c, Param4=o, Param5=a, Param6=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=c, Param4=o, Param5=a, Param6=FreeVariable (variable) , ] | 101 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,c,t,d,e). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=c, Param4=t, Param5=d, Param6=e, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=c, Param4=t, Param5=d, Param6=e, ] | 102 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,d,Var3,r,h). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=d, Param4=FreeVariable (variable) , Param5=r, Param6=h, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=d, Param4=FreeVariable (variable) , Param5=r, Param6=h, ] | 103 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,d,a,l,m). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=d, Param4=a, Param5=l, Param6=m, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=d, Param4=a, Param5=l, Param6=m, ] | 104 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,d,c,Var4,o). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=d, Param4=c, Param5=FreeVariable (variable) , Param6=o, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=d, Param4=c, Param5=FreeVariable (variable) , Param6=o, ] | 105 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,d,g,n,m). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=d, Param4=g, Param5=n, Param6=m, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=d, Param4=g, Param5=n, Param6=m, ] | 106 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,d,l,Var2,Var4). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=d, Param4=l, Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=d, Param4=l, Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , ] | 107 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,d,l,g,n). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=d, Param4=l, Param5=g, Param6=n, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=d, Param4=l, Param5=g, Param6=n, ] | 108 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,d,o,Var2,e). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=d, Param4=o, Param5=FreeVariable (variable) , Param6=e, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=d, Param4=o, Param5=FreeVariable (variable) , Param6=e, ] | 109 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,e,Var3,Var5,g). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=e, Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=g, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=e, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=e, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=e, Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=g, ] | 110 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,e,Var4,c,t). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=e, Param4=FreeVariable (variable) , Param5=c, Param6=t, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=e, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=e, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=e, Param4=FreeVariable (variable) , Param5=c, Param6=t, ] | 111 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,e,Var5,Var2,Var3). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=e, Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=e, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=e, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=e, Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , ] | 112 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,e,d,Var4,m). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=e, Param4=d, Param5=FreeVariable (variable) , Param6=m, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=e, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=e, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=e, Param4=d, Param5=FreeVariable (variable) , Param6=m, ] | 113 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,e,d,a,Var5). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=e, Param4=d, Param5=a, Param6=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=e, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=e, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=e, Param4=d, Param5=a, Param6=FreeVariable (variable) , ] | 114 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,e,l,Var3,c). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=e, Param4=l, Param5=FreeVariable (variable) , Param6=c, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=e, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=e, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=e, Param4=l, Param5=FreeVariable (variable) , Param6=c, ] | 115 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,e,l,Var3,g). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=e, Param4=l, Param5=FreeVariable (variable) , Param6=g, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=e, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=e, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=e, Param4=l, Param5=FreeVariable (variable) , Param6=g, ] | 116 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,e,l,b,Var3). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=e, Param4=l, Param5=b, Param6=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=e, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=e, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=e, Param4=l, Param5=b, Param6=FreeVariable (variable) , ] | 117 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,e,o,Var5,Var3). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=e, Param4=o, Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=e, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=e, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=e, Param4=o, Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , ] | 118 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,e,r,a,g). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=e, Param4=r, Param5=a, Param6=g, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=e, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=e, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=e, Param4=r, Param5=a, Param6=g, ] | 119 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,e,t,r,h). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=e, Param4=t, Param5=r, Param6=h, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=e, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=e, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=e, Param4=t, Param5=r, Param6=h, ] | 120 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,g,Var4,h,b). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=g, Param4=FreeVariable (variable) , Param5=h, Param6=b, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=g, Param4=FreeVariable (variable) , Param5=h, Param6=b, ] | 121 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,g,Var5,e,r). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=g, Param4=FreeVariable (variable) , Param5=e, Param6=r, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=g, Param4=FreeVariable (variable) , Param5=e, Param6=r, ] | 122 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,g,o,b,c). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=g, Param4=o, Param5=b, Param6=c, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=g, Param4=o, Param5=b, Param6=c, ] | 123 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,g,o,h,m). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=g, Param4=o, Param5=h, Param6=m, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=g, Param4=o, Param5=h, Param6=m, ] | 124 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,g,o,l,r). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=g, Param4=o, Param5=l, Param6=r, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=g, Param4=o, Param5=l, Param6=r, ] | 125 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,g,r,a,h). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=g, Param4=r, Param5=a, Param6=h, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=g, Param4=r, Param5=a, Param6=h, ] | 126 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,h,Var2,t,n). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=h, Param4=FreeVariable (variable) , Param5=t, Param6=n, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=h, Param4=FreeVariable (variable) , Param5=t, Param6=n, ] | 127 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,h,Var3,r,o). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=h, Param4=FreeVariable (variable) , Param5=r, Param6=o, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=h, Param4=FreeVariable (variable) , Param5=r, Param6=o, ] | 128 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,h,Var4,g,d). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=h, Param4=FreeVariable (variable) , Param5=g, Param6=d, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=h, Param4=FreeVariable (variable) , Param5=g, Param6=d, ] | 129 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,h,c,t,l). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=h, Param4=c, Param5=t, Param6=l, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=h, Param4=c, Param5=t, Param6=l, ] | 130 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,h,g,a,Var4). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=h, Param4=g, Param5=a, Param6=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=h, Param4=g, Param5=a, Param6=FreeVariable (variable) , ] | 131 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,h,l,m,a). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=h, Param4=l, Param5=m, Param6=a, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=h, Param4=l, Param5=m, Param6=a, ] | 132 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,h,t,a,b). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=h, Param4=t, Param5=a, Param6=b, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=h, Param4=t, Param5=a, Param6=b, ] | 133 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,l,Var4,c,n). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=c, Param6=n, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=l, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=l, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=c, Param6=n, ] | 134 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,l,e,t,Var4). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=e, Param5=t, Param6=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=l, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=l, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=e, Param5=t, Param6=FreeVariable (variable) , ] | 135 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,l,g,a,r). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=g, Param5=a, Param6=r, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=l, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=l, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=g, Param5=a, Param6=r, ] | 136 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,l,n,Var4,m). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=n, Param5=FreeVariable (variable) , Param6=m, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=l, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=l, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=n, Param5=FreeVariable (variable) , Param6=m, ] | 137 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,l,t,Var2,c). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=t, Param5=FreeVariable (variable) , Param6=c, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=l, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=l, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=t, Param5=FreeVariable (variable) , Param6=c, ] | 138 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,m,Var3,Var2,r). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=m, Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=r, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=m, Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=r, ] | 139 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,m,Var4,c,t). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=m, Param4=FreeVariable (variable) , Param5=c, Param6=t, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=m, Param4=FreeVariable (variable) , Param5=c, Param6=t, ] | 140 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,m,Var5,a,d). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=m, Param4=FreeVariable (variable) , Param5=a, Param6=d, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=m, Param4=FreeVariable (variable) , Param5=a, Param6=d, ] | 141 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,m,l,r,e). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=m, Param4=l, Param5=r, Param6=e, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=m, Param4=l, Param5=r, Param6=e, ] | 142 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,m,n,Var2,t). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=m, Param4=n, Param5=FreeVariable (variable) , Param6=t, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=m, Param4=n, Param5=FreeVariable (variable) , Param6=t, ] | 143 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,m,o,Var3,n). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=m, Param4=o, Param5=FreeVariable (variable) , Param6=n, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=m, Param4=o, Param5=FreeVariable (variable) , Param6=n, ] | 144 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,n,Var3,e,Var4). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=e, Param6=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=e, Param6=FreeVariable (variable) , ] | 145 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,n,Var4,e,o). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=e, Param6=o, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=e, Param6=o, ] | 146 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,n,g,a,Var3). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=g, Param5=a, Param6=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=g, Param5=a, Param6=FreeVariable (variable) , ] | 147 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,n,g,c,r). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=g, Param5=c, Param6=r, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=g, Param5=c, Param6=r, ] | 148 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,n,g,r,Var5). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=g, Param5=r, Param6=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=g, Param5=r, Param6=FreeVariable (variable) , ] | 149 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,n,h,d,c). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=h, Param5=d, Param6=c, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=h, Param5=d, Param6=c, ] | 150 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,n,l,Var3,g). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=l, Param5=FreeVariable (variable) , Param6=g, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=l, Param5=FreeVariable (variable) , Param6=g, ] | 151 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,o,Var2,Var4,n). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=n, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=n, ] | 152 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,o,Var4,Var5,a). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=a, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=a, ] | 153 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,o,Var4,c,d). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=c, Param6=d, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=c, Param6=d, ] | 154 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,o,Var4,l,n). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=n, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=n, ] | 155 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,o,c,a,m). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=c, Param5=a, Param6=m, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=c, Param5=a, Param6=m, ] | 156 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,o,c,m,Var5). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=c, Param5=m, Param6=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=c, Param5=m, Param6=FreeVariable (variable) , ] | 157 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,o,d,Var2,a). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=d, Param5=FreeVariable (variable) , Param6=a, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=d, Param5=FreeVariable (variable) , Param6=a, ] | 158 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,o,d,g,b). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=d, Param5=g, Param6=b, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=d, Param5=g, Param6=b, ] | 159 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,o,e,a,m). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=e, Param5=a, Param6=m, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=e, Param5=a, Param6=m, ] | 160 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,o,h,Var2,Var4). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=h, Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=h, Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , ] | 161 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,o,r,Var5,t). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=r, Param5=FreeVariable (variable) , Param6=t, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=r, Param5=FreeVariable (variable) , Param6=t, ] | 162 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,o,r,a,d). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=r, Param5=a, Param6=d, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=r, Param5=a, Param6=d, ] | 163 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,o,t,b,e). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=t, Param5=b, Param6=e, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=t, Param5=b, Param6=e, ] | 164 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,r,Var2,Var5,h). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=r, Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=h, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=r, Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=h, ] | 165 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,r,Var2,o,h). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=r, Param4=FreeVariable (variable) , Param5=o, Param6=h, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=r, Param4=FreeVariable (variable) , Param5=o, Param6=h, ] | 166 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,r,Var5,m,d). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=r, Param4=FreeVariable (variable) , Param5=m, Param6=d, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=r, Param4=FreeVariable (variable) , Param5=m, Param6=d, ] | 167 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,r,c,e,Var5). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=r, Param4=c, Param5=e, Param6=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=r, Param4=c, Param5=e, Param6=FreeVariable (variable) , ] | 168 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,r,g,a,Var2). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=r, Param4=g, Param5=a, Param6=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=r, Param4=g, Param5=a, Param6=FreeVariable (variable) , ] | 169 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,r,g,b,c). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=r, Param4=g, Param5=b, Param6=c, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=r, Param4=g, Param5=b, Param6=c, ] | 170 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,r,g,t,n). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=r, Param4=g, Param5=t, Param6=n, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=r, Param4=g, Param5=t, Param6=n, ] | 171 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,r,h,t,a). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=r, Param4=h, Param5=t, Param6=a, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=r, Param4=h, Param5=t, Param6=a, ] | 172 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,r,l,n,d). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=r, Param4=l, Param5=n, Param6=d, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=r, Param4=l, Param5=n, Param6=d, ] | 173 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,r,m,l,Var5). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=r, Param4=m, Param5=l, Param6=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=r, Param4=m, Param5=l, Param6=FreeVariable (variable) , ] | 174 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,r,o,d,h). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=r, Param4=o, Param5=d, Param6=h, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=r, Param4=o, Param5=d, Param6=h, ] | 175 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,t,m,d,g). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=t, Param4=m, Param5=d, Param6=g, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=t, Param4=m, Param5=d, Param6=g, ] | 176 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,t,n,o,h). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=t, Param4=n, Param5=o, Param6=h, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=t, Param4=n, Param5=o, Param6=h, ] | 177 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,t,r,o,Var2). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=t, Param4=r, Param5=o, Param6=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=t, Param4=r, Param5=o, Param6=FreeVariable (variable) , ] | 178 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var1,t,r,o,n). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=t, Param4=r, Param5=o, Param6=n, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=t, Param4=r, Param5=o, Param6=n, ] | 179 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var2,Var1,a,Var4,Var3). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=a, Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=a, Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , ] | 180 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var2,Var1,d,b,a). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=d, Param5=b, Param6=a, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=d, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=d, Param5=b, Param6=a, ] | 181 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var2,Var1,m,Var3,t). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=m, Param5=FreeVariable (variable) , Param6=t, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=m, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=m, Param5=FreeVariable (variable) , Param6=t, ] | 182 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var2,Var1,o,d,Var5). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=o, Param5=d, Param6=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=o, Param5=d, Param6=FreeVariable (variable) , ] | 183 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var2,Var1,r,n,a). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=r, Param5=n, Param6=a, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=r, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=r, Param5=n, Param6=a, ] | 184 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var2,Var3,Var4,c,e). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=c, Param6=e, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b, Param4=a (variable) , Param5=n, Param6=d (variable) , Param7=o, Param8=n (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b, Param4=a (variable) , Param5=l, Param6=o (variable) , Param7=n, Param8=e (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=g, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=g, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=a, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=a, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=a, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=a, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=g, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=g, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=a, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=a, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=a, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=a, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=c, Param6=e, ] | 185 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var2,Var3,Var5,l,t). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=l, Param6=t, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b, Param4=a (variable) , Param5=n, Param6=d (variable) , Param7=o, Param8=n (variable) , ]
CHECKING word : [Param1=l, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=l, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b, Param4=a (variable) , Param5=l, Param6=o (variable) , Param7=n, Param8=e (variable) , ]
CHECKING word : [Param1=l, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=g, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=l, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=g, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=l, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=a, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=l, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=a, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=l, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=a, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=l, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=a, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=l, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=l, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=l, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=g, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=l, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=g, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=l, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=a, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=l, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=a, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=l, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=a, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=l, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=a, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=l, Param6=t, ] | 186 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var2,Var3,a,l,d). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=a, Param5=l, Param6=d, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=a, Param5=l, Param6=d, ] | 187 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var2,Var3,a,m,t). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=a, Param5=m, Param6=t, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=a, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=a, Param5=m, Param6=t, ] | 188 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var2,Var3,c,a,g). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=c, Param5=a, Param6=g, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=c, Param5=a, Param6=g, ] | 189 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var2,Var3,g,c,l). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=g, Param5=c, Param6=l, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=g, Param5=c, Param6=l, ] | 190 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var2,Var3,o,g,n). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=o, Param5=g, Param6=n, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=o, Param5=g, Param6=n, ] | 191 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var2,Var3,t,n,h). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=t, Param5=n, Param6=h, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=t, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=t, Param5=n, Param6=h, ] | 192 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var2,Var4,g,e,c). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=g, Param5=e, Param6=c, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=g, Param5=e, Param6=c, ] | 193 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var2,Var4,g,t,a). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=g, Param5=t, Param6=a, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=g, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=g, Param5=t, Param6=a, ] | 194 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var2,Var4,h,e,d). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=h, Param5=e, Param6=d, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=h, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=h, Param5=e, Param6=d, ] | 195 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var2,Var4,n,a,Var1). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=n, Param5=a, Param6=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=n, Param5=a, Param6=FreeVariable (variable) , ] | 196 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var2,Var4,n,l,Var1). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=n, Param5=l, Param6=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=n, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=n, Param5=l, Param6=FreeVariable (variable) , ] | 197 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var2,Var4,o,Var3,e). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=o, Param5=FreeVariable (variable) , Param6=e, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=o, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=o, Param5=FreeVariable (variable) , Param6=e, ] | 198 |
|
26 | % Ex. 1 - rebusul
word(abalone,a,b,a,l,o,n,e).
word(abandon,a,b,a,n,d,o,n).
word(anagram,a,n,a,g,r,a,m).
word(connect,c,o,n,n,e,c,t).
word(elegant,e,l,e,g,a,n,t).
word(enhance,e,n,h,a,n,c,e).
crossword(V1, V2, V3, H1, H2, H3) :-
word(V1, _, A, _, B, _, C, _),
word(V2, _, D, _, E, _, F, _),
word(V3, _, G, _, H, _, I, _),
word(H1, _, A, _, D, _, G, _),
word(H2, _, B, _, E, _, H, _),
word(H3, _, C, _, F, _, I, _).
% Ex. 2 - baza de date
born(jan, date(20,3,1977)).
born(jeroen, date(2,2,1992)).
born(joris, date(17,3,1995)).
born(jelle, date(1,1,2004)).
born(joan, date(24,12,0)).
born(joop, date(30,4,1989)).
born(jannecke, date(17,3,1993)).
born(jaap, date(16,11,1995)).
% date(Day, Month, Year)
% year/2, year(+Year, -Person).
year(Year,Person) :-
born(Person, date(_,_,Year)).
% before/2
before(date(D1,M1,Y1),date(D2,M2,Y2)):-
Y1 < Y2;
Y1 =:= Y2, M1 < M2;
Y1 =:= Y2, M1 =:= M2, D1 < D2.
% older/2
older(X,Y):-
born(X, DateX),
born(Y, DateY),
before(DateX, DateY).
% Ex. 3 - labirintul
% connected(1,2).
% connected(3,4).
% connected(5,6).
% connected(7,8).
% connected(9,10).
% connected(12,13).
% connected(13,14).
% connected(15,16).
% connected(17,18).
% connected(19,20).
% connected(4,1).
% connected(6,3).
% connected(4,7).
% connected(6,11).
% connected(14,9).
% connected(11,15).
% connected(16,12).
% connected(14,17).
% connected(16,19).
connected(1,2).
connected(2,1).
connected(1,3).
connected(3,4).
% path / 2, path(X,Y) - true daca exista un drum de la X la Y
path(X, Y) :-
connected(X,Y).
path(X, Y) :-
connected(X, Z),
path(Z, Y).
% Tema: solutia pentru a elimina ciclurile este sa avem o lista de noduri vizitate
% path(X, Y, Viz)
path1(X, Y, V) :- not(member(X, V)), connected(X,Z), path1(Z, Y, [X|V]).
% Ex. 4 - reprezentarea numerelor naturale ca liste
% 0 = [], 1 = [x], 2 = [x,x]
succesor(L, [x | L]).
plus(L1,L2, LR) :- append(L1,L2,LR).
times([], _, []).
times([x | T], L2, LR) :-
times(T, L2, ListTail),
plus(L2, ListTail, LR).
% Ex. 5 - al n-lea element intr-o lista
% element_at/3, element_at(+List, +Index, -ElemDePeIndex).
element_at([H|_], 0, H).
element_at([_|T], Index, Result):-
NewIndex is Index-1,
element_at(T, NewIndex, Result).
% Ex. 6 - mutantii
animal(alligator).
animal(tortue).
animal(caribou).
animal(ours).
animal(cheval).
animal(vache).
animal(lapin).
% mutant/1
% name/2 - transforma un sir de caratere intr-o lista cu codurile lor ASCII
mutant(X) :-
animal(Y),
animal(Z),
Y \= Z,
name(Y, Ly),
name(Z, Lz),
append(Y1, Y2, Ly),
append(Y2, _, Lz),
Y2 \= [],
append(Y1, Lz, Lx),
name(X, Lx).
% exista o factorizare a listei Ly Y1 ++ Y2 = Ly
% exista o factorizare a listei Lz Y2 ++ _ = Lz
| 0 | crossword(Var0,Var2,Var5,Var1,c,g). | false | CHECKING crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=c, Param6=g, ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=FreeVariable (variable) , Param6=FreeVariable (variable) , Param7=FreeVariable (variable) , Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=l (variable) , Param6=o (variable) , Param7=n (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b (variable) , Param4=a (variable) , Param5=n (variable) , Param6=d (variable) , Param7=o (variable) , Param8=n (variable) , ]
PASSED word : [Param1=anagram (variable) , Param2=a (variable) , Param3=n (variable) , Param4=a (variable) , Param5=g (variable) , Param6=r (variable) , Param7=a (variable) , Param8=m (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=connect (variable) , Param2=c (variable) , Param3=o (variable) , Param4=n (variable) , Param5=n (variable) , Param6=e (variable) , Param7=c (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=elegant (variable) , Param2=e (variable) , Param3=l (variable) , Param4=e (variable) , Param5=g (variable) , Param6=a (variable) , Param7=n (variable) , Param8=t (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=enhance (variable) , Param2=e (variable) , Param3=n (variable) , Param4=h (variable) , Param5=a (variable) , Param6=n (variable) , Param7=c (variable) , Param8=e (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abandon (variable) , Param2=a (variable) , Param3=b, Param4=a (variable) , Param5=n, Param6=d (variable) , Param7=o, Param8=n (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
PASSED word : [Param1=abalone (variable) , Param2=a (variable) , Param3=b, Param4=a (variable) , Param5=l, Param6=o (variable) , Param7=n, Param8=e (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=g, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=g, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=b, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=a, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=a, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=a, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=a, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=g, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=g, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=a, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=g, Param6=FreeVariable (variable) , Param7=a, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=a, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=c, Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=a, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=n, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=o, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=b, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=n, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=o, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=b, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=n, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=o, Param8=FreeVariable (variable) , ]
CHECKING word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED word : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=l, Param4=FreeVariable (variable) , Param5=l, Param6=FreeVariable (variable) , Param7=l, Param8=FreeVariable (variable) , ]
FAILED crossword : [Param1=FreeVariable (variable) , Param2=FreeVariable (variable) , Param3=FreeVariable (variable) , Param4=FreeVariable (variable) , Param5=c, Param6=g, ] | 199 |