Script started on XXX XXX XX 12:20:12 XXXX > cat g3.p snt --> det(F, Number), adjs(F), noun(Number), verb(Number). det(F, sing) --> [a], { F = consonant } ; [an], { F = vowel }. det(_, plur) --> [the]. adjs(F) --> adjs(F, 0). adjs(F, Count) --> adj(F) ; { Count < 1, NewCount is Count + 1}, adj(F), adjs(_, NewCount). adj(F) --> [spotted], { F = consonant } ; [endangered], { F = vowel } ; [poison_arrow], { F = consonant }. noun(Num) --> [frog], { Num = sing } ; [owl], { Num = sing } ; [frogs], { Num = plur } ; [owls], { Num = plur }. verb(Num) --> [hops], { Num = sing } ; [hop], { Num = plur } ; [swims], { Num = sing } ; [swim], { Num = plur } ; [hunts], { Num = sing } ; [hunt], { Num = plur } ; [flies], { Num = sing } ; [fly], { Num = plur }. > pl Welcome to SWI-Prolog (Multi-threaded, Version 5.6.24) Copyright (c) 1990-2006 University of Amsterdam. SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. Please visit http://www.swi-prolog.org for details. For help, use ?- help(Topic). or ?- apropos(Word). ?- ['g3.p']. % g3.p compiled 0.01 sec, 6,136 bytes Yes ?- snt(X, []). X = [a, spotted, frog, hops] ; X = [a, spotted, frog, swims] ; X = [a, spotted, frog, hunts] ; X = [a, spotted, frog, flies] ; X = [a, spotted, owl, hops] ; X = [a, spotted, owl, swims] ; X = [a, spotted, owl, hunts] ; X = [a, spotted, owl, flies] ; X = [a, poison_arrow, frog, hops] ; X = [a, poison_arrow, frog, swims] ; X = [a, poison_arrow, frog, hunts] ; X = [a, poison_arrow, frog, flies] ; X = [a, poison_arrow, owl, hops] ; X = [a, poison_arrow, owl, swims] ; X = [a, poison_arrow, owl, hunts] ; X = [a, poison_arrow, owl, flies] ; X = [a, spotted, spotted, frog, hops] ; X = [a, spotted, spotted, frog, swims] ; X = [a, spotted, spotted, frog, hunts] ; X = [a, spotted, spotted, frog, flies] ; X = [a, spotted, spotted, owl, hops] ; X = [a, spotted, spotted, owl, swims] ; X = [a, spotted, spotted, owl, hunts] ; X = [a, spotted, spotted, owl, flies] ; X = [a, spotted, endangered, frog, hops] ; X = [a, spotted, endangered, frog, swims] ; X = [a, spotted, endangered, frog, hunts] ; X = [a, spotted, endangered, frog, flies] ; X = [a, spotted, endangered, owl, hops] ; X = [a, spotted, endangered, owl, swims] ; X = [a, spotted, endangered, owl, hunts] ; X = [a, spotted, endangered, owl, flies] ; X = [a, spotted, poison_arrow, frog, hops] ; X = [a, spotted, poison_arrow, frog, swims] ; X = [a, spotted, poison_arrow, frog, hunts] ; X = [a, spotted, poison_arrow, frog, flies] ; X = [a, spotted, poison_arrow, owl, hops] ; X = [a, spotted, poison_arrow, owl, swims] ; X = [a, spotted, poison_arrow, owl, hunts] ; X = [a, spotted, poison_arrow, owl, flies] ; X = [a, poison_arrow, spotted, frog, hops] ; X = [a, poison_arrow, spotted, frog, swims] ; X = [a, poison_arrow, spotted, frog, hunts] ; X = [a, poison_arrow, spotted, frog, flies] ; X = [a, poison_arrow, spotted, owl, hops] ; X = [a, poison_arrow, spotted, owl, swims] ; X = [a, poison_arrow, spotted, owl, hunts] ; X = [a, poison_arrow, spotted, owl, flies] ; X = [a, poison_arrow, endangered, frog, hops] ; X = [a, poison_arrow, endangered, frog, swims] ; X = [a, poison_arrow, endangered, frog, hunts] ; X = [a, poison_arrow, endangered, frog, flies] ; X = [a, poison_arrow, endangered, owl, hops] ; X = [a, poison_arrow, endangered, owl, swims] ; X = [a, poison_arrow, endangered, owl, hunts] ; X = [a, poison_arrow, endangered, owl, flies] ; X = [a, poison_arrow, poison_arrow, frog, hops] ; X = [a, poison_arrow, poison_arrow, frog, swims] ; X = [a, poison_arrow, poison_arrow, frog, hunts] ; X = [a, poison_arrow, poison_arrow, frog, flies] ; X = [a, poison_arrow, poison_arrow, owl, hops] ; X = [a, poison_arrow, poison_arrow, owl, swims] ; X = [a, poison_arrow, poison_arrow, owl, hunts] ; X = [a, poison_arrow, poison_arrow, owl, flies] ; X = [an, endangered, frog, hops] ; X = [an, endangered, frog, swims] ; X = [an, endangered, frog, hunts] ; X = [an, endangered, frog, flies] ; X = [an, endangered, owl, hops] ; X = [an, endangered, owl, swims] ; X = [an, endangered, owl, hunts] ; X = [an, endangered, owl, flies] ; X = [an, endangered, spotted, frog, hops] ; X = [an, endangered, spotted, frog, swims] ; X = [an, endangered, spotted, frog, hunts] ; X = [an, endangered, spotted, frog, flies] ; X = [an, endangered, spotted, owl, hops] ; X = [an, endangered, spotted, owl, swims] ; X = [an, endangered, spotted, owl, hunts] ; X = [an, endangered, spotted, owl, flies] ; X = [an, endangered, endangered, frog, hops] ; X = [an, endangered, endangered, frog, swims] ; X = [an, endangered, endangered, frog, hunts] ; X = [an, endangered, endangered, frog, flies] ; X = [an, endangered, endangered, owl, hops] ; X = [an, endangered, endangered, owl, swims] ; X = [an, endangered, endangered, owl, hunts] ; X = [an, endangered, endangered, owl, flies] ; X = [an, endangered, poison_arrow, frog, hops] ; X = [an, endangered, poison_arrow, frog, swims] ; X = [an, endangered, poison_arrow, frog, hunts] ; X = [an, endangered, poison_arrow, frog, flies] ; X = [an, endangered, poison_arrow, owl, hops] ; X = [an, endangered, poison_arrow, owl, swims] ; X = [an, endangered, poison_arrow, owl, hunts] ; X = [an, endangered, poison_arrow, owl, flies] ; X = [the, spotted, frogs, hop] ; X = [the, spotted, frogs, swim] ; X = [the, spotted, frogs, hunt] ; X = [the, spotted, frogs, fly] ; X = [the, spotted, owls, hop] ; X = [the, spotted, owls, swim] ; X = [the, spotted, owls, hunt] ; X = [the, spotted, owls, fly] ; X = [the, endangered, frogs, hop] ; X = [the, endangered, frogs, swim] ; X = [the, endangered, frogs, hunt] ; X = [the, endangered, frogs, fly] ; X = [the, endangered, owls, hop] ; X = [the, endangered, owls, swim] ; X = [the, endangered, owls, hunt] ; X = [the, endangered, owls, fly] ; X = [the, poison_arrow, frogs, hop] ; X = [the, poison_arrow, frogs, swim] ; X = [the, poison_arrow, frogs, hunt] ; X = [the, poison_arrow, frogs, fly] ; X = [the, poison_arrow, owls, hop] ; X = [the, poison_arrow, owls, swim] ; X = [the, poison_arrow, owls, hunt] ; X = [the, poison_arrow, owls, fly] ; X = [the, spotted, spotted, frogs, hop] ; X = [the, spotted, spotted, frogs, swim] ; X = [the, spotted, spotted, frogs, hunt] ; X = [the, spotted, spotted, frogs, fly] ; X = [the, spotted, spotted, owls, hop] ; X = [the, spotted, spotted, owls, swim] ; X = [the, spotted, spotted, owls, hunt] ; X = [the, spotted, spotted, owls, fly] ; X = [the, spotted, endangered, frogs, hop] ; X = [the, spotted, endangered, frogs, swim] ; X = [the, spotted, endangered, frogs, hunt] ; X = [the, spotted, endangered, frogs, fly] ; X = [the, spotted, endangered, owls, hop] ; X = [the, spotted, endangered, owls, swim] ; X = [the, spotted, endangered, owls, hunt] ; X = [the, spotted, endangered, owls, fly] ; X = [the, spotted, poison_arrow, frogs, hop] ; X = [the, spotted, poison_arrow, frogs, swim] ; X = [the, spotted, poison_arrow, frogs, hunt] ; X = [the, spotted, poison_arrow, frogs, fly] ; X = [the, spotted, poison_arrow, owls, hop] ; X = [the, spotted, poison_arrow, owls, swim] ; X = [the, spotted, poison_arrow, owls, hunt] ; X = [the, spotted, poison_arrow, owls, fly] ; X = [the, endangered, spotted, frogs, hop] ; X = [the, endangered, spotted, frogs, swim] ; X = [the, endangered, spotted, frogs, hunt] ; X = [the, endangered, spotted, frogs, fly] ; X = [the, endangered, spotted, owls, hop] ; X = [the, endangered, spotted, owls, swim] ; X = [the, endangered, spotted, owls, hunt] ; X = [the, endangered, spotted, owls, fly] ; X = [the, endangered, endangered, frogs, hop] ; X = [the, endangered, endangered, frogs, swim] ; X = [the, endangered, endangered, frogs, hunt] ; X = [the, endangered, endangered, frogs, fly] ; X = [the, endangered, endangered, owls, hop] ; X = [the, endangered, endangered, owls, swim] ; X = [the, endangered, endangered, owls, hunt] ; X = [the, endangered, endangered, owls, fly] ; X = [the, endangered, poison_arrow, frogs, hop] ; X = [the, endangered, poison_arrow, frogs, swim] ; X = [the, endangered, poison_arrow, frogs, hunt] ; X = [the, endangered, poison_arrow, frogs, fly] ; X = [the, endangered, poison_arrow, owls, hop] ; X = [the, endangered, poison_arrow, owls, swim] ; X = [the, endangered, poison_arrow, owls, hunt] ; X = [the, endangered, poison_arrow, owls, fly] ; X = [the, poison_arrow, spotted, frogs, hop] ; X = [the, poison_arrow, spotted, frogs, swim] ; X = [the, poison_arrow, spotted, frogs, hunt] ; X = [the, poison_arrow, spotted, frogs, fly] ; X = [the, poison_arrow, spotted, owls, hop] ; X = [the, poison_arrow, spotted, owls, swim] ; X = [the, poison_arrow, spotted, owls, hunt] ; X = [the, poison_arrow, spotted, owls, fly] ; X = [the, poison_arrow, endangered, frogs, hop] ; X = [the, poison_arrow, endangered, frogs, swim] ; X = [the, poison_arrow, endangered, frogs, hunt] ; X = [the, poison_arrow, endangered, frogs, fly] ; X = [the, poison_arrow, endangered, owls, hop] ; X = [the, poison_arrow, endangered, owls, swim] ; X = [the, poison_arrow, endangered, owls, hunt] ; X = [the, poison_arrow, endangered, owls, fly] ; X = [the, poison_arrow, poison_arrow, frogs, hop] ; X = [the, poison_arrow, poison_arrow, frogs, swim] ; X = [the, poison_arrow, poison_arrow, frogs, hunt] ; X = [the, poison_arrow, poison_arrow, frogs, fly] ; X = [the, poison_arrow, poison_arrow, owls, hop] ; X = [the, poison_arrow, poison_arrow, owls, swim] ; X = [the, poison_arrow, poison_arrow, owls, hunt] ; X = [the, poison_arrow, poison_arrow, owls, fly] ; No ?- halt. > exit > script done on XXX XXX XX 12:21:41 XXXX