Keywords

1 Overview

Applicative functors are an abstraction for dealing with effectful computation that emerged relatively recently in the functional programming literature [10]. Given some effectful domain defined by a type constructor , an applicative provides a way of embedding pure computations into a pure fragment of ’s effectful domain, and the peculiar way in which application is interpreted within that domain.

Monads are a related, and more established abstraction for dealing with effectful computation [15], and there has already been a great deal of work in the linguistics literature motivating an approach to semantic computation using monadic machinery (see, e.g., [1, 4, 12]). Monads are more powerful than applicatives – this is because the bind operator associated with a given monad allows the result of an effectful computation to influence the choice of subsequent computations. Applicative functors don’t allow this – effects don’t influence the structure of computation, they just get sequenced. To quote Mcbride and Paterson [10, p. 8] “if you need a Monad, that is fine; if you need only an Applicative functor, that is even better!”. It is still an open question whether or not, in order to model natural language semantics, we require the full power of monads, or if applicative functors suffice.

In the present work, we construct a effectful semantic fragment using the applicative abstraction. Empirically, we focus on the dynamics of anaphora, with presupposition projection as a secondary concern. We aim to show that dynamics can be modelled with applicatives in a fully modular fashion; we don’t need the full power of a monad. We take advantage of the fact that, unlike monads, applicatives compose – and the result is guaranteed to be an applicative. Once we introduce the applicative abstraction, it turns out that the machinery necessary for dealing with the dynamics of anaphora and presupposition projection are already implicit in the machinery used in an orthodox static setting for dealing with assignment sensitivity, scope, and partiality. In this sense, the present work bears directly on debate surrounding the explanatory power of dynamics for anaphora and presupposition projection (see, e.g., [11]).

Many of the ideas here are inspired by de Groote [6] and Charlow [4]. de Groote [6] pioneered the approach to dynamic semantics in terms of continuations, which will also be a necessary ingredient in the present account. Charlow’s (2014) work is foundational for understanding natural language semantics, and specifically dynamics, as effectful computation. Unlike the present work, Charlow makes use of monadic machinery – specifically the State.Set monad – a technique which provides strictly more expressive power than the applicative abstraction. We’ll offer an explicit comparison between the present approach and Charlow’s monadic grammar in Sect. 4.

2 An Applicative for Anaphora

In this section, we begin by introducing some basic building blocks; in Sect. 2.1 we introduce applicative functors and the applicative functor laws. In Sect. 2.2, we introduce Charlow’s (2018) account of assignment-sensitivity in terms of the applicative instance of Reader. In Sect. 2.2, we introduce the applicative instance of Cont (more frequently presented in its monadic guise), and following, e.g., Barker and Shan [2], show how it can be marshalled in order to provide a general theory of scope in natural language. Finally, in Sect. 2.4 we bring these pieces together in order to account for the dynamics of anaphora. Taking advantage of the fact that, unlike monads, applicatives compose, we show how the resources necessary for handling the dynamics of anaphora are already implicit in our fragment, once assignment-sensitivity and scope are brought into the picture.

2.1 Applicative Functors

Formally, an applicative functor is a tuple, consisting of a type constructor , a function pure (which we’ll write as \(\pi \)) of type \(\mathsf {a}\rightarrow \mathsf {F}\mathsf {a}\), and a function apply (which we’ll write as \(\circledast \)) of type \(\mathsf {F}(\mathsf {a}\rightarrow \mathsf {b})\rightarrow \mathsf {F}\mathsf {a}\rightarrow \mathsf {F} \mathsf {b}\). Applicative functors must obey the following laws:

figure a

Applicative functors are strictly less powerful than monads; a monad is an applicative functor together with an additional unary operation join of type \(\mathsf {F}(\texttt {F}\ \mathsf {a})\rightarrow \mathsf {F}\ \mathsf {a}\), where the applicative’s pure function corresponds to the monad’s return, and apply corresponds to the monad’s ap [14, 15].Footnote 1 The additional power afforded by join means that monads can be used to effectively reason about effectful computation, where the results of a previous computation can be used to affect the choice of another. Applicatives, on the other hand, keep the structure of computation fixed, and just sequence effects [10].

Monads have been used to great effect in the linguistic-semantics literature – see, e.g., Shan’s [12] pioneering paper, although we note that almost all of the cases discussed by Shan can be recast in terms of applicative functors, and thus the additional power provided by the monadic abstraction isn’t strictly speaking motivated. Charlow [4] on the other hand makes crucial use of monadic bind () to account for the exceptional scope of indefinites, and therefore goes some way towards motivating a monadic approach to natural language semantics. We’ll explicitly compare the fragment outlined here to Charlow’s monadic grammar in Sect. 4.

2.2 Assignment Sensitivity

Charlow [3] provides an elegant compositional semantics for pronouns in a static setting via an applicative functor , defined in (3). is the type-constructor for the assignment-sensitive type space; is the type of assignment functions. It is associated with two functions – \(\pi \) and \(\circledast \), defined in (4a) and (4b) respectively.Footnote 2 Footnote 3. \(\pi \) serves to lift a value to a trivially assignment-sensitive value. \(\circledast \) specifies how application is interpreted within the assignment-sensitive domain. Pronouns are interpreted as inherently assignment-sensitive individuals, as defined in (5). Figure 1 provides a sample derivation, for the sentence Sally hugs her, illustrating how \(\pi \) and \(\circledast \) facilitate assignment-sensitive composition.

figure c
figure d
figure e
Fig. 1.
figure 1

Assignment-sensitive composition via \(\pi \) and \(\circledast \).

It will be useful for subsequent sections to illustrate how we can define first-order quantification in terms of the machinery outlined here. First-order existential quantification is defined standardly as in (6), and first-order universal quantification in (7). Note that \(h[n]g\) means that \(h\) differs at most from \(g\) in the value \(h\) assigns to \(n\), which we write \(h_{n}\). See Fig. 1 for a sample derivation of an existential statement such as someone arrived. For ease of exposition, at this stage we assume that first-order quantifiers bind silent pronominal traces.

figure f
figure g

2.3 Continuations and Scope

In this section, we will provide a basic overview of continuation semantics through the lens of the applicative functor , defined in (8).Footnote 4 Note that, unlike our previous type-constructor , comes with an additional type parameter \(b\). The definitions of the pure and apply operators associated with are given in (9a) and (9b) respectively. pure lifts a value \(a\) to a trivially scope-taking value – in fact it is essentially a polymorphic formulation of Montague Lift. Again, apply specifies how function application is interpreted within the scopal domain.

figure h
figure i

We can equivalently write the functions associated with using Barker and Shan’s tower notation, as in Fig. 2. We’ll often take advantage of the relative succinctness of the tower notation, although bear in mind that a tower can always be expanded to a representation in the lambda calculus (see [2] for details). pure takes a value and returns a trivial tower; apply takes two towers, sequences scopal side-effects from left-to-right, and applies the inner values.

Fig. 2.
figure 2

The operations associated with the continuation applicative in tower notation

Within continuation semantics, quantificational DPs such as everyone are continuized individuals of type , as in (10). In order to get back from the scopal tier to an ordinary value, we’ll need one final piece of machinery: a lowering function \(\downarrow \), which applies a trivially continuized value of type (since here, ) to the identity function , as in (11). Figure 3 illustrates composition of a scopal value via .Footnote 5

figure j
figure k
Fig. 3.
figure 3

Composition with a quantificational DP via

Fig. 4.
figure 4

The \(\pi \) and \(\circledast \) operators associated with .

2.4 The Dynamics of Anaphora

In the previous section, we parameterized our continuation type-constructor to , the type of truth values. We did this in order to account for the composition of quantificational DPs such as everyone. Let’s shift perspective, and instead parameterize to , the type of assignment-sensitive truth values. Due to the equivalence between characteristic functions of type and sets of type , we can also think of as the type of a set of assignment functions. In the following, it will be helpful to switch back and forth between characteristic function and set perspectives, although bear in mind that the underlying compositional apparatus uses functions exclusively. The pure operator associated with lifts a value \(a\) to a scopal value of type (Fig. 4).

Recall that one property of applicative functors is that they compose, and the result is guaranteed to be an applicative functor. The next step in the analysis is to compose and our type-constructor for assignment-sensitivity , yielding a new applicative functor, which we’ll call , defined in (12). essentially is our analysis of the dynamics of anaphora, so it’s worth paying attention at this point. The pure and apply operators associated with are just the composition of those associated with and .Footnote 6 We’ve provided the partially de-sugared definition in (13) for ease of exposition.

figure l
figure m

We’ll be using as our type-constructor for the domain of contextually dynamic values. In order to get started, let’s define a function (\(\uparrow \)) that lifts assignment-sensitive values to trivially dynamic values.

figure n

We’ll use \(\uparrow \) to lift pronouns into the contextually dynamic space, as illustrated below. It turns out that in our new dynamic setting, the fundamental semantic contribution of a pronominal is no different.

figure o

As a first attempt at a genuinely dynamic semantics for anaphora, we’ll define a function \(\Uparrow \), the role of which is to dynamize first-order operators such as \(\exists \). \(\Uparrow \)-lifting first-order existential quantification yields dynamic existential quantification.

figure p
figure q

Once we generalize \(\Uparrow \) to binary operations (details suppressed), and apply it to type-lifted static conjunction, we can derive dynamic conjunction. The definition of dynamic conjunction will probably look quite unfamiliar to dynamic semanticists used to theories such as Dynamic Predicate Logic [8] and Predicate Logic with Anaphora [7], but it bears some similarities to the definition given in Chierchia [5].

figure r

For completeness, we define two more useful operators: dynamic negation, and discourse referent introduction (dref-intro), as in (19) and (20) respectively. Dynamic negation is defined in a reasonably standard way – the closure operator \(\downarrow \) closes off the anaphoric potential of its prejacent. The dref-intro operator shifts an individual denoting expression into a dynamic binder.

figure s
figure t

We’re now in a position to derive a simple case of cross-sentential anaphora: someone arrived and they sat down. The full computation is illustrated in Fig. 5. Intuitively, the continuation variable \(k\) represents the future of the discourse. The way that dynamic conjunction passes the continuation variable from one conjunct to the next means that the scope of dynamic existential quantification extends from left-to-right automatically – the continuation variable always ends up taking scope over the right-most conjunct. In the sample derivation, the resulting continuized value is closed off via (\( \downarrow \)), returning a familiar assignment-sensitive value.

Fig. 5.
figure 5

Example of simple cross-sentential dynamic binding via

One nice feature of this system is that static existential quantification and conjunction can be dynamicized in a regular way. Inherently assignment-sensitive expressions such as pronominals can be lifted into the contextually dynamic space via a simple lifter function, and every other aspect of composition is handled by the pure and apply operations associated with . As such, this framework addresses some of the worries raised about dynamic approaches to anaphora and other phenomena, namely that they must stipulate the dynamic flow of information as part of the lexical entry of each individual expression (see, e.g., [11]).

For completeness, in Fig. 6 we show how dynamic negation roofs the scope of a dynamic existential quantifier by closing off the continuation variable before re-opening it. This directly captures the fact nobody arrived and they sat down is unacceptable under the intended reading.

Fig. 6.
figure 6

Dynamic negation blocks dynamic binding

Fig. 7.
figure 7

Dynamic binding from out of a nominal restrictor

Ultimately, we would like to extend this framework to a full compositional semantics for determiners and generalized quantification. We will leave this mostly for future work, but we do offer a sketch of an analysis of a case involving dynamic binding from out of a nominal restrictor, which relies on the dynamic denotation for the indefinite article given in (21). The computation for the sentence a friend of a boy likes him, where a boy binds him, is given in Fig. 7.

figure u

3 An Applicative for Presupposition Projection

In this section, we argue that the same technique we used to model the dynamics of anaphora can be used to model the dynamics of presupposition projection. This will be even more of a proof of concept than the previous section.

3.1 Back to Assignment Sensitivity

The first component we will need in order to get our analysis off the ground is a way of modelling world-sensitivity/intensionality. Here we follow Shan [12] in treating intensionality as assignment-sensitivity; We define a type-constructor for world-sensitive meanings. The applicative operations for are identical to those of . Predicates are taken to be inherently world-sensitive. World-sensitive computation can be modelled as effectful computation via applicative machinery in exactly the same way as assignment-sensitivity. If we assume that predicates take an inner world argument, we don’t even particularly need \(\pi \) and \(\circledast \) to aid in composition.

figure v
figure w

3.2 Partiality

In a static setting, presuppositions are typically modelled via partiality/trivalence [9]. Unsurprisingly, there’s an applicative for that: Maybe (here: ), which defines a trivalent value-space consisting of defined values and an undefined value \(\#\).

figure x

Once we compose with (), we end up with the resources we need to model presuppositional, world-sensitive predicates in a static way, as illustrated by the lexical entry for the presuppositional predicate stop smoking, given in (26), which is modelled as a function from individuals to partial propositions.

figure y
figure z

3.3 The Dynamics of Presupposition Projection

Famously, a static trivalent theory of presuppositions can’t provide a satisfactory account of presupposition projection in complex sentences – when the presupposition of the second conjunct is entailed by the first, it fails to project [13].

figure aa

Here, we demonstrate that we can upgrade our existing fragment to one that accounts for the dynamics of presupposition projection by using the same technique as we used to get dynamics for anaphora - we’re going to parameterize our continuation type constructor to partial propositions, i.e., , and compose the result with our type constructor for presuppositional meanings , giving us the type constructor , defined in (28). Again, a partially de-sugared definition is given in (29).

Just as before, we can define a lifter to dynamicize meanings. When we apply generalized to , we get the Stalnakerian update function \(+\).

figure ad
figure ae
figure af
figure ag

In Fig. 8 we demonstrate how this system derives a simple case of local satisfaction. Since the first conjunct entails the presupposition of the second, the complex sentence is effectively presuppositionless.

Fig. 8.
figure 8

Local satisfaction via

4 Comparison to Charlow (2014)

Charlow’s monadic grammar has a far broader empirical remit than out fairly modest goal – to decompose dynamics into scope-taking and assignment-sensitivity – allowed for. Therefore, it is difficult to compare the two directly. Nevertheless, we will attempt here to give a flavour of Charlow’s approach, and point out some respects in which it differs from the applicative grammar outlined here.

One of Charlow’s main goals is to provide a semantics for indefinites which accounts both (a) for their ability to take exceptional scope, and (b) their dynamic properties. At the core of Charlow’s account is the State.Set monad, defined in (32) in terms of its return (32b) and bind (32c) functions. State.Set combines the State monad and the Set monad via the StateT monad transformer, in order to capture state-sensitivity (i.e., dynamics), and nondeterminism (i.e., indefiniteness) respectively. Indefinites are given a different semantic treatment to truly quantificational DPs – they treated as individuals with non-deterministic side-effects, as in (33). Quantificational DPs, on the other kind, must be assigned inherently scopal denotations, as in (34).

figure ah
figure ai
figure aj

Charlow [4] argues for a theory of scope islands inspired by the concept of delimited control in the computer science literature (see, e.g., [14]). The idea, in a nutshell, is that a scope-island is a constituent that must be completely evaluated – in other words, every continuation argument must be saturated. This captures the sensitivity of inherently scopal expressions, such as universals, to scope islands – the scopal side effects associated with (34) must be evaluated inside of a given scope island. Indefinites, on the other hand, trigger non-deterministic side-effects that may survive evaluation, thus capturing the ability of indefinites to take apparently exceptional scope. We suppress the details of the analysis here out of necessity.

The applicative grammar outlined here fails to make a distinction between indefinites and quantificational DPs in this respect. In fact, there is nothing to stop us from applying our dynamicization operator to a universal quantifier in order to yield a “dynamic” universal, as below. This must be blocked as a lexical stipulation. The exceptional status of indefinites can be considered an argument in favour of the monadic approach of Charlow [4].

figure ak

5 Conclusion

In this paper, we’ve attempted to provide a dynamic theory of anaphora and presupposition projection that is fully modular in nature – in fact, the expressivity we needed to capture these phenomena was already implicit in our most basic applicative functors for dealing with assignment-sensitivity, scope, world-sensitivity, and partiality. We leave an elaboration of this framework to future work.