% Extension of Covington's (1994)
% standard example fragment of English

% - conjunction conjoins all nominals, irrespective of
%   person restrictions in English coordination

signature(signature).

% The Phrase Structure Rules

s_rule1 rule
 (s)
 ===>
cat> (np, agr:Agr, case:nom),
cat> (vp, agr:Agr, vform:fin).

s_rule2 rule
 (s)
 ===>
cat> (np, agr:Agr, case:nom),
cat> (aux, agr:Agr, vform:fin),
cat> (vp, vform:base).

s_rule3 rule
 (s)
 ===>
cat> (aux, agr:Agr, vform:fin),
cat> (np, agr:Agr, case:nom),
cat> (vp, vform:base).


np_rule1 rule
 (np, agr:Agr, case:Case)
 ===>
cat> (d, agr:Agr),
cat> (n, agr:Agr, case:Case).

np_rule2 rule
 (np, agr:Agr, case:Case)
 ===>
cat> (pron, agr:Agr, case:Case).

conj_rule rule
 (np, agr:num:Num, case:Case)
 ===>
cat> (np, case:Case),
cat> (conj, agr:num:Num, case:Case),
cat> (np, case:Case).


vp_rule0 rule
 (vp, agr:Agr, vform:Vform)
 ===>
cat>  (v, args:[], agr:Agr, vform:Vform),
cats> ([];[(pp)]).

vp_rule1 rule
 (vp, agr:Agr, vform:Vform)
 ===>
cat>  (v, args:[Arg1], agr:Agr, vform:Vform),
cat>  (Arg1, (case:acc; pp)),
cats> ([];[(pp)]).

vp_rule2 rule
 (vp, agr:Agr, vform:Vform)
 ===>
cat>  (v, args:[Arg1,Arg2], agr:Agr, vform:Vform),
cat>  (Arg1, case:acc),
cat>  (Arg2, (case:acc; pp)),
cats> ([];[(pp)]).


pp_rule rule
 (pp, pform:Pform)
 ===>
cat> (p, pform:Pform),
cat> (np, case:acc).



% The Lexicon

a     ---> (d, agr:num:sg).
an    ---> (d, agr:num:sg).
all   ---> (d, agr:num:pl).
every ---> (d, agr:num:sg).
the   ---> (d).
empty      (d, agr:num:pl).


dog  ---> (n, agr:(num:sg, pers:third)).
dogs ---> (n, agr:(num:pl, pers:third)).
cat  ---> (n, agr:(num:sg, pers:third)).
cats ---> (n, agr:(num:pl, pers:third)).
elephant  ---> (n, agr:(num:sg, pers:third)).
elephants ---> (n, agr:(num:pl, pers:third)).

i   ---> (pron, agr:(num:sg, pers:first), case:nom).
me  ---> (pron, agr:(num:sg, pers:first), case:acc).
you ---> (pron, agr:pers:sec).
he  ---> (pron, agr:(num:sg, pers:third), case:nom).
him ---> (pron, agr:(num:sg, pers:third), case:acc).
she ---> (pron, agr:(num:sg, pers:third), case:nom).
her ---> (pron, agr:(num:sg, pers:third), case:acc).
it  ---> (pron, agr:(num:sg, pers:third)).
we  ---> (pron, agr:(num:pl, pers:first), case:nom).
us  ---> (pron, agr:(num:pl, pers:first), case:acc).
they ---> (pron, agr:(num:pl, pers:third), case:nom).
them ---> (pron, agr:(num:pl, pers:third), case:acc).


on   ---> (p, pform:on).
near ---> (p, pform:near).
to   ---> (p, pform:to).

and   ---> (conj, agr:num:pl).

can    ---> (aux, vform:fin).
may    ---> (aux, vform:fin).
will   ---> (aux, vform:fin).


walk   ---> (v, args:[],
		((agr:agr_non_third_sg, vform:fin); vform:base)).
walks  ---> (v, args:[],
		agr:agr_third_sg, vform:fin).
amuse  ---> (v, args:[np],
		((agr:agr_non_third_sg, vform:fin); vform:base)).
amuses ---> (v, args:[np],
		agr:agr_third_sg, vform:fin).
like   ---> (v, args:[np],
		((agr:agr_non_third_sg, vform:fin); vform:base)).
likes  ---> (v, args:[np],
		agr:agr_third_sg, vform:fin).
chase  ---> (v, args:[np],
		((agr:agr_non_third_sg, vform:fin); vform:base)).
chases ---> (v, args:[np],
		agr:agr_third_sg, vform:fin).
see    ---> (v, args:[np],
		((agr:agr_non_third_sg, vform:fin); vform:base)).
sees   ---> (v, args:[np],
		agr:agr_third_sg, vform:fin).
rely   ---> (v, args:[(pp,pform:on)],
		((agr:agr_non_third_sg, vform:fin); vform:base)).
relies ---> (v, args:[(pp,pform:on)],
		agr:agr_third_sg, vform:fin).
give   ---> (v, args:[np,(np;(pp, pform:to))],
		((agr:agr_non_third_sg, vform:fin); vform:base)).
gives  ---> (v, args:[np,(np; (pp, pform:to))],
		agr:agr_third_sg, vform:fin).
