:- use_module(library(chr)). :- chr_constraint at/2, see/2. story --> [] ; s, ['.'], story. %s --> np(X), v(V), np(Y). s --> np(X), [sees], np(Y), {see(X,Y)}. s --> np(X), [is,at], np(E), {at(E,X)}. s --> np(X), [is,on,vacation], {at(vacation,X)}. np(peter) --> [peter]. np(mary) --> [mary]. np(jane) --> [jane]. np(chr_summer_school) --> [the,chr,summer,school]. np(hennings_course) --> [hennings,course]. np(vacation) --> [vacation]. /**** SAMPLES phrase(story, [peter,sees,mary,'.', peter,sees,jane,'.', peter,is,at,the,chr,summer,school,'.', mary,is,at,hennings,course, '.', jane,is,on,vacation,'.']). phrase(story, [peter,is,at,the,chr,summer,school,'.']). phrase(story, [mary,is,at,hennings,course,'.']). phrase(story, [peter,sees,mary,'.']). ****/