Discourse representation theory

In formal linguistics, discourse representation theory (DRT) is a framework for exploring meaning under a formal semantics approach. One of the main differences between DRT-style approaches and traditional Montagovian approaches is that DRT includes a level of abstract mental representations (discourse representation structures, DRS) within its formalism, which gives it an intrinsic ability to handle meaning across sentence boundaries. DRT was created by Hans Kamp in 1981. A very similar theory was developed independently by Irene Heim in 1982, under the name of "File Change Semantics" (FCS). Discourse representation theories have been used to implement semantic parsers and natural language understanding systems.
Discourse representation structures.
DRT uses "discourse representation structure"s (DRS) to represent a hearer's mental representation of a discourse as it unfolds over time. There are two critical components to a DRS: 
Consider Sentence (1) below:
The DRS of (1) can be notated as (2) below:
What (2) says is that there are two discourse referents, x and y, and three discourse conditions "farmer", "donkey", and "owns", such that the condition "farmer" holds of x, "donkey" holds of y, and "owns" holds of the pair x and y.
Informally, the DRS in (2) is true in a given model of evaluation if and only if there are entities in that model which satisfy the conditions. So, if a model contains two individuals, and one is a farmer, the other is a donkey, and the first owns the second, the DRS in (2) is true in that model.
Uttering subsequent sentences result in the existing DRS being updated.
Uttering (3) after (1) results in the DRS in (2) being updated as follows, in (4) (assuming a way to disambiguate which pronoun refers to which individual).
Successive utterances of sentences work in a similar way, although the process is somewhat more complicated for more complex sentences such as sentences containing negation, and conditionals.
"Donkey" anaphora.
In one sense, DRT offers a variation of first-order predicate calculus — its forms are pairs of first-order formulae and the free variables that occur in them. In traditional natural language semantics, only individual sentences are examined, but the context of a dialogue plays a role in meaning as well. For example, anaphoric pronouns such as "he" and "she" rely upon previously introduced individual constants in order to have meaning. DRT uses variables for every individual constant in order to account for this problem. A discourse is represented in a "discourse representation structure" (DRS), a box with variables at the top and the sentences in the formal language below in the order of the original discourse. Sub-DRS can be used for different types of sentences.
One of the major advantages of DRT is its ability to account for donkey sentences (Geach 1962) in a principled fashion:
Sentence (5) can be paraphrased as follows: Every farmer who owns a donkey beats the donkey that he/she owns. Under a Montagovian approach, the indefinite "a donkey", which is assumed to be inherently an existential quantifier, ends up becoming a universal quantifier, an unwelcome result because the change in quantificational force cannot be accounted for in any principled way.
DRT avoids this problem by assuming that indefinites introduce discourse referents (DRs) which are stored in the mental representation and are accessible (or not, depending on the conditions) to expressions like pronouns and other anaphoric elements. Furthermore, they are inherently non-quantificational, and pick up quantificational force depending upon the context.
On the other hand, genuine quantifiers (e.g., 'every professor') bear scope. An 'every-NP' triggers the introduction of a complex condition of the form K1 → K2, where K1 and K2 are sub-DRSs representing the restriction and the scope of the quantification respectively.
Unlike true quantifiers, indefinite NPs just contribute a new DR (together with some descriptive material in terms of conditions on the DR), which is placed in a larger structure. This larger structure can be the top-level DRS or some sub-DRS according to the sentence-internal environment of the analyzed NP — in other words, a level which is accessible to an anaphor that comes later.