s --> np, vp. np --> pn. np --> pro. np --> det, n. vp --> iv. vp --> tv, np. pn --> [fido]. n --> [dog];[bone]. pro --> [he];[it]. det --> [a]. iv --> [slept]. tv --> [is];[ate]. test :- findall(Sent,s(Sent,[]),Sents), count_sents(1,Sents). count_sents(_,[]):-!. count_sents(N,[A|Rest]):- write(N),tab(1),writeln(A), N1 is N +1, count_sents(N1,Rest).