foundations of computational agents
You can add an extra argument to the predicates to represent a parse tree, forming a rule such as
which means that the parse tree for a sentence is of the form , where is the parse tree for the noun phrase and is the parse tree for the verb phrase.
This is important if you want some result from the syntactic analysis, not just to know whether the sentence is syntactically valid. The notion of a parse tree is a simplistic form of what is required because it does not adequately represent the meaning or the deep structure of a sentence. For example, you would really like to recognize that “Sam taught the AI course” and “the AI course was taught by Sam” have the same meaning, only differing in the active or passive voice.