The general theory in compositional semantics: The meaning of a phrase is determined by combining the meanings of its subphrases, using rules which are driven by the syntactic structure.
Nothing close to a complete compositional semantics for English is known; not least because nothing close to a complete meaning representation is known. (That is to say, we don't know what the output is supposed to be.)
Sentence: "John ate a ripe apple."
Syntax tree :
S ---> NP ---> Name ---> John
|
|-> VP ---> Verb ---> ate
|
|-> NP ---> Det ---> a
|
|-> Adj ---> ripe
|
|-> Noun ---> apple
Representation
Person(p1).
Name(p1,"John").
Ripe(o1).
Apple(o1).
Event(e1,Eat).
Actor(e1,p1).
Object(e1,o1).
Lexicon
"apple" ---> Content: Apple.
"ate". --> Content: Eat.
"John" --> Create symbol S. Assert Person(S) and Name(S,"John").
Denotation = S.
Compositional rules
Rule 1:
Given: NP ---> Name ---> W. Denotation(NP) = Denotation(W).
Rule 2:
Given: NP ---> Det
|
|-> Adj
|
...
|-> Adj
|
|-> Noun.
Create a new symbol S. For each Adj/Noun P, assert P.Content(S).
Denotation(NP) = S.
Rule 3:
Given: S ---> NP1
|
|-> VP ---> Verb
|
|-> NP2
Create a new symbol E. Assert Event(E,Verb.Content).
Assert Actor(E,Denotation(NP1))
Assert Object(E,Denotation(NP2))