Quantification in Predicate Logic

Extending the Example:


properNoun(Sem) --> ['AyCaramba'], {Sem = 'AyCaramba'}.

massNoun(Sem) --> [meat], {Sem = 'Meat'}.

np(Sem) --> properNoun(ProperNounSem), {Sem = ProperNounSem}.

np(Sem) --> massNoun(MassNounSem), {Sem = MassNounSem}.


verb(Subj,Sem) --> [serves], 
  {Sem = (isa(Event,serving),server(Event,Subj),served(Event,_))}.

vp(Subj,Sem) -->
  verb(Subj, SemVerb),
  np(Obj),
  {
    (X,Y,Z) = SemVerb,
    write('In vp, in the expression (X,Y,Z)'), nl,
    format('\tX is '), write(X), nl,
    format('\tY is '), write(Y), nl,
    format('\tZ is '), write(Z), nl,
    Z =.. [A,B,C],
    C = Obj,
    format('\tAnd the individual components of semantics '),
      write(Z), write(' are'), nl,
    format('\tA is '), write(A), nl,
    format('\tB is '), write(B), nl,
    format('\tC is '), write(C), nl,
    Sem = [SemVerb, Obj]
  }.

sent -->

  np(SemNp),
  vp(SemNp,SemVp),
  { 
    write('In sent'), nl,
    format('\tSubject is '), write(SemNp), nl,
    [A,B] = SemVp,
    format('\t'), write('The semantics of the verb are '), write(A), nl,
    format('\t'), write('The object is '),
    format('\t'), write(B), nl
  }.

Sample script A.   Sample script B.

Lambda Notation

To obtain a theoretically more well-grounded explanation of the semantics resulting from inference from the syntax [of Verb and VP] see the lambda calculus.