(base) 581$ swipl -l class10.prolog Welcome to SWI-Prolog (threaded, 64 bits, version 9.2.8) SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software. Please run ?- license. for legal details. For online help and background, visit https://www.swi-prolog.org For built-in help, use ?- help(Topic). or ?- apropos(Word). ?- s(Parse,[the,boy,saw,a,man],[]). Parse = s(np(dt(the), nn(boy)), vp(vbd(see_ed), np(dt(a), nn(man)))) ; ERROR: Stack limit (1.0Gb) exceeded ERROR: Stack sizes: local: 0.8Gb, global: 0.2Gb, trail: 1Kb ERROR: Stack depth: 7,455,836, last-call: 0%, Choice points: 12 ERROR: Possible non-terminating recursion: ERROR: [7,455,834] user:np(, [length:2], _59658028) ERROR: [7,455,833] user:np(, [length:2], _59658062) Exception: (13) vp(_9782, [saw, a, man], []) ? abort % Execution Aborted ?- s(Parse,[the,boy,saw,a,man,with,a,telescope],[]). Parse = s(np(dt(the), nn(boy)), vp(vbd(see_ed), np(np(dt(a), nn(man)), pp(in(with), np(dt(a), nn(telescope)))))) ; ERROR: Stack limit (1.0Gb) exceeded ERROR: Stack sizes: local: 0.8Gb, global: 0.2Gb, trail: 0Kb ERROR: Stack depth: 7,456,199, last-call: 0%, Choice points: 15 ERROR: Possible non-terminating recursion: ERROR: [7,456,197] user:np(, [length:2], _59652602) ERROR: [7,456,196] user:np(, [length:2], _59652636) Exception: (13) vp(_148, [saw, a, man, with, a, telescope], []) ? abort % Execution Aborted ?-