Applicative universal grammar

Applicative universal grammar, or AUG, is a universal semantic metalanguage intended for studying the semantic processes in particular languages. This is a linguistic theory that views the formation of phrase structure by analogy to function application in an applicative programming language. Among the innovations in this approach to natural language processing are the ideas of functional superposition and stratified types.

Example
In the paper entitled Using Types to Parse Natural Language Mark P. Jones, Paul Hudak and Sebastian Shaumyan, which describes an implementation of AUG parsing in Haskell, there is a brief introduction to AUG. It's paraphrased here, using one of their examples:

AUG has just two primitive types: T for terms, S for "sentences" (though AUG apparently allows for sentence fragments being of type S.) There is one non-primitive type, that returns a function: Oxy. O reduces x and y to another type, xy, that combines the types of x and y, xy. Words can be functions of this type. The type of a word like "my" (thing) is OTT: it takes something of type T and yields something of type T. "My friend" has a structure like this:


 * $$\dfrac{\text{my :: OTT  friend :: T}} {\text{my friend :: T}}$$

Rules can transform p of type Oxy to q of type x:


 * $$\dfrac{\text{p :: Oxy  q :: x}} {\text{p q :: y}}$$

Note that making O a prefix operator obviates the need for parentheses (as in more conventional mathematical orthography), and makes for a more compact presentation on the page.

Here is how "my friend lives in Boston" reduces in AUG.



AUG allows both forward and backward application of O. Here is the rule for backward application:


 * $$\dfrac{\text{q :: x  p :: Oxy}} {\text{q p :: y}}$$

The word "living" gets reduced to the more specific "living in Boston". AUG distinguishes between phenotype and genotype grammar; phenotype corresponds closely to the actual language, as in the previous graphic. Genotype is a more universal structure for the meaning. For the sake of clearer focus on genotype issues, tree branch order can be rendered so that functions are to the left of their arguments. A more genotypical parse tree looks like this:



The intransitive "lives" is typed OTS: the subject is a T, but an S -- a sentence phrase -- must be the resulting type. Why does "in" have type OTOOTSOTS? "In" as a three-place function requires a location ("Boston"; type T), something happening ("lives"; type OTS), and in this example, a subject, someone who lives, also of type T.