s(S1,S2) :- np(S1,S3), vp(S3,S4), np(S4,S2).
np(S1,S2) :- det(S1,S3), noun(S3,S2).
np(S1,S2) :- det(S1,S3), adj(S3,S4), noun(S4,S2).
vp(S1,S2) :- verb(S1,S2).
adj([big|S],S).
adj([small|S],S).
noun([man|S],S).
noun([dog|S],S).
noun([house|S],S).
noun([ball|S],S).
prep([at|S],S).
prep([to|S],S).
prep([on|S],S).
prep([into|S],S).
