Main page



Treebank Semantics   (PDF version)

Alastair Butler




Chapter 1: Introduction

1.1   A general beginning
1.2   Overview
1.3   About the formal definitions
1.3.1   Prolog terms
1.3.1.1   Atoms
1.3.1.2   Numbers
1.3.1.3   Variables
1.3.1.4   Compound terms
1.3.2   Term equivalence
1.3.3   Lists
1.3.4   Incomplete lists and difference lists
1.3.5   More manipulations of incomplete lists
1.3.6   Iteration

Chapter 2: Normalised syntactic tree annotation and Prolog terms

2.1   Normalised syntactic tree annotation
2.2   Normalisation to Prolog terms
2.2.1   A simple example
2.2.2   A complex example
2.2.3   Yet another complex example
2.2.4   An example with coordinations
2.2.5   An example with a conditional
2.3   Grammatical roles
2.4   Intermediate language
2.5   Basic grammar statements
2.5.1   Building predicates
2.5.2   Enabling subordination
2.5.3   Making closures
2.6   Transformations
2.6.1   Settings for ‘fresh’ and ‘local’ parameters
2.6.2   Closure
2.6.3   Existential closure
2.6.4   Verbs
2.6.5   Past tense
2.6.6   Other predicates
2.6.7   Argument forming structures
2.6.7.1   Proper names
2.6.7.2   Noun phrases with restrictions
2.6.7.3   Noun phrases with quantification
2.6.7.4   Classic arguments
2.6.7.5   Propositional arguments
2.6.7.6   Pronouns
2.6.7.7   Noun phrase conjunction
2.6.7.8   Preposition phrase conjunction
2.6.7.9   Noun phrase parentheticals
2.6.8   Embedding
2.6.9   Control
2.6.10   Coordination
2.6.11   Further ways to build expressions
2.6.12   Clause typing
2.7   Orientation

Chapter 3: Semantic calculation

3.1   Collecting <discourse_referent>s
3.2   Storing <discourse_referent>s
3.2.1   push/4
3.2.2   pop/3
3.2.3   shift/4
3.2.4   shift_last/4
3.2.5   allocate/6 with expression integrity
3.2.6   dispose/5
3.3   From <sct_expr>s to <target_expr>s
3.4   The target discourse representation language
3.4.1   An example
3.4.2   Another example

References








Chapter 1: Introduction

1.1   A general beginning

The approach starts from trees with labelled nodes in a normalised format. Let's call this ‘structure’. Reaching input structure can in principle be carried out for any language starting from any annotation format, provided there is enough information about part of speech, constituency, argumenthood, modification, and anaphoric relations to discharge the requirements of lexical elements and reflect the roles of functional elements.

     Given normalised input, the idea of the approach is that sentence/discourse meaning is in the structure, and that we can reach, by undertaking transformations between representations that capture the structure, alternative instantiations of the structure that can be more explicit articulations of meaning components and their comprising dependencies.

     Notably, the input will be transformed into expressions of a logical language, comprised of: discourse referents, operators, predicate relations, and logical connectives. A logical expression is reached by undertaking a recursive calculation that receives as input normalised structure coded as a Prolog term. We will refer to this as the ‘semantic calculation’.

     The calculation makes two passes over the input Prolog term. With the first pass, the calculation collects ‘discourse referents’. Discourse referents are destined to act as either logical variables or constants of an overall resulting logical expression. As a logical variable, a discourse referent is bound by an operation of quantifier closure. Operations of closure are themselves either reflexes of quantification instructions from the Prolog term, or arise because there is discourse closure.

     During the second pass over the Prolog term, the collected discourse referents are released as content for argument slots of predicates that populate the resulting logical expression. The exact makeup of argument slots (valencies) for a given predicate is typically left unspecified by the input. At the point in the calculation when the predicate is reached, the availability of discourse referents is established. The predicate's sensitivity to what is available determines the arguments for the predicate.

     If the logical expression derived from a given sentence/discourse annotation corresponds to the original interpretation, this is one kind of confirmation that the structure assigned is correct. You can see how the generation of a well-formed (and accurate) logical expression can actually be a driving principle for the creation of the structure.

     With the sketched setup comes an emergence of a notion of ‘grammar’ as a guidance for ensuring discourse referents are accessible when they need to be and inaccessible when they should not be available. It then becomes possible for the grammatical system to determine how a word or construction in a certain environment will behave. But also a word or construction might have its properties sufficiently specified so as to place very clear demands on the state of the environment in which it occurs. Grammaticality effects arise with the possibility of a clash between the discourse referents given by the state of the calculation, and the discourse referents that need to be present and absent from the calculation state for the expression that is under calculation.

     Exactly how discourse referents are released gives the kernel of the approach. Over spans of discourse, this amounts to an implementation of ‘accessibility’ from Dynamic Semantics. This implementation generalises the approach taken by the system of Predicate Logic with Anaphora (PLA; Dekker 2002, 2012), with an updated version of the formal language of Scope Control Theory (SCT; Butler 2007, 2010, 2015) as an intermediate component.

     Besides PLA and SCT, there are many other ways to achieve the relevant notion of accessibility, as found in the diverse range of systems that fall under the Dynamic Semantics umbrella, including: Discourse Representation Theory (DRT; Kamp and Reyle 1993), File Change Semantics (FCS; Heim 1982), Dynamic Predicate Logic (DPL; Groenendijk and Stokhof 1991), the DRT formulation in Zeevat (1989), Sequence Semantics (Vermeulen 1993), Compositional DRT (Muskens 1996), Incremental Dynamics (van Eijck 2001), the translation system from DPL to a static first order language in Cresswell (2002), the DRT formulation with lambdas in Bos (2005), and Dependent Type Semantics (DTS; Yana, Mineshima and Bekki 2019).

     The key virtue of the current approach over its alternatives is its nature of self-regulation that enables the system to calculate results from a minimum of explicit input. The ability to handle subordinating dependencies involving pronouns in a manner that is uniform to the treatment of coordinating dependencies is also a notable extension over the typical capabilities of systems of Dynamic Semantics.

1.2   Overview

This book is organised as follows. Chapter 2 starts by introducing normalised tree annotation. This offers a level of syntactic annotation where language particulars are regularised to provide a common interface to enable further processing following conversion to Prolog terms. From the Prolog terms, a semantic calculation is invoked in Chapter 3 to transform expressions into a target formal language. During this stage, information about the allocation of accessible discourse referents is established to deliver Discourse Representation Structures (Kamp and Reyle 1993). Such output analysis makes explicit connective, predicate, argument and operator-binding information.

1.3   About the formal definitions

The formal definitions of section 2.5 onwards double as executable code. They are written in the Prolog based language of the ECLiPSe Constraint Programming System (http://eclipseclp.org/). This section contains background for reading the definitions.

1.3.1   Prolog terms

Prolog's single data type is the term. Terms are either: atoms, numbers, variables or compound terms (structures).

1.3.1.1   Atoms

An atom is a general-purpose name with no inherent meaning. Atoms are usually bare words (character sequences) in Prolog code, written with no special syntax. However, if spaces or certain other special characters (e.g., punctuation characters) are contained, then the atom must be surrounded by single quotes. Atoms beginning with a capital letter must also be quoted, to distinguish them from variables. The empty list, written [], is also an atom. Other examples of atoms include: foo, 'Bar', and 'foo bar'.

     As a built-in predicate, atom/1 tests whether its argument is an atom. For example:

(1)

[eclipse 1]: atom(foo).


Yes (0.00s cpu)

atom_chars/2 explodes an atom into a list of one-character atoms and conversely. For example:

(2)

[eclipse 2]: atom_chars(foo, L).


L = [f, o, o]
Yes (0.00s cpu)
[eclipse 3]: atom_chars(A, [f, o, o]).


A = foo
Yes (0.00s cpu)

atom_concat/3 allows concatenation and splitting of atoms. For example:

(3)

[eclipse 4]: atom_concat(foo, bar, A).


A = foobar
Yes (0.00s cpu)

1.3.1.2   Numbers

Numbers can be integers or real numbers. The predefined infix operator is/2 unifies the first argument to the calculated number of the second argument. For example:

(4)

[eclipse 5]: X is 2 + 1.


X = 3
Yes (0.00s cpu)

1.3.1.3   Variables

Variables are denoted by a string consisting of letters, numbers and underscore characters, and beginning with an upper-case letter or underscore. Variables closely resemble variables in logic in that they are placeholders for arbitrary terms. A variable can become instantiated (bound to equal a specific term) via unification. A single underscore (_) denotes an anonymous variable and means ‘any term’. Unlike other variables, the underscore does not represent the same value everywhere it occurs within a predicate definition.

     As a built-in predicate, var/1 tests whether its argument is a variable. For example:

(5)

[eclipse 6]: var(X).


X = X
Yes (0.00s cpu)

1.3.1.4   Compound terms

A compound term is composed of an atom called a ‘functor’ and a number of ‘arguments’, which are again terms. Compound terms are ordinarily written as a functor followed by a comma-separated list of argument terms, which is contained in parentheses. The number of arguments is called the term's arity. The notation f/n is used to denote a term with functor f and arity n. Examples of compound terms are: t('ARG0') and pred('', []). An atom can be regarded as a compound term with arity zero.

1.3.2   Term equivalence

Now we have some idea about what terms are, we can consider ways to relate terms. '=='/2 is a predefined infix operator that tests whether its arguments are equivalent terms. For example:

(6)

[eclipse 7]: x == x.


Yes (0.00s cpu)
[eclipse 8]: X == x.


No (0.00s cpu)
[eclipse 9]: X = x, X == x.


X = x
Yes (0.00s cpu)

Notably, the latter equivalence test succeeds because of the prior instantiation of the variable X to the atom x.

     '\\=='/2 is a predefined infix operator that tests whether its arguments are different terms.

1.3.3   Lists

Lists are a special case of compound terms. Constructors for lists are the atom [] (empty list) and the functor '.'/2, where the first argument is a term and the second argument a list. A list of N elements is the term .(a1, .( ... .(aN, []) ... )), which may also be written with square bracket notation: [a1, ..., aN]. List construction is also possible with a concatenation function ‘[_|_]/2’: [a1, ..., aN|t] is the term .(a1, .( ... .(aN, t))). With the concatenation function, a list can be processed by processing the first element, and then the rest of the list, in a recursive manner.

     The formal definitions of section 2.5 onwards will make use of the following list manipulation predicates from the ECLiPSe library:

     There will also be use of '=..'/2 (univ), which is a predefined infix operator for term construction from a list or term decomposition to a list. With success, the second argument is the list whose head is the principal functor of the first argument and the tail the list of its arguments. For example:

(7)

[eclipse 10]: pred('', []) =.. L.


L = [pred, '', []]
Yes (0.00s cpu)

1.3.4   Incomplete lists and difference lists

Incomplete lists are a special type of list structure. Instead of ending in [], an incomplete list has a free variable as its tail. For example, L of (8) is such a structure.

(8)

[eclipse 11]: L = [a, b, c|_].


L = [a, b, c|_72]
Yes (0.00s cpu)

The free variable at the end of an incomplete list can be (partially) instantiated, as (9) illustrates.

(9)

[eclipse 12]: L = [1, 2, 3|T], T = [4, 5|U].


L = [1, 2, 3, 4, 5|U]
T = [4, 5|U]
U = U
Yes (0.00s cpu)

     A notable use for incomplete lists is as the first component of a difference list. With X as the end variable of an incomplete list, a difference list is a construct of the form [a1, ..., aN|X]-X that represents the list [a1, ..., aN]. This makes possible the efficient (constant time) method of list concatenation seen with (9) without needing to keep track of the end variables. Consider two difference lists [a1, ..., aN|X]-X and [b1, ..., bM|Y]-Y. Then there concatenation is the difference list [a1, ..., aN,b1, ..., bM|Y]-Y. This concatenation is achieved, e.g., with the single clause program of (10).

(10)

concat(X-Y, Y-Z, X-Z).

With (10), the query of (11) can be made:

(11)

[eclipse 13]: concat([a,b|X]-X, [c,d|Y]-Y, U).


X = [c, d|Y]
Y = Y
U = [a, b, c, d|Y] - Y
Yes (0.00s cpu)

Here, U is instantiated to the difference list representing the list [a,b,c,d]. Instantiating the “output” argument to V-[] obtains the outcome list directly through V:

(12)

[eclipse 14]: concat([a,b|X]-X, [c,d|Y]-Y, V-[]).


X = [c, d]
Y = []
V = [a, b, c, d]
Yes (0.00s cpu)

1.3.5   More manipulations of incomplete lists

Incomplete lists can be traversed in the same way as complete lists, using the [H|T] pattern. However, should the end be reached, there is a free variable that will unify with anything, and so, to avoid undesired unifications, it is essential to first test for whether the end variable is reached, e.g., with: some_predicate(L, ...) :- var(L), ....

     To calculate the length of an incomplete list, we can traverse the input list element by element, incrementing a count as we go, and return the count when the end is found.

(13)

length_il(List, Length) :-                 % use auxiliary predicate ...
  length_il_acc(List, 0, Length).          % ... with count initialised to zero


length_il_acc(L, N0, N) :- var(L), !, N = N0.               % reached end, stop
length_il_acc([_|L], N, Length) :-
  N1 is N+1,
  length_il_acc(L, N1, Length).

For example:

(14)

[eclipse 15]: length_il([a, b, c|_], N).


N = 3
Yes (0.00s cpu)

     A notable manipulation (required for section 3.2.6) concerns gaining access to the last element of an incomplete list, which is the element that is just prior to the end variable for the incomplete list. This will be accomplished with last_il(Input, Output, Last), where Input is an incomplete list, Output is identical to Input, only with the last element removed, and Last is the last element of Input that is removed to create Output.

(15)

last_il([X|Xs], Ys, Z) :-                   % use auxiliary predicate ...
  last_il_lag(Xs, Ys, X, Z).                % ... which lags behind by one item


last_il_lag(X0, X, Z0, Z) :- var(X0), !, X = X0, Z = Z0.    % reached end, stop
last_il_lag([X1|Xs], [X0|Ys], X0, Z) :-
  last_il_lag(Xs, Ys, X1, Z).                               % lag behind by one

For example:

(16)

[eclipse 16]: last_il([a, b, c|T], L, X).


T = T
L = [a, b|T]
X = c
Yes (0.00s cpu)

     As seen with (9) above (also (11) and (12) with difference lists), incomplete lists can be concatenated through instantiations of end variables. In section 3.3 we require the ability to concatenate incomplete list content without any instantiation of end variables. This will be accomplished with append_il/3 of (17). Notice how the stopping condition is the first clause, which corresponds to reaching the end of the input list. The second clause has the typical form of the standard Prolog library append/3 definition.

(17)

append_il(L, Z0, Z) :- var(L), !, Z = Z0.                   % reached end, stop
append_il([H|T], Z0, [H|Z]) :-
  append_il(T, Z0, Z).

For example:

(18)

[eclipse 17]: append_il([1, 2, 3|T], [4, 5|U], L).


T = T
U = U
L = [1, 2, 3, 4, 5|U]
Yes (0.00s cpu)

Notably, the output shows T and U retain their state of not being further instantiated.

1.3.6   Iteration

In addition to the standard Prolog discussed so far in this section, there is frequent use of an ECLiPSe extension to the Prolog language that provides a way to encode iterations over a data structure or integer range. One form of iteration is over the members of a list. For example, (19) iterates with the foreach/2 iterator over the list [a,b,c], with each list member written to a new line.

(19)

[eclipse 18]: ( foreach(X,[a,b,c]) do writeln(X) ).

a
b
c

X = X
Yes (0.00s cpu)

The user sees only one variable X, which appears to take at each iteration the value of a different member of the list. Internally ECLiPSe turns this iteration into a recursion, so a different variable (X_1, X_2, etc.) is introduced for each list member in compliance with the requirement of not allowing reuse of the same variable for different things.

     A similar iterator, count/3 is used for running a counter over a range of integers:

(20)

[eclipse 19]: ( count(I,1,3) do writeln(I) ).

1
2
3

I = I
Yes (0.00s cpu)

     ECLiPSe iteration allows more than one iterator with the same do, making it possible to iterate over lists and integer ranges simultaneously. Thus in (21) the elements of [a,b,c] are used to construct another list that contains numbers reflecting list positions. Because the iteration stops when the end of [a,b,c] is reached, there is no need to specify a maximum for the integer range in the iterator count(I,1,_), while the overall constructed Ys list has the same length as [a,b,c].

(21)

[eclipse 20]: ( foreach(_,[a,b,c]), count(I,1,_), foreach(Y, Ys) do Y = I ).

I = I
Y = Y
Ys = [1, 2, 3]
Yes (0.00s cpu)

     For more information about iteration in ECLiPSe see e.g., Schimpf (2002) and Chapter 7 of Apt and Wallace (2006).








Chapter 2: Normalised syntactic tree annotation and Prolog terms

This chapter starts by introducing normalised syntactic tree annotation in section 2.1. Section 2.2 changes normalised trees into Prolog terms (<normalised_term>s). This involves a re-write step to transform node labels into Prolog structures and establish information about ‘fresh’ and ‘local’ parameters inferable from the normalised tree annotation. There is also creation and integration of ‘discourse referents’ into the resulting structures.

     Once reached, <normalised_term>s are themselves processed to create expressions of the Scope Control Theory (SCT) language (<sct_expr>s) introduced in section 2.4. This intermediate language has a reduced inventory of Prolog structures on which the semantic calculation mechanism described in Chapter 3 will directly operate. Prolog statements that assist reaching <sct_expr>s from <normalised_term>s are detailed in section 2.5, with the transformation routine presented in section 2.6.

2.1   Normalised syntactic tree annotation

Normalised syntactic tree annotation is the assumed initial stage of analysis. Only a small inventory of tag labels is available, forcing the regularisation of syntactic structure. This regularisation includes placements of grammatical information into elements that are construction marker tags. The full inventory of tags available for encoding normalised trees is as follows:

Construction marker tags

ACT     - invoke or supplement an operation
CONN    - connective
ROLE    - grammatical role
SORT    - sort information for discourse referent
REL     - invoke relation/2 (see section 2.6.6)

Part-of-speech tags

ADX     - adjective/adverb (invokes pred/2, see section 2.6.6)
N       - noun (invokes pred/2, see section 2.6.6)
NPR     - proper name (invokes npr/3, see section 2.6.7.1)
PRO     - pronoun (invokes pro/7, see section 2.6.7.6)
Q       - quantifier (invokes quant/6, see section 2.6.7.3)
VB      - main predicate (invokes verb/4, see section 2.6.4)
WH      - WH word (gives V of some(V,_,_,_,_) the prefix '?', see
          section 2.6.7.6)

Syntactic tags

ADXP    - adjective/adverb phrase (invokes someClassic/5, see section
          2.6.7.4)
CONJP   - conjunction phrase
CP-QUE  - types the clause as a question (invokes question/1, see
          section 2.6.12)
CP-REL  - types the clause as a relative clause
CP-THT  - types the clause with a complementiser
IML     - intermediate clause level (occurs with CONJP)
IP-CTL  - control clause (invokes control/1, see section 2.6.9)
IP-CTL2 - subject control clause (invokes control2/1, see section 2.6.9)
IP-MAT  - matrix clause
IP-SUB  - non-control clause (invokes embed/1, see section 2.6.8)
NP      - noun phrase
NP-SUM  - noun phrase occuring with CONJP (involves conjNpSum/6, see section
          2.6.7.7)
PP      - projection for grammatical role or subordinate conjunction

     The above tag inventory includes information about the consequence of a tag for bringing about a Prolog term when the consequence is direct. The full range of consequences arise through particular syntactic configurations. Relevant configurations are noted and illustrated with the introduction of Prolog terms (see sections 2.2.1 -- 2.2.5) and also when subsequent manipulation is described to reach <sct_expr>s (see section 2.6).

2.2   Normalisation to Prolog terms

Normalisation to a Prolog term (see section 1.3.1) creates a <normalised_term>, where:

(1)

<normalised_term> ::=
         <sct_structure_mapping>
      |  fresh(<fresh_list>, <normalised_term>)
      |  local(<local_list>, <normalised_term>)
      |  close(<quantifier>, <normalised_term>)
      |  exists(<normalised_term>)
      |  verb(<fresh_atom>, <discourse_referent>, <relation_atom>,
           <normalised_term_list>)
      |  past(<fresh_atom>, <normalised_term>)
      |  pred(<relation_atom>, <normalised_term_list>)
      |  relation(<relation_atom>, <normalised_term_list>)
      |  npr(<discourse_referent>, <local_atom>, <normalised_term>)
      |  some(<fresh_atom>, <discourse_referent>, <normalised_term>,
           <local_atom>, <normalised_term>)
      |  quant(<quantifier>, <fresh_atom>, <discourse_referent>,
           <normalised_term>, <local_atom>, <normalised_term>)
      |  someClassic(<fresh_atom>, <discourse_referent>, <normalised_term>,
           <local_atom>, <normalised_term>)
      |  someFact(<fresh_atom>, <relation_atom>, <discourse_referent>,
           <normalised_term>, <local_atom>, <normalised_term>)
      |  pro(<atom>, <sort_list>, <fresh_atom>, <selection_atom>,
           <discourse_referent>, <local_atom>, <normalised_term>)
      |  conjNpSum(<fresh_atom>, <relation_atom>, <discourse_referent>,
           <np_term_list>, <local_atom>, <normalised_term>)
      |  conjNp(<relation_atom>, <np_term_list>, <local_atom>,
           <normalised_term>)
      |  conjPp(<relation_atom>, <pp_term_list>, <normalised_term>)
      |  parenthetical(<fresh_atom>, <pp_term>, <np_term>, <local_atom>,
           <normalised_term>)
      |  embed(<normalised_term>)
      |  control(<normalised_term>)
      |  control2(<normalised_term>)
      |  connect(<relation_atom>, <normalised_term_list>)
      |  join(<relation_atom>, <normalised_term>, <normalised_term>)
      |  join_right(<relation_atom>, <normalised_term>, <normalised_term>)
      |  cond(<fresh_atom>, <relation_atom>, <normalised_term>,
           <normalised_term>)
      |  cond_right(<fresh_atom>, <relation_atom>, <normalised_term>,
           <normalised_term>)
      |  question(<normalised_term>)

<sct_structure_mapping> ::=
         t(<grammar_atom>)
      |  at(<normalised_term>, <role_atom>)
      |  mov(<grammar_atom>, <grammar_atom>, <normalised_term>)
      |  wipe(<fresh_atom>, <normalised_term>)
      |  bodyClimb(<fresh_atom>, <normalised_term>)

<np_term> ::=
         mov(<grammar_atom>)
      |  npr(<discourse_referent>)
      |  some(<fresh_atom>, <discourse_referent>, <normalised_term>)
      |  quant(<quantifier>, <fresh_atom>, <discourse_referent>,
           <normalised_term>)
      |  someClassic(<fresh_atom>, <discourse_referent>, <normalised_term>)
      |  someFact(<fresh_atom>, <relation_atom>, <discourse_referent>,
           <normalised_term>)
      |  pro(<atom>, <sort_list>, <fresh_atom>, <selection_atom>,
           <discourse_referent>)
      |  conjNpSum(<fresh_atom>, <relation_atom>, <discourse_referent>,
           <np_term_list>)
      |  conjNp(<relation_atom>, <np_term_list>)
      |  parenthetical(<fresh_atom>, <pp_term>, <np_term>)

<np_term_list> ::=
         []
      |  .(<np_term>, <np_term_list>)

<pp_term> ::=
         mov(<grammar_atom>, <local_atom>)
      |  npr(<discourse_referent>, <local_atom>)
      |  some(<fresh_atom>, <discourse_referent>, <normalised_term>,
           <local_atom>)
      |  quant(<quantifier>, <fresh_atom>, <discourse_referent>,
           <normalised_term>, <local_atom>)
      |  someClassic(<fresh_atom>, <discourse_referent>, <normalised_term>,
           <local_atom>)
      |  someFact(<fresh_atom>, <relation_atom>, <discourse_referent>,
           <normalised_term>, <local_atom>)
      |  pro(<atom>, <sort_list>, <fresh_atom>, <selection_atom>,
           <discourse_referent>, <local_atom>)
      |  conjNpSum(<fresh_atom>, <relation_atom>, <discourse_referent>,
           <np_term_list>, <local_atom>)
      |  conjNp(<relation_atom>, <np_term_list>, <local_atom>)
      |  conjPp(<relation_atom>, <pp_term_list>)
      |  parenthetical(<fresh_atom>, <pp_term>, <np_term>, <local_atom>)

<pp_term_list> ::=
         []
      |  .(<pp_term>, <pp_term_list>)

<fresh_list> ::=
         []
      |  .(<fresh_atom>, <fresh_list>)

<local_list> ::=
         []
      |  .(<local_atom>, <local_list>)

<sort_list> ::=
         []
      |  .(<sort_atom>, <sort_list>)

<grammar_atom> ::=
         <fresh_atom>
      |  <local_atom>
      |  <context_atom>

<discourse_referent> ::=
         x(<sort_atom>, <integer>)
      |  c(<sort_atom>, <constant_atom>)

     Prolog terms derived from normalised annotation are either direct structural mappings to the SCT language (t/1, at/2, mov/3, wipe/2, and bodyClimb/2; see section 2.4), or ‘higher level’ structures to realise:

     Discourse referents can be either variables (x/2) or constants (c/2). A variable has an atom parameter and an integer parameter. The atom is a specification from a sorted ontology, while the integer identifies the variable. For example, x('PERSON',1) is the person variable ‘1’, while x('EVENT',3) is the event variable ‘3’. A constant has two atom parameters. The first is sort information, while the second identifies the constant. Thus c('PERSON','Nicholas') denotes the person named ‘Nicholas’.

2.2.1   A simple example

As an example of how to reach a Prolog term from a normalised tree, consider the normalised tree (3)/(4) for (2).

(2)
Everyone ate at the cafe.

(3)

                                       IP-MAT
                                         |
      +-----------------------------------------------------+
     ACT                 PP                VB               PP
      |                  |                 |                |
      |     +---------------+              |     +--------------+
      |    ROLE             NP             |    ROLE            NP
      |     |               |              |     |              |
      |     |      +---------------+       |     |      +--------------+
      |     |     ACT    SORT      Q       |     |     ACT    SORT     N
      |     |      |      |        |       |     |      |      |       |
      |     |      |      |        |       |     |      |      |       |
     past  ARG0  INDEF  PERSON  Everyone  ate  LOC_at  DEF  LOCATION  cafe

(4)

(IP-MAT (ACT past)
        (PP (ROLE ARG0)
            (NP (ACT INDEF)
                (SORT PERSON)
                (Q Everyone)))
        (VB ate)
        (PP (ROLE LOC_at)
            (NP (ACT DEF)
                (SORT LOCATION)
                (N cafe))))

This can be broken into tree fragments, as shown below on the left hand side, which can be re-written to the Prolog terms shown on the right hand side:

(5)

[NP input]                           [NP output]
(NP (ACT INDEF)                      quant( 'EVERYONE','.e',
    (SORT PERSON)                           x( 'PERSON',1)
    (Q Everyone))                           ,
                                            local( .( 'h',[])
                                                   ,
                                                   pred( '',[]))
                                            ,__X__,
                                            __E__)__LOCAL__

With this first step (Q Everyone) is re-written to the quant/6 structure (see section 2.6.7.3), with 'EVERYONE' as the <quantifier>. This re-write also triggers creation of x('PERSON',1) as a <discourse_referent>, with the sort information sourced from (SORT PERSON). The presence of (ACT INDEF) gives '.e' as value for the <fresh_atom> parameter of quant/6 (see section 2.3 for the significance of the '.' character prefix). In the resulting Prolog term, pred('',[]) reflects the lack of restriction material in the source NP. Note the returned structure is only partially complete, with __X__ and __E__ as place holders for a <local_atom>, and for a <normalised_term>, respectively. Note also the presence of __LOCAL__ which is used as a divider, to keep track of the assembled expression to the left, and a list of known <local_atom>s to the right, the latter being empty here.

     With the next step __X__ is re-written to the <local_atom> 'ARG0' sourced from (ROLE ARG0). Note how 'ARG0', as an active <local_atom>, is also stored to the right of __LOCAL__:

(6)

[PP input]                           [PP output]
(PP (ROLE ARG0)                      quant( 'EVERYONE','.e',
    quant( 'EVERYONE','.e',                 x( 'PERSON',1)
           x( 'PERSON',1)                   ,
           ,                                local( .( 'h',[])
           local( .( 'h',[])                       ,
                  ,                                pred( '',[]))
                  pred( '',[]))             ,'ARG0',
           ,__X__,                          __E__)__LOCAL__'ARG0'
           __E__)__LOCAL)

     With a third step information is accumulated for the predicate rendering of (N cafe):

(7)

[N input]                            [N output]
(N cafe)                             pred( 'cafe',[])

     In a fourth step, the NP for which (N cafe) provides the restrictive content defaults to bringing about a some/5 structure (see section 2.6.7.2), which includes generation of x('LOCATION',2) as a <discourse_referent> with the sort information sourced from (SORT LOCATION). Also note that the presence of (ACT DEF) gives the character prefix '@' (see section 2.3) to '@e' as value for the <fresh_atom> parameter of some/5.

(8)

[NP input]                           [NP output]
(NP (ACT DEF)                        some( '@e',
    (ACT LOCATION)                         x( 'LOCATION',2)
    pred( 'cafe',[]))                      ,
                                           local( .( 'h',[])
                                                  ,
                                                  pred( 'cafe',[]))
                                           ,__X__,
                                           __E__)__LOCAL__

     A fifth step sees the PP completed with (ROLE LOC_at) providing information to re-write __X__ as 'LOC_at', which is also stored to the right of __LOCAL__:

(9)

[PP input]                           [PP output]
(PP (ROLE LOC_at)                    some( '@e',
    some( '@e',                            x( 'LOCATION',2)
          x( 'LOCATION',2)                 ,
          ,                                local( .( 'h',[])
          local( .( 'h',[])                       ,
                 ,                                pred( 'cafe',[]))
                 pred( 'cafe',[]))         ,'LOC_at',
          ,__X__',                         __E__)__LOCAL__'LOC_at'
          __E__)__LOCAL__)

     In a sixth step, the contribution of (ACT past) is fleshed out to a past/2 structure (see section 2.6.5):

(10)

[PAST input]                         [PAST output]
(ACT PAST)                           past( '.event', __E__)

     With a seventh step, the main verb ‘ate’ is reached. This is taken to realise a verb/4 structure (see section 2.6.4) that includes information gathered from the local tree concerning 'LOC_at' and 'ARG0' as arguments. Note also '.event' as the <fresh_atom> value, and the creation of x('EVENT',3) as an event <discourse_referent>:

(11)

[VB input]                           [VB output]
(VB ate)                             verb( '.event',
                                           x( 'EVENT',3)
                                           ,'ate',
                                           .( 'LOC_at',
                                              .( 'ARG0',[])))

     With all parts of the clause now re-written to Prolog terms, the next step is to bring these parts together by substituting __E__ instances for Prolog term content. The order in which __E__ instances are eliminated leads to a particular scope reading for the clause content. By default the ordering follows:

  1. placement of any complement of the verb directly under the scope of the verb,
  2. placement of any tense information immediately above the verb, while
  3. any other argument or modifier takes scope over the verb in accordance with its linear position within the clause, with prior elements having wider placements.

A matrix clause is then topped with local/2 to list the active <local_atom>s from __E__.

(12)

[IP-MAT input]                       [IP-MAT output]
(IP-MAT past( '.event', __E__)       local( .( 'ARG0',
        quant( 'EVERYONE','.e',                .( 'LOC_at',[]))
               x( 'PERSON',1)               ,
               ,                            quant( 'EVERYONE','.e',
               local( .( 'h',[])                   x( 'PERSON',1)
                      ,                            ,
                      pred( '',[]))                local( .( 'h',[])
               ,'ARG0',                                   ,
               __E__)__LOCAL__'ARG0'                      pred( '',[]))
        verb( '.event',                            ,'ARG0',
              x( 'EVENT',3)                        some( '@e',
              ,'ate',                                    x( 'LOCATION',2)
              .( 'LOC_at',                               ,
                 .( 'ARG0',[])))                         local( .( 'h',[])
        some( '@e',                                             ,
              x( 'LOCATION',2)                                  pred( 'cafe',[]))
              ,                                          ,'LOC_at',
              local( .( 'h',[])                          past( '.event',
                     ,                                         verb( '.event',
                     pred( 'cafe',[]))                               x( 'EVENT',3)
              ,'LOC_at',                                             ,'ate',
              __E__)__LOCAL__'LOC_at')                               .( 'LOC_at',
                                                                        .( 'ARG0',
                                                                              [])))))))

     For the transformation to <sct_expr>s in section 2.6, <normalised_term>s need to be embedded into discourse contexts, which amounts to starting with an articulation of all possible <fresh_atom>s for the discourse. Assuming (4) is itself the full discourse, (13) gives a complete Prolog term rendering.

(13)

fresh( .( '.e',
          .( '@e',
             .( '.event',[])))
       ,
       local( .( 'ARG0',
                 .( 'LOC_at',[]))
              ,
              quant( 'EVERYONE','.e',
                     x( 'PERSON',1)
                     ,
                     local( .( 'h',[])
                            ,
                            pred( '',[]))
                     ,'ARG0',
                     some( '@e',
                           x( 'LOCATION',2)
                           ,
                           local( .( 'h',[])
                                  ,
                                  pred( 'cafe',[]))
                           ,'LOC_at',
                           past( '.event',
                                 verb( '.event',
                                       x( 'EVENT',3)
                                       ,'ate',
                                       .( 'LOC_at',
                                          .( 'ARG0',[]))))))))

2.2.2   A complex example

With (4), we have seen ACT, IP-MAT, N, NP, PP, Q, ROLE, SORT, and VB. This section considers (15)/(16), a normalised analysis for (14). This will demonstrate additional coverage to include: ADX, ADXP, CONN, CP-QUE, CP-THT, IP-SUB, REL, and WH.

(14)
Who now would say that Standard English has ultimate authority?

(15)

                                                                                CP-QUE
                                                                                  |
                                                                                IP-SUB
                                                                                  |
       +-------------------------------------------------------------------------------------------+
       PP             ADXP      REL     ACT    VB                                                  PP
       |               |         |       |     |                                                   |
 +--------+      +---------+     |       |     |       +----------------------------------------------------+
ROLE      NP    SORT ROLE ADX    |       |     |      SORT    ROLE                                        CP-THT
 |        |      |    |    |     |       |     |       |       |                                            |
 |     +-----+   |    |    |     |       |     |       |       |     +----------------------------------------------+
 |    SORT   WH  |    |    |     |       |     |       |       |    CONN                                          IP-SUB
 |     |     |   |    |    |     |       |     |       |       |     |                                              |
 |     |     |   |    |    |     |       |     |       |       |     |              +--------------------------------------+
 |     |     |   |    |    |     |       |     |       |       |     |              PP             VB                      PP
 |     |     |   |    |    |     |       |     |       |       |     |              |              |                       |
 |     |     |   |    |    |     |       |     |       |       |     |     +-----------+           |    +---------------------------+
 |     |     |   |    |    |     |       |     |       |       |     |    ROLE         NP          |   ROLE                         NP
 |     |     |   |    |    |     |       |     |       |       |     |     |           |           |    |                           |
 |     |     |   |    |    |     |       |     |       |       |     |     |           |           |    |                 +----------------+
 |     |     |   |    |    |     |       |     |       |       |     |     |           N           |    |                ADXP              N
 |     |     |   |    |    |     |       |     |       |       |     |     |           |           |    |                 |                |
 |     |     |   |    |    |     |       |     |       |       |     |     |           |           |    |      +-----------------+         |
 |     |     |   |    |    |     |       |     |       |       |     |     |           |           |    |     SORT     ROLE     ADX        |
 |     |     |   |    |    |     |       |     |       |       |     |     |           |           |    |      |        |        |         |
ARG0 PERSON Who TMP  TMP  now MD_would exists say  SITUATION  ARG1  that  ARG0  Standard_English  has  ARG1  ATTRIB ATTRIBUTE ultimate authority

(16)

(CP-QUE (IP-SUB (PP (ROLE ARG0)
                    (NP (SORT PERSON)
                        (WH Who)))
                (ADXP (SORT TMP)
                      (ROLE TMP)
                      (ADX now))
                (REL MD_would)
                (ACT exists)
                (VB say)
                (PP (SORT SITUATION)
                    (ROLE ARG1)
                    (CP-THT (CONN that)
                            (IP-SUB (PP (ROLE ARG0)
                                        (NP (N Standard_English)))
                                    (VB has)
                                    (PP (ROLE ARG1)
                                        (NP (ADXP (SORT ATTRIB)
                                                  (ROLE ATTRIBUTE)
                                                  (ADX ultimate))
                                            (N authority))))))))

     First, consider the contribution of the matrix subject ‘who’. This invokes a some/5 structure (see section 2.6.7.2) for opening an 'ARG0' binding over the remaining clause content __E__. Presence of (WH Who) gives the character prefix '?' (see section 2.3) of '?e' as value for the <fresh_atom> parameter of some/5. There is no other content to the noun phrase, and so an empty restriction with pred('',[]) is created, as has already been seen to occur with (5) above. With there being no explicit sort information, a <discourse_referent> is created with 'PERSON' sort information.

(17)

[PP input]                           [PP output]
(PP (ROLE ARG0)                      some( '?e',
    (NP (SORT PERSON)                      x( 'PERSON',1)
        (WH Who)))                         ,
                                           local( .( 'h',[])
                                                  ,
                                                  pred( '',[]))
                                           ,'ARG0',
                                           __E__)__LOCAL__'ARG0'

     Next, consider the temporal adverb ‘now’. Presence of the ADXP projection triggers creation of a someClassic/5 structure (see section 2.6.7.4), that opens a 'TMP' binding following (ROLE TMP). This serves to introduce a <discourse_referent> with 'TMP' sort information following (SORT TMP), and with restriction content pred('now',[]) contributed by (ADX now).

(18)

[ADXP input]                         [ADXP output]
(ADXP (SORT TMP)                     someClassic( '.e',
      (ROLE TMP)                        x( 'TMP',2)
      (ADX now))                        ,
                                        local( .( 'h',[])
                                               ,
                                               pred( 'now',[]))
                                        ,'TMP',
                                        __E__)__LOCAL__'TMP'

     Next consider the modal ‘would’. This is used to introduce a propositional level relation, and with (16), is immediately followed by an existential closure triggered by (20).

(19)

[REL input]                           [REL output]
(REL MD_would)                        relation( 'MD_would', [__E__])

(20)

[ACT input]                           [ACT output]
(ACT exists)                          exists(__E__)

     In the next step, the main verb ‘say’ is reached. This is taken to realise a verb/4 structure (see section 2.6.4) that includes information gathered from the local tree for 'ARG1', 'TMP', and 'ARG0' bound arguments. There is also '.event' as the <fresh_atom> value, and the creation of x('EVENT',9) as an event <discourse_referent>.

(21)

[VB input]                           [VB output]
(VB say)                             verb( '.event',
                                           x( 'EVENT',9)
                                           ,'say',
                                           .( 'ARG1',
                                              .( 'TMP',
                                                 .( 'ARG0',[]))))

     We now shift attention to the content of the embedded clause. This begins with (22), which leads to a some/5 structure for opening an 'ARG0' binding for the clause content (the replacement of __E__) and with restriction material pred('Standard_English',[]).

(22)

[PP input]                           [PP output]
(PP (ROLE ARG0)                      some( '.e',
    (NP (N Standard_English)))             x( 'ENTITY',3)
                                           ,
                                           local( .( 'h',[])
                                                  ,
                                                  pred( 'Standard_English',[]))
                                           ,'ARG0',
                                           __E__)__LOCAL__'ARG0'

     We next encounter the main verb of the embedded clause ‘has’. This integrates into a verb/4 structure information gathered from the local tree concerning the presence of 'ARG1' and 'ARG0' bindings. There is also '.event' as the <fresh_atom> value, and the creation of x('EVENT',6) as an event <discourse_referent>.

(23)

[VB input]                           [VB output]
(VB has)                             verb( '.event',
                                           x( 'EVENT',6)
                                           ,'has',
                                           .( 'ARG1',
                                              .( 'ARG0',[])))

     As a part of the object argument of the embedded clause, we first encounter the adjective ‘ultimate’. This adjective projects ADXP, which, like in (18), triggers a someClassic/5 structure (see section 2.6.7.4).

(24)

[ADXP input]                         [ADXP output]
(ADXP (SORT ATTRIB)                  someClassic( '.e',
      (ROLE ATTRIBUTE)                 x( 'ATTRIB',4)
      (ADX ultimate))                  ,
                                       local( .( 'h',[])
                                              ,
                                              pred( 'ultimate',[]))
                                       ,'ATTRIBUTE',
                                       __E__)__LOCAL__'ATTRIBUTE'

     With (25) we consider the rest of the contribution of the object argument of the embedded clause. This introduces a some/5 structure (see section 2.6.7.2) that opens an 'ARG1' binding with <discourse_referent> x('ENTITY',5) as content for the binding. What is notable is that the restriction contains the content from (24) having scope over the predicate contribution of the head noun ‘authority’. With its local/2 structure, the restriction is an environment that is sensitive to the presence of an 'ATTRIBUTE' binding (the binding from the adjective modifier) in addition to the default 'h' binding (binding from the nominal head). As a consequence, even though the predicate specification for ‘authority’ with pred/2 (see section 2.6.6 for details) contains no argument information, it is receptive to an 'ATTRIBUTE' binding in addition to its taking of a 'h' binding.

(25)

[PP input]                          [PP output]
(PP (ROLE ARG1)                     some( '.e',
    (NP (ADXP (SORT ATTRIB)               x( 'ENTITY',5)
              (ROLE ATTRIBUTE)            ,
              (ADX ultimate))             local( .( 'ATTRIBUTE',
        (N authority)))                             .( 'h',[]))
                                                 ,
                                                 someClassic( '.e',
                                                   x( 'ATTRIB',4)
                                                   ,
                                                   local( .( 'h',[])
                                                          ,
                                                          pred( 'ultimate',[]))
                                                   ,'ATTRIBUTE',
                                                   pred( 'authority',[])))
                                          ,'ARG1',
                                          __E__)__LOCAL__'ARG1'

     We are now in a position to assemble the content of the embedded clause. Linear order leads to the scoping of the 'ARG0' binding from (22) over the 'ARG1' binding from (25). Under these bindings, the main predicate for the clause, (23), is placed. Aside from this assemblage of content, (26) is notable for having an IP-SUB projection which places the assembled content under an embed/1 structure (see section 2.6.8) which immediately contains a local/2 structure (see section 2.3). Presence of embed/1 prevents the embedding from inheriting unexpected local bindings, while local/2 spells out the potential for available local sources for bindings (namely, from 'ARG0' and 'ARG1').

(26)

[IP-SUB input]
(IP-SUB (PP (ROLE ARG0)
            (NP (N Standard_English)))
        (VB has)
        (PP (ROLE ARG1)
            (NP (ADXP (SORT ATTRIB)
                      (ROLE ATTRIBUTE)
                      (ADX ultimate))
                (N authority))))

[IP-SUB output]
embed(
  local( .( 'ARG0',
            .( 'ARG1',[]))
         ,
         some( '.e',
               x( 'ENTITY',3)
               ,
               local( .( 'h',[])
                      ,
                      pred( 'Standard_English',[]))
               ,'ARG0',
               some( '.e',
                     x( 'ENTITY',5)
                     ,
                     local( .( 'ATTRIBUTE',
                               .( 'h',[]))
                            ,
                            someClassic( '.e',
                              x( 'ATTRIB',4)
                              ,
                              local( .( 'h',[])
                                     ,
                                     pred( 'ultimate',[]))
                              ,'ATTRIBUTE',
                              pred( 'authority',[])))
                     ,'ARG1',
                     verb( '.event',
                           x( 'EVENT',6)
                           ,'has',
                           .( 'ARG1',
                              .( 'ARG0',[])))))))

     The content of the embedded clause is integrated into the matrix clause as an 'ARG1' binding via a someFact/6 structure (see section 2.6.7.5) that relates the generated <discourse_referent> x('SITUATION',8) to the propositional contribution of the embedded clause.

(27)

[PP input]
(PP (SORT SITUATION)
    (ROLE ARG1)
    (CP-THT (CONN that)
            (IP-SUB (PP (ROLE ARG0)
                        (NP (N Standard_English)))
                    (VB has)
                    (PP (ROLE ARG1)
                        (NP (ADXP (SORT ATTRIB)
                                  (ROLE ATTRIBUTE)
                                  (ADX ultimate))
                            (N authority))))))

[PP output]
someFact( '.e','that',
          x( 'SITUATION',8)
          ,
          embed(
            local( .( 'ARG0',
                      .( 'ARG1',[]))
                   ,
                   some( '.e',
                         x( 'ENTITY',3)
                         ,
                         local( .( 'h',[])
                                ,
                                pred( 'Standard_English',[]))
                         ,'ARG0',
                         some( '.e',
                               x( 'ENTITY',5)
                               ,
                               local( .( 'ATTRIBUTE',
                                         .( 'h',[]))
                                      ,
                                      someClassic( '.e',
                                        x( 'ATTRIB',4)
                                        ,
                                        local( .( 'h',[])
                                               ,
                                               pred( 'ultimate',[]))
                                        ,'ATTRIBUTE',
                                        pred( 'authority',[])))
                               ,'ARG1',
                               verb( '.event',
                                     x( 'EVENT',6)
                                     ,'has',
                                     .( 'ARG1',
                                        .( 'ARG0',[])))))))
          ,'ARG1',
          __E__)__LOCAL__'ARG1'

     We are now in a position to bring together the pieces of the matrix clause assembled in (17), (18), (19), (20), (21), and (27) to give (28). Notably this includes topping the clause structure with a question/1 structure (see section 2.6.12).

(28)

local( [],
  question(
    local( .( 'ARG0',
               .( 'ARG1',
                  .( 'TMP',[])))
            ,
            some( '?e',
                  x( 'PERSON',1)
                  ,
                  local( .( 'h',[])
                         ,
                         pred( '',[]))
                  ,'ARG0',
                  someClassic( '.e',
                     x( 'TMP',2)
                     ,
                     local( .( 'h',[])
                            ,
                            pred( 'now',[]))
                     ,'TMP',
                     relation( 'MD_would',
                       .( exists(
                             someFact( '.e','that',
                                       x( 'SITUATION',8)
                                       ,
                                       embed(
                                         local( .( 'ARG0',
                                                   .( 'ARG1',[]))
                                                ,
                                                some( '.e',
                                                      x( 'ENTITY',3)
                                                      ,
                                                      local( .( 'h',[])
                                                             ,
                                                             pred( 'Standard_English',[]))
                                                      ,'ARG0',
                                                      some( '.e',
                                                            x( 'ENTITY',5)
                                                            ,
                                                            local( .( 'ATTRIBUTE',
                                                                      .( 'h',[]))
                                                                   ,
                                                                   someClassic( '.e',
                                                                     x( 'ATTRIB',4)
                                                                     ,
                                                                     local( .( 'h',[])
                                                                            ,
                                                                            pred( 'ultimate',[]))
                                                                     ,'ATTRIBUTE',
                                                                     pred( 'authority',[])))
                                                            ,'ARG1',
                                                            verb( '.event',
                                                                  x( 'EVENT',6)
                                                                  ,'has',
                                                                  .( 'ARG1',
                                                                     .( 'ARG0',[])))))))
                                       ,'ARG1',
                                       verb( '.event',
                                             x( 'EVENT',9)
                                             ,'say',
                                             .( 'ARG1',
                                                .( 'TMP',
                                                   .( 'ARG0',[]))))))
                       ,[])))))))

2.2.3   Yet another complex example

With (4) and (16), we have seen ACT, ADXP, ADX, CONN, CP-QUE, CP-THT, IP-MAT, IP-SUB, NP, N, PP, Q, REL, ROLE, SORT, VB, and WH. This section considers (30)/(31), a normalised analysis for (29). This will demonstrate additional coverage to include: CP-REL, IP-CTL, IP-CTL2, and PRO.

(29)
You find yourself mixing with people who've got babies.

(30)

                                                                      IP-MAT
                                                                        |
       +-----------------------------------------------------------------------------------------+
       PP         VB              PP                                                             PP
       |          |               |                                                              |
 +--------+       |     +------------+             +-------------------------------------------------------+
ROLE      NP      |    ROLE          NP           SORT   ROLE                                            IP-CTL
 |        |       |     |            |             |      |                                                |
 |     +-----+    |     |   +------------+         |      |      +-------------------------------------------+
 |    SORT  PRO   |     |  ACT  SORT    PRO        |      |      VB                                          PP
 |     |     |    |     |   |    |       |         |      |      |                                           |
 |     |     |    |     |   |    |       |         |      |      |        +---------------------------------------+
 |     |     |    |     |   |    |       |         |      |      |       ROLE                                     NP
 |     |     |    |     |   |    |       |         |      |      |        |                                       |
 |     |     |    |     |   |    |       |         |      |      |        |        +----------------------------------------+
 |     |     |    |     |   |    |       |         |      |      |        |       SORT    N                               CP-REL
 |     |     |    |     |   |    |       |         |      |      |        |        |      |                                 |
 |     |     |    |     |   |    |       |         |      |      |        |        |      |                               IP-SUB
 |     |     |    |     |   |    |       |         |      |      |        |        |      |                                 |
 |     |     |    |     |   |    |       |         |      |      |        |        |      |       +---------------------------------------+
 |     |     |    |     |   |    |       |         |      |      |        |        |      |       PP         PP       VB               IP-CTL2
 |     |     |    |     |   |    |       |         |      |      |        |        |      |       |          |        |                   |
 |     |     |    |     |   |    |       |         |      |      |        |        |      |     +----+    +-----+     |     +------------+
 |     |     |    |     |   |    |       |         |      |      |        |        |      |    ROLE  NP  ROLE   NP    |     VB           PP
 |     |     |    |     |   |    |       |         |      |      |        |        |      |     |    |    |     |     |     |            |
 |     |     |    |     |   |    |       |         |      |      |        |        |      |     |    |    |     |     |     |    +----------+
 |     |     |    |     |   |    |       |         |      |      |        |        |      |     |    |    |     WH    |     |   ROLE        NP
 |     |     |    |     |   |    |       |         |      |      |        |        |      |     |    |    |     |     |     |    |          |
 |     |     |    |     |   |    |       |         |      |      |        |        |      |     |    |    |     |     |     |    |      +------+
 |     |     |    |     |   |    |       |         |      |      |        |        |      |     |    |    |     |     |     |    |     SORT    N
 |     |     |    |     |   |    |       |         |      |      |        |        |      |     |    |    |     |     |     |    |      |      |
ARG0 PERSON You  find DARG1 lc PERSON yourself SITUATION ARG1  mixing  COM_with  GROUP  people  ?e  *T*  ARG0  who  ’ve  got  ARG1  GROUP  babies

(31)

(IP-MAT (PP (ROLE ARG0)
            (NP (SORT PERSON)
                (PRO You)))
        (VB find)
        (PP (ROLE DARG1)
            (NP (ACT lc)
                (SORT PERSON)
                (PRO yourself)))
        (PP (SORT SITUATION)
            (ROLE ARG1)
            (IP-CTL (VB mixing)
                    (PP (ROLE COM_with)
                        (NP (SORT GROUP)
                            (N people)
                            (CP-REL (IP-SUB (PP (ROLE ?e)
                                                (NP *T*))
                                            (PP (ROLE ARG0)
                                                (NP (WH who)))
                                            (VB ’ve)
                                            (IP-CTL2 (VB got)
                                                     (PP (ROLE ARG1)
                                                         (NP (SORT GROUP)
                                                             (N babies)))))))))))

     In the matrix clause, we first meet the matrix subject. This is the pronoun ‘You’, which triggers a pro/7 structure. The annotation of (32) gives no extra information about where the source of the pronoun's antecedent should come from, and so this is set to 'd' --- the discourse context. There is creation of a <discourse_referent> x('PERSON',1) for an 'ARG0' binding over the content of __E__. There is also information to restrict the resolved antecedent to be a discourse referent with 'PERSON' sort information.

(32)

[PP input]                           [PP output]
(PP (ROLE ARG0)                      pro( 'd',
    (NP (SORT PERSON)                  .( 'PERSON',[])
        (PRO You)))                    ,'.e','__EQUALS__You',
                                       x( 'PERSON',1)
                                       ,'ARG0',
                                       __E__)__LOCAL__'ARG0'

     We next encounter (33) --- the verb ‘find’ of the matrix clause. This creates a verb/4 structure with <discourse_referent> x('EVENT',11) and information for arguments: 'ARG1' (to be bound by the local object), 'DARG1' (to be bound by the local ‘dummy’ object from a raised subject), and 'ARG0' (to be bound by the local subject).

(33)

[VB input]                           [VB output]
(VB find)                            verb( '.event',
                                           x( 'EVENT',11)
                                           ,'find',
                                           .( 'ARG1',
                                              .( 'DARG1',
                                                 .( 'ARG0',[]))))

     The reflexive pronoun ‘yourself’ occurs next. Like the subject pronoun, this creates a pro/7 structure. The annotation (34) also gives extra information (ACT lc), which is carried over to the first parameter of pro/7, to state that the pronoun should link to an antecedent that is a local binding. In this regard, the subject binding can be the only available candidate. Note, the discourse referent for the subject binding, seen with (32), happens to share the 'PERSON' sort information required of an antecedent.

(34)

[PP input]                           [PP output]
(PP (ROLE DARG1)                     pro( 'lc',
    (NP (ACT lc)                       .( 'PERSON',[])
        (PRO yourself)))               ,'.e','__EQUALS__yourself',
                                       x( 'PERSON',2)
                                       ,'DARG1',
                                       __E__)__LOCAL__'DARG1'

     We next encounter the participle verb ‘mixing’ of an embedded participle clause. This creates a verb/4 structure that includes information for a 'COM_with' argument gathered from the local tree, but note here there is no information to state the requirement of a subject binding as there is no subject in the local tree.

(35)

[VB input]                           [VB output]
(VB mixing)                          verb( '.event',
                                           x( 'EVENT',9)
                                           ,'mixing',
                                           .( 'COM_with',[]))

     There next arises a noun phrase with a relative clause, and so we need to consider the separate components, the first of which is (36) --- the head noun ‘people’, which gives rise to a pred/2 structure with no additional information about bindings.

(36)

[N input]                            [N output]
(N people)                           pred( 'people',[])

     We can now consider entering the content of the relative clause. The first component encountered is the annotation (37). This serves to prepare the ground for the occurrence of a relative pronoun by providing an instruction to integrate the binding that will correspond to the binding for the head noun and which is picked up with 'T' and given the instruction to move as a binding over to the '?e' (<fresh_atom>) name. There is also a wipe/2 instruction that serves to eliminate from the calculation the next '?e' introduced element.

(37)

[PP input]                           [PP output]
(PP (ROLE ?e)                        mov( 'T','?e',
    (NP *T*))                             wipe( '?e', __E__))

     Having established the environment that is able to support the relative pronoun, the relative pronoun, (38), is able to occur, which is simply an ordinary WH phrase --- as seen already with (17) above. While there is creation of <discourse_referent> x('ENTITY',3), this will be ignored by the semantic calculation because of the immediately prior wipe/2 (see section 3.1). Rather it is the <discourse_referent> inherited from the noun phrase 'h' binding that will be integrated as the 'ARG0' binding for __E__.

(38)

[PP input]                           [PP output]
(PP (ROLE ARG0)                      some( '?e',
    (NP (WH who)))                         x( 'ENTITY',3)
                                           ,
                                           local( .( 'h',[])
                                                  ,
                                                  pred( '',[]))
                                           ,'ARG0',
                                           __E__)__LOCAL__'ARG0'

     There next occurs (39) --- an auxiliary verb ‘'ve’ of the relative clause. This creates a verb/4 structure with information for an 'ARG0' argument from the local tree, together with there being expectation for an embedding to fill the content of __E__.

(39)

[VB input]                           [VB output]
(VB ’ve)                             verb( '.event',
                                           x( 'EVENT',6)
                                           ,'’ve',
                                           .( 'ARG0',
                                              .( at( __E__,
                                                     'EMB')
                                                 ,[])))

     There next occurs (40) -- the verb ‘got’ --- that is under the scope of the auxiliary ‘'ve’. From the local tree, this gathers information about the presence of an 'ARG1' argument.

(40)

[VB input]                           [VB output]
(VB got)                             verb( '.event',
                                           x( 'EVENT',5)
                                           ,'got',
                                           .( 'ARG1',[]))

     There next occurs the 'ARG1' argument that is introduced with a some/5 structure.

(41)

[PP input]                           [PP output]
(PP (ROLE ARG1)                      some( '.e',
    (NP (SORT GROUP)                       x( 'GROUP',4)
        (N babies)))                       ,
                                           local( .( 'h',[])
                                                  ,
                                                  pred(
                                                    'babies', []))
                                           ,'ARG1',
                                           __E__)__LOCAL__'ARG1'

     The embedding that falls under the auxiliary ‘'ve’ can now be constructed having contents from (40) and (41) placed under a control2/1 structure (see section 2.6.9 for details of the consequences of falling under control2/1).

(42)

[IP-CTL2 input]                      [IP-CTL2 output]
(IP-CTL2 (VB got)                    control2(
         (PP (ROLE ARG1)               local(
             (NP (SORT GROUP)            .( 'ARG0', .( 'ARG1',[]))
                 (N babies))))           ,
                                         some( '.e',
                                               x( 'GROUP',4)
                                               ,
                                               local( .( 'h',[])
                                                      ,
                                                      pred(
                                                        'babies', []))
                                               ,'ARG1',
                                               verb( '.event',
                                                     x( 'EVENT',5)
                                                     ,'got',
                                                     .( 'ARG1',[])))))

     We can now construct the content of the relative clause by bringing together (37), (38), (39), and (42), which are all placed under a mov/3 structure which ensures the 'h' (head) binding of the containing noun phrase becomes available as a 'T' binding internally to the relative clause to feed via (37) through to the subject relative pronoun (38). Also note the presence of embed/1 which protects the content of the relative clause from inheriting any binding other than the head binding from the containing noun phrase. There is also a resetting of information about the potential local bindings based on the content of the local tree that gives sensitivity to the presence of an 'ARG0' binding only.

(43)

[CP-REL input]
(CP-REL (IP-SUB (PP (ROLE ?e)
                    (NP *T*))
                (PP (ROLE ARG0)
                    (NP (WH who)))
                (VB ’ve)
                (IP-CTL2 (VB got)
                         (PP (ROLE ARG1)
                             (NP (SORT GROUP)
                                 (N babies))))))

[CP-REL output]
mov( 'h','T',
     embed(
       local(
         .( 'ARG0',[])
            ,
            mov( 'T','?e',
                 wipe( '?e',
                       some( '?e',
                             x( 'ENTITY',3)
                             ,
                             local( .( 'h',[])
                                    ,
                                    pred( '',[]))
                             ,'ARG0',
                             verb( '.event',
                                   x( 'EVENT',6)
                                   ,'’ve',
                                   .( 'ARG0',
                                      .( at( control2(
                                               local(
                                                 .( 'ARG0', .( 'ARG1',[]))
                                                 ,
                                                 some( '.e',
                                                       x( 'GROUP',4)
                                                       ,
                                                       local( .( 'h',[])
                                                              ,
                                                              pred(
                                                                'babies', []))
                                                       ,'ARG1',
                                                       verb( '.event',
                                                             x( 'EVENT',5)
                                                             ,'got',
                                                             .( 'ARG1',[])))))
                                             ,'EMB')
                                         ,[])))))))))

     We are now in a position to bring together the content of the noun phrase with relative clause, (44). The relative clause content from (43) is connected to the rest of the noun phrase restriction from (36) via a join/3 structure with 'and' as the first parameter to state the connecting relation. This gives the restriction for a some/5 structure that introduces the created <discourse_referent> x('GROUP',8) via a 'COM_with' binding.

(44)

[PP input]
(PP (ROLE COM_with)
    (NP (SORT GROUP)
        (N people)
        (CP-REL (IP-SUB (PP (ROLE ?e)
                            (NP *T*))
                        (PP (ROLE ARG0)
                            (NP (WH who)))
                        (VB ’ve)
                        (IP-CTL2 (VB got)
                                 (PP (ROLE ARG1)
                                     (NP (SORT GROUP)
                                         (N babies))))))))

[PP output]
some( '.e',
      x( 'GROUP',8)
      ,
      local(
        .( 'h',[])
         ,
         join(
           'and',
           pred( 'people',[])
           ,
           mov( 'h','T',
                embed(
                  local(
                    .( 'ARG0',[])
                       ,
                       mov( 'T','?e',
                            wipe( '?e',
                              some( '?e',
                                    x( 'ENTITY',3)
                                    ,
                                    local( .( 'h',[])
                                           ,
                                           pred( '',[]))
                                    ,'ARG0',
                                    verb( '.event',
                                          x( 'EVENT',6)
                                          ,'’ve',
                                          .( 'ARG0',
                                             .( at( control2(
                                                      local(
                                                        .( 'ARG0', .( 'ARG1',[]))
                                                        ,
                                                        some( '.e',
                                                              x( 'GROUP',4)
                                                              ,
                                                              local( .( 'h',[])
                                                                     ,
                                                                     pred(
                                                                       'babies', []))
                                                              ,'ARG1',
                                                              verb( '.event',
                                                                    x( 'EVENT',5)
                                                                    ,'got',
                                                                    .( 'ARG1',[])))))
                                                    ,'EMB')
                                                ,[])))))))))))
          ,'COM_with',
          __E__)__LOCAL__'COM_with'

     We can now construct the participle clause, bringing together (35) and (44) under a control1/1 structure that forms the restriction for a someFact/6 structure.

(45)

[PP input]
(PP (SORT SITUATION)
    (ROLE ARG1)
    (IP-CTL (VB mixing)
            (PP (ROLE COM_with)
                (NP (SORT GROUP)
                    (N people)
                    (CP-REL (IP-SUB (PP (ROLE ?e)
                                        (NP *T*))
                                    (PP (ROLE ARG0)
                                        (NP (WH who)))
                                    (VB ’ve)
                                    (IP-CTL2 (VB got)
                                             (PP (ROLE ARG1)
                                                 (NP (SORT GROUP)
                                                     (N babies))))))))))

[PP output]
someFact( '.e','FACT',
   x( 'SITUATION',10)
   ,
   control(
     local(
       .( 'ARG0', .( 'COM_with',[]))
       ,
       some(
         '.e',
         x( 'GROUP',8)
         ,
         local(
           .( 'h',[])
            ,
            join(
              'and',
              pred( 'people',[])
              ,
              mov( 'h','T',
                   embed(
                     local(
                       .( 'ARG0',[])
                          ,
                          mov( 'T','?e',
                               wipe( '?e',
                                 some( '?e',
                                   x( 'ENTITY',3)
                                   ,
                                   local( .( 'h',[])
                                          ,
                                          pred( '',[]))
                                   ,'ARG0',
                                   verb( '.event',
                                         x( 'EVENT',6)
                                         ,'’ve',
                                         .( 'ARG0',
                                            .( at( control2(
                                                     local(
                                                       .( 'ARG0', .( 'ARG1',[]))
                                                       ,
                                                       some( '.e',
                                                             x( 'GROUP',4)
                                                             ,
                                                             local( .( 'h',[])
                                                                    ,
                                                                    pred(
                                                                      'babies', []))
                                                             ,'ARG1',
                                                             verb( '.event',
                                                                   x( 'EVENT',5)
                                                                   ,'got',
                                                                   .( 'ARG1',[])))))
                                                   ,'EMB')
                                               ,[])))))))))))
             ,'COM_with',
             verb( '.event',
                   x( 'EVENT',9)
                   ,'mixing',
                   .( 'COM_with',[])))))
   ,'ARG1',
   __E__)__LOCAL__'ARG1'

     We finally have all the components with (32), (33), (34), and (45) to create (46) as the overall <sct_expr> for the matrix clause of (31).

(46)

local(
  .( 'ARG0', .( 'ARG1', .( 'DARG1',[])))
  ,
  pro( 'd',
    .( 'PERSON',[])
    ,'.e','__EQUALS__You',
    x( 'PERSON',1)
    ,'ARG0',
    pro( 'lc',
      .( 'PERSON',[])
      ,'.e','__EQUALS__yourself',
      x( 'PERSON',2)
      ,'DARG1',
      someFact( '.e','FACT',
        x( 'SITUATION',10)
        ,
        control(
          local(
            .( 'ARG0', .( 'COM_with',[]))
            ,
            some(
              '.e',
              x( 'GROUP',8)
              ,
              local(
                .( 'h',[])
                 ,
                 join(
                   'and',
                   pred( 'people',[])
                   ,
                   mov( 'h','T',
                        embed(
                          local(
                            .( 'ARG0',[])
                               ,
                               mov( 'T','?e',
                                    wipe( '?e',
                                          some( '?e',
                                                x( 'ENTITY',3)
                                                ,
                                                local( .( 'h',[])
                                                       ,
                                                       pred( '',[]))
                                                ,'ARG0',
                                                verb( '.event',
                                                      x( 'EVENT',6)
                                                      ,'’ve',
                                                      .( 'ARG0',
                                                         .( at( control2(
                                                                  local(
                                                                    .( 'ARG0', .( 'ARG1',[]))
                                                                    ,
                                                                    some( '.e',
                                                                          x( 'GROUP',4)
                                                                          ,
                                                                          local( .( 'h',[])
                                                                                 ,
                                                                                 pred(
                                                                                   'babies', []))
                                                                          ,'ARG1',
                                                                          verb( '.event',
                                                                                x( 'EVENT',5)
                                                                                ,'got',
                                                                                .( 'ARG1',[])))))
                                                                ,'EMB')
                                                            ,[])))))))))))
                  ,'COM_with',
                  verb( '.event',
                        x( 'EVENT',9)
                        ,'mixing',
                        .( 'COM_with',[])))))
        ,'ARG1',
        verb( '.event',
              x( 'EVENT',11)
              ,'find',
              .( 'ARG1',
                 .( 'DARG1',
                    .( 'ARG0',[]))))))))

2.2.4   An example with coordinations

With (4), (16), and (31), we have seen ACT, ADXP, ADX, CONN, CP-QUE, CP-REL, CP-THT, IP-CTL, IP-CTL2, IP-MAT, IP-SUB, NP, N, PP, PRO, Q, REL, ROLE, SORT, VB, and WH. This section considers (48)/(49), a normalised analysis for (47). This will demonstrate additional coverage to include all remaining tags listed in section 2.1: CONJP, IML, NPR, and NP-SUM.

(47)
The twins, Nicholas and Stuart, dance and play up the steps and along the path.

(48)

                                                                                 IP-MAT
                                                                                   |
                               +------------------------------------------------------------------------+
                               PP                                    IML                                PP
                               |                                      |                                 |
 +--------------------------------+                              +-------+            +------------------------+
ROLE                              NP                            IML    CONJP          PP                     CONJP
 |                                |                              |       |            |                        |
 |    +----------------------------------+                       |    +----+     +--------+        +--------------+
 |   ACT  SORT   N                       PP                      VB  CONN IML   ROLE      NP      CONN            PP
 |    |    |     |                       |                       |    |    |     |        |        |              |
 |    |    |     |      +-------------------------+              |    |    |     |     +-----+     |       +----------+
 |    |    |     |     ROLE                       NP             |    |    VB    |    ACT    N     |      ROLE        NP
 |    |    |     |      |                         |              |    |    |     |     |     |     |       |          |
 |    |    |     |      |                       NP-SUM           |    |    |     |     |     |     |       |       +----+
 |    |    |     |      |                         |              |    |    |     |     |     |     |       |      ACT   N
 |    |    |     |      |           +------------------+         |    |    |     |     |     |     |       |       |    |
 |    |    |     |      |           NP               CONJP       |    |    |     |     |     |     |       |       |    |
 |    |    |     |      |           |                  |         |    |    |     |     |     |     |       |       |    |
 |    |    |     |      |      +-------+      +---------+        |    |    |     |     |     |     |       |       |    |
 |    |    |     |      |     SORT    NPR    CONN       NP       |    |    |     |     |     |     |       |       |    |
 |    |    |     |      |      |       |      |         |        |    |    |     |     |     |     |       |       |    |
 |    |    |     |      |      |       |      |    +------+      |    |    |     |     |     |     |       |       |    |
 |    |    |     |      |      |       |      |   SORT   NPR     |    |    |     |     |     |     |       |       |    |
 |    |    |     |      |      |       |      |    |      |      |    |    |     |     |     |     |       |       |    |
ARG0 DEF GROUP twins __PRN__ PERSON Nicholas and PERSON Stuart dance and  play DIR_up DEF  steps  and  DIR_along  DEF  path

(49)

(IP-MAT (PP (ROLE ARG0)
            (NP (ACT DEF)
                (SORT GROUP)
                (N twins)
                (PP (ROLE __PRN__)
                    (NP (NP-SUM (NP (SORT PERSON)
                                    (NPR Nicholas))
                                (CONJP (CONN and)
                                       (NP (SORT PERSON)
                                           (NPR Stuart))))))))
        (IML (IML (VB dance))
             (CONJP (CONN and)
                    (IML (VB play))))
        (PP (PP (ROLE DIR_up)
                (NP (ACT DEF)
                    (N steps)))
            (CONJP (CONN and)
                   (PP (ROLE DIR_along)
                       (NP (ACT DEF)
                           (N path))))))

     First, let's consider the contribution of the two proper names ‘Nicholas’ and ‘Stuart’ with (50) and (51). Each proper name is contained under a distinct noun phrase projection, leading to the introduction of separate npr/3 structures. These npr/3 structures serve to introduce <discourse_referent>s that are constants with 'PERSON' sort information and an atom to identify reference, 'Nicholas' and 'Stuart', respectively.

(50)

[NP input]                          [NP output]
(NP (NPR Nicholas))                 npr( c( 'PERSON','Nicholas'), __X__, __E__)

(51)

[NP input]                          [NP output]
(NP (NPR Stuart))                   npr( c( 'PERSON','Stuart'), __X__, __E__)

     The contribution of the two proper names is brought together with a conjNpSum/6 structure (see section 2.6.7.7) that itself introduces a <discourse_referent> x('GROUP',1) to realise a combined value for the two constant <discourse_referent>s. Furthermore, this 'GROUP' <discourse_referent> is opened as a '__PRN__' (parenthetical) binding.

(52)

[PP input]
(PP (ROLE __PRN__)
    (NP (NP-SUM (NP (NPR Nicholas))
                (CONJP (CONN and)
                       (NP (NPR Stuart))))))

[PP output]
conjNpSum( '@e','and',
           x( 'GROUP',1)
           ,
           .( npr( c( 'PERSON','Nicholas'))
              ,
              .( npr( c( 'PERSON','Stuart'))
                 ,[]))
           ,'__PRN__',
           __E__)__LOCAL__'__PRN__'

     We next consider how parenthetical content (52) is integrated with the rest of the subject noun phrase, which, aside from (52), contains a pred/2 structure from the noun ‘twins’, to give the restriction for a some/5 structure. Integration is achieved with a parenthetical/5 structure (see section 2.6.7.9) that takes as arguments both:

The combination achieved with parenthetical/5 opens an 'ARG0' binding over the rest of the clause __E__ with x('GROUP',1) carried over from the some/4 argument (that is, the noun phrase's contribution minus the parenthetical content) as the binding's content.

(53)

[PP input]
(PP (ROLE ARG0)
    (NP (ACT DEF)
        (SORT GROUP)
        (N twins)
        (PP (ROLE __PRN__)
            (NP (NP-SUM (NP (NPR Nicholas))
                        (CONJP (CONN and)
                               (NP (NPR Stuart))))))))

[PP output]
parenthetical( '@e',
               conjNpSum( '@e','and',
                          x( 'GROUP',1)
                          ,
                          .( npr( c( 'PERSON','Nicholas'))
                             ,
                             .( npr( c( 'PERSON','Stuart'))
                                ,[]))
                          ,'__PRN__')
               ,
               some( '@e',
                     x( 'GROUP',2)
                     ,
                     local( .( 'h',[])
                            ,
                            pred( 'twins',[])))
               ,'ARG0',
               __E__)__LOCAL__'__PRN__','ARG0'

     We now consider the contribution of the conjoined verbs ‘dance’ and ‘play’. Both contribute verb/4 structures with the same inventory of required bindings.

(54)

[IML input]                          [IML output]
(IML (VB dance))                     verb( '.event',
                                           x( 'EVENT',3)
                                           ,'dance',
                                           .( 'ARG0',[]))

(55)

[IML input]                          [IML output]
(IML (VB play))                      verb( '.event',
                                           x( 'EVENT',4)
                                           ,'play',
                                           .( 'ARG0',[]))

     We next capture the joining of the two verbs with a connect/2 structure:

(56)

[IML input]                          [IML output]
(IML (IML (VB dance))                connect( 'and',
     (CONJP (CONN and)                        .( verb( '.event',
            (IML (VB play))))                          x( 'EVENT',3)
                                                       ,'dance',
                                                       .( 'ARG0',[]))
                                                 ,
                                                 .( verb( '.event',
                                                          x( 'EVENT',4)
                                                          ,'play',
                                                          .( 'ARG0',[]))
                                                    ,[])))

     We now consider the contribution of the two preposition phrases. Each contributes its own some/5 structure, with distinct <discourse_referent>s, restriction content, and role information ('DIR_up' and 'DIR_along', respectively).

(57)

[PP input]                           [PP output]
(PP (ROLE DIR_up)                    some( '@e',
    (NP (ACT DEF)                          x( 'ENTITY',5)
        (N steps)))                        ,
                                           local( .( 'h',[])
                                                  ,
                                                  pred( 'steps',[]))
                                           ,'DIR_up',
                                           __E__)__LOCAL__'DIR_up'

(58)

[PP input]                           [PP output]
(PP (ROLE DIR_along)                 some( '@e',
    (NP (ACT DEF)                          x( 'ENTITY',6)
        (N path)))                         ,
                                           local( .( 'h',[])
                                                  ,
                                                  pred( 'path',[]))
                                           ,'DIR_along',
                                           __E__)__LOCAL__'DIR_along'

     We can now consider bringing the two preposition phrases together with conjunction, which is possible with the conjPp/3 structure (see section 2.6.7.8).

(59)

[PP input]                         [PP output]
(PP (PP (ROLE DIR_up)              conjPp( 'and',
        (NP (ACT DEF)                      .( some( '@e',
            (N steps)))                             x( 'ENTITY',5)
    (CONJP (CONN and)                               ,
           (PP (ROLE DIR_along)                     local( .( 'h',[])
               (NP (ACT DEF)                               ,
                   (N path)))))                            pred( 'steps',[]))
                                                    ,'DIR_up')
                                              ,
                                              .( some( '@e',
                                                       x( 'ENTITY',6)
                                                       ,
                                                       local( .( 'h',[])
                                                              ,
                                                              pred( 'path',[]))
                                                       ,'DIR_along')
                                                 ,[]))
                                           ,
                                           __E__)__LOCAL__'DIR_up','DIR_along'

     With (53), (56), and (59), we have all the components to assemble the overall <sct_expr> for (49):

(60)

local( .( 'ARG0',
          .( 'DIR_up',
             .( 'DIR_along',
                .( '__PRN__',[]))))
       ,
       parenthetical( '@e',
                      conjNpSum( '@e','and',
                                 x( 'GROUP',1)
                                 ,
                                 .( npr( c( 'PERSON','Nicholas'))
                                    ,
                                    .( npr( c( 'PERSON','Stuart'))
                                       ,[]))
                                 ,'__PRN__')
                      ,
                      some( '@e',
                            x( 'GROUP',2)
                            ,
                            local( .( 'h',[])
                                   ,
                                   pred( 'twins',[])))
                      ,'ARG0',
                      conjPp( 'and',
                              .( some( '@e',
                                       x( 'ENTITY',5)
                                       ,
                                       local( .( 'h',[])
                                              ,
                                              pred( 'steps',[]))
                                       ,'DIR_up')
                                 ,
                                 .( some( '@e',
                                          x( 'ENTITY',6)
                                          ,
                                          local( .( 'h',[])
                                                 ,
                                                 pred( 'path',[]))
                                          ,'DIR_along')
                                    ,[]))
                              ,
                              connect( 'and',
                                       .( verb( '.event',
                                                x( 'EVENT',3)
                                                ,'dance',
                                                .( 'ARG0',[]))
                                          ,
                                          .( verb( '.event',
                                                   x( 'EVENT',4)
                                                   ,'play',
                                                   .( 'ARG0',[]))
                                             ,[]))))))

2.2.5   An example with a conditional

This section considers the conditional sentence (61).

(61)
If a donkey brays its owner winces.

Normalised analysis gives (62)/(63). This gives a coding where the consequent of the conditional is placed under a PP that contains (ACT cond).

(62)

                                                IP-MAT
                                                  |
                 +-----------------------------------------------------------+
                 PP                                   PP                     VB
                 |                                    |                      |
 +---------------------------+        +------------------+                   |
ACT   CONN                 IP-SUB    ROLE                NP                  |
 |     |                     |        |                  |                   |
 |     |            +------------+    |     +--------------------------+     |
 |     |            PP           VB   |    SORT            PP          N     |
 |     |            |            |    |     |              |           |     |
 |     |     +---------+         |    |     |       +----------+       |     |
 |     |    ROLE       NP        |    |     |      ROLE        NP      |     |
 |     |     |         |         |    |     |       |          |       |     |
 |     |     |     +------+      |    |     |       |       +-----+    |     |
 |     |     |    SORT    N      |    |     |       |      SORT  PRO   |     |
 |     |     |     |      |      |    |     |       |       |     |    |     |
 |     |     |     |      |      |    |     |       |       |     |    |     |
cond CNT_If ARG0 ANIMAL donkey brays ARG0 PERSON __GENV__ ANIMAL its owner winces

(63)

(IP-MAT (PP (ACT cond)
            (CONN CNT_If)
            (IP-SUB (PP (ROLE ARG0)
                        (NP (SORT ANIMAL)
                            (N donkey)))
                    (VB brays)))
        (PP (ROLE ARG0)
            (NP (SORT PERSON)
                (PP (ROLE __GENV__)
                    (NP (SORT ANIMAL)
                        (PRO its)))
                (N owner)))
        (VB winces))

Presence of (ACT cond) triggers selection of cond/4 for combining the antecedent expression and consequent expression of the conditional, as seen in (64). Content for the antecedent comes from the clause under the PP with (ACT cond). Content for the consequent is the remainder of the containing (IP-MAT) clause. Note also how cond/4 takes its conditional relation name from CONN that is under the same PP as (ACT cond).

(64)

local( .( 'ARG0',[])
       ,
       cond( '.','CND_CNT_If',
             embed( local( .( 'ARG0',[])
                           ,
                           some( '.e',
                                 x( 'ANIMAL',1)
                                 ,
                                 local( .( 'h',[])
                                        ,
                                        pred( 'donkey',[]))
                                 ,'ARG0',
                                 verb( '.event',
                                       x( 'EVENT',2)
                                       ,'brays',
                                       .( 'ARG0',[])))))
             ,
             some( '.e',
                   x( 'PERSON',4)
                   ,
                   local( .( '__GENV__',
                             .( 'h',[]))
                          ,
                          pro( 'd',
                               .( 'ANIMAL',[])
                               ,'.e','__EQUALS__its',
                               x( 'ANIMAL',3)
                               ,'__GENV__',
                               pred( 'owner',[])))
                   ,'ARG0',
                   verb( '.event',
                         x( 'EVENT',5)
                         ,'winces',
                         .( 'ARG0',[])))))

2.3   Grammatical roles

A Prolog atom that is part of a <normalised_term> has a grammatical role (i.e., is a <grammar_atom>) when it is either:

The significance of these roles will emerge when we transform to <sct_expr>s (see section 2.4), and still more when we undertake semantic calculations in chapter 3. Briefly:

     What is important for now is to keep these atoms with there differing roles distinct. Separation is achieved by listing <fresh_atom>s with fresh/2, and <local_atom>s with local/2. Any atom not listed by the commanding instances of fresh/2 and local/2 might be used as a <context_atom>.

     There is typically only one declaration of <fresh_atom>s with fresh/2 for the <normalised_term> of a full discourse, occuring as the topmost structure of the discourse encoding, as seen, for example, with (13) in section 2.2.1.

     In addition to the separation achieved with fresh/2 and local/2, <fresh_atom>s will follow the conventions of being prefixed with characters:

Notable examples of <fresh_atom>s are: '@e' (source for definite entities), '.e' (source for indefinite entities), '?e' (source for entities under question), '@event' (source for definite events), '.event' (source for indefinite events), etc.

2.4   Intermediate language

Section 2.2 allows for the gap between normalised annotation and Prolog terms to be bridged with a re-writing step. But the Prolog terms reached are not sufficiently fine grained to feed the semantic calculation of chapter 3, and must first be transformed into expressions of an intermediate language—a revision of the Scope Control Theory (SCT) language of Butler (2015), defined in this section. An intermediate language expression is an <sct_expr>, where:

(65)

<sct_expr> ::=
         <drs_structure_mapping>
      |  namely(<discourse_referent>, <fresh_atom>, <sct_expr>)
      |  wipe(<fresh_atom>, <sct_expr>)
      |  <sct_term>
      |  at(<sct_expr>, <role_atom>)
      |  rel(<fresh_list>, <context_list>, <relation_atom>, <sct_expr_list>)
      |  ifThere(<grammar_atom>, <sct_expr>, <sct_expr>)
      |  mov(<grammar_atom>, <grammar_atom>, <sct_expr>)
      |  clean(<integer>, <local_list>, <context_atom>, <sct_expr>)
      |  pick(<selection_atom>, <sct_term>, <sources_list>, <sort_list>)

<drs_structure_mapping> ::=
         head(<quantifier>, <fresh_list>, <sct_expr>)
      |  body(<fresh_list>, <sct_expr>)
      |  headClimb(<discourse_referent>, <fresh_atom>, <sct_expr>)
      |  bodyClimb(<fresh_atom>, <sct_expr>)

<sct_term> ::= t(<grammar_atom>)

<sct_expr_list> ::=
         []
      |  .(<sct_expr>, <sct_expr_list>)

<context_list> ::=
         []
      |  .(<context_atom>, <context_list>)

<sources_list> ::=
         []
      |  .(<local_atom>, <sources_list>)
      |  .(<context_atom>, <sources_list>)

     With semantic calculations, these language primitives assemble content for expressions of a target discourse representation language (<target_expr>s; see section 3.4), while possibly altering the content of an information state which influences the form of the built target expression (see section 3.2). The following provides an informal overview of what the various primitives contribute:

     The significance of these SCT functors will become apparent when they are used in instantiations of <sct_expr>s, the first of which are introduced in section 2.5.

2.5   Basic grammar statements

This section defines Prolog statements to assist <sct_expr> construction in section 2.6.

2.5.1   Building predicates

First, consider build_args(L1, L2), where L1 is a list of either atoms or <sct_expr>s, and L2 is the same list as L1, only with the atoms converted into <sct_expr>s, with each atom from L1 functioning as: (i) the <grammar_atom> of an <sct_term> and, (ii) the <role_atom> of an at/2 structure with the term embedded.

(66)

build_args([], []).
build_args([A0|As0], As) :-
  ( atom(A0) ->
    As = [at(t(A0), A0)|As1]
  ;
    As = [A0|As1]
  ),
  build_args(As0, As1).

For example:

(67)

[eclipse 1]: build_args([foo, at(t(bar), bar)], L).

L = [at(t(foo), foo), at(t(bar), bar)]
Yes (0.00s cpu)

     Now consider build_predicate/4 as a means to create predicates from SCT primitive rel/4 together with the range of potential arguments for the predicate (via build_args/2), and the selectional criteria for choosing between the produced arguments (via ifThere/2 for the semantic calculation to check the status of assigned content).

(68)

build_predicate([], L, S, rel([], [], S, Args)) :-
  build_args(L, Args).
build_predicate([H|T], L, S, ifThere(H, PredA, PredB)) :-
  build_predicate(T, [H|L], S, PredA),
  build_predicate(T, L, S, PredB).

For example, (69) illustrates ['foo', 'bar'] as a candidate list for the construction of arguments for a 'foobar' predicate:

(69)

[eclipse 2]: build_predicate([foo, bar], [], foobar, P).

P =
ifThere( foo,
         ifThere( bar,
                  rel( [],[],foobar,
                       [at( t( bar),bar)
                       ,
                       at( t( foo),foo)
                       ])
                  ,
                  rel( [],[],foobar,
                       [at( t( foo),foo)
                       ]))
         ,
         ifThere( bar,
                  rel( [],[],foobar,
                       [at( t( bar),bar)
                       ])
                  ,
                  rel( [],[],foobar,[])))
Yes (0.00s cpu)

The instantiation of P gives two layers of ifThere/3 structures that are tests to choose between four different potential realisations of the foobar predicate, each with a different valency that either includes or excludes arguments constructed from foo and bar.

     The appeal of build_predicate/4 is that there need be nothing in a predicate specification per se to determine what its arguments are going to be. Instead, there is the creation of all potential argument options, and it is left to the semantic calculation to make a final selection on the basis of which arguments have assigned content.

     With such an outlook there is no need for reference to a dictionary or lexicon to retrieve valence information for predicates. On the other hand, given an external resource, there is the prospect of grammaticality effects emerging when what is predicted by the resource differs from what is available from the assignment state during the runtime of a semantic calculation.

2.5.2   Enabling subordination

Natural languages work by repeatedly (re-)using the same grammatical resources. For example, with each new clause there is, with the absence of control, the introduction of a subject. With the semantic calculation, the occurrence of a subject adds a <discourse_referent> to the difference list assigned to the <local_atom> 'ARG0'. Because clauses can be embedded inside clauses, there needs to be a separation of the content assigned to 'ARG0' for a higher clause from the content assigned to 'ARG0' in the lower clause. Such separation will be accomplished with make_subord/6.

(70)

make_subord(N, D, Ls, Keep, E, clean(N, Remove, D, E)) :-
  subtract(Ls, Keep, Remove).

This creates a clean/4 structure that takes integer N, <local_list> Remove (formed from the <local_list> Ls with any elements also contained in Keep subtracted by subtract/3; see section 1.3.3), the <context_atom> D, and <sct_expr> E. At the runtime of a semantic calculation, this will send difference list content assigned to the atoms of Remove to the difference list that is assigned to D, such that the difference lists that remain assigned to the atoms of Remove will have a resulting length of N when evaluation continues with E. When N = 0, atoms of Remove will be assigned empty difference lists going into E.

2.5.3   Making closures

make_closure/4 brings about an Oper closure with scope over expression E, that applies to the <fresh_atom>s from Fs. Such closure involves the combination of a head/3 placed above a body/2, with both receiving the same <fresh_atom>s via the Fs parameter.

(71)

make_closure(Oper, Fs, E, head(Oper, Fs, body(Fs, E))).

To establish Fs content for (71), chars_select_closure/4 is defined. chars_select_closure(Cs, Fs, R0, R) picks out with the R0 and R difference the <fresh_atom>s from list Fs that share a character as prefix with the characters listed in Cs.

(72)

chars_select_closure(_, [], R, R).
chars_select_closure(Cs, [F|Fs], R0, [F|R]) :-
  atom_chars(F, [H|_]),
  memberchk(H, Cs), !,
  chars_select_closure(Cs, Fs, R0, R).
chars_select_closure(Cs, [_|Fs], R0, R) :-
  chars_select_closure(Cs, Fs, R0, R).

For example:

(73)

[eclipse 3]: chars_select_closure(['.'], ['@e', '.e', '.event'], [], R).


R = ['.e', '.event']
Yes (0.00s cpu)

     select_closure/3 selects the names of closures based on a given atom S:

(74)

select_closure(S, Fs, R) :-
  atom_chars(S, [H|_]),
  ( H == '.' ->
    chars_select_closure(['.'], Fs, [], R)
  ; H == '@' ->
    chars_select_closure(['@', '.'], Fs, [], R)
  ; H == '?' ->
    chars_select_closure(['?'], Fs, [], R)
  ;
    R = []
  ).

Notably, an atom with '@' as first character triggers selection of all atoms from Fs with '@' or '.' as first character. For example:

(75)

[eclipse 4]: select_closure('@e', ['@e', '.e', '.event'], R).


R = ['@e', '.e', '.event']
Yes (0.00s cpu)

2.6   Transformations

This section provides the transformation for reaching SCT structures from the Prolog terms of section 2.2 derived following tree normalisation. Transformation takes place against an environment that holds information about the available <grammar_atom>s. The simplest transformations are direct mappings onto SCT structures, that make no use of the environment:

(76)

transform(_, t(X), t(X)).

transform(Env, at(Norm, S), at(E, S)) :-
  transform(Env, Norm, E).

transform(Env, mov(X, Y, Norm), mov(X, Y, E)) :-
  transform(Env, Norm, E).

transform(Env, wipe(X, Norm), wipe(X, E)) :-
  transform(Env, Norm, E).

transform(Env, bodyClimb(V, Norm), bodyClimb(V, E)) :-
  transform(Env, Norm, E).

In the coming subsections, we work through the other structures of section 2.2.

2.6.1   Settings for ‘fresh’ and ‘local’ parameters

As mentioned already, transformation takes place against an environment that holds information about the available <grammar_atom>s. This has the form env(Fs, Ds, D, Ls), with D as the (never altered) <context_atom>. The other parameters are (re-)set by fresh/2 and local/2 structures. Specifically, fresh/2 changes Fs (<fresh_list>) and Ds (<context_list>), with Ds a list of D instances with the length of the new Fs:

(77)



transform(env(_, _, D, Ls), fresh(Fs, Norm), E) :-
  (
    foreach(_, Fs),
    foreach(C, Ds),
    param(D)
  do
    C = D
  ),
  transform(env(Fs, Ds, D, Ls), Norm, E).

In (77), there is iteration through each member of Fs to create Ds by having D added with each iteration.

     local/2 changes the Ls (<local_list>) parameter:

(78)



transform(env(Fs, Ds, D, _), local(Ls, Norm), E) :-
  transform(env(Fs, Ds, D, Ls), Norm, E).

2.6.2   Closure

Closure makes use of fresh_atoms via the Fs parameter of the env/4 environment, with make_closure/4 (see section 2.5.3) to assemble <sct_expr> content.

(79)

transform(env(Fs, Ds, D, Ls), close(Oper, Norm), E) :-
  transform(env(Fs, Ds, D, Ls), Norm, E0),
  make_closure(Oper, Fs, E0, E).

2.6.3   Existential closure

With exists/1 of (80) existential closure is achieved. We can see an example of use with (20) above, where exists/1 introduces existential closure for its immediately dominating modal environment.

(80)

transform(env(Fs, Ds, D, Ls), exists(Norm), E) :-
  transform(env(Fs, Ds, D, Ls), Norm, E0),
  chars_select_closure(['.'], Fs, [], C1),
  make_closure('exists', C1, E0, E).

2.6.4   Verbs

Realised with verb/4, a verb transforms to a predicate with the distinction of carrying minimally a bound Event term with 'EVENT' argument role, that, moreover, has its binding assured by namely/3 introducing (<discourse_referent>) DRef. Understanding of the function of namely/3 will emerge as more of the system of semantic calculation is introduced (notably, see sections 3.1 and 3.3). Here it is enough to know that its presence ensures that DRef will head the difference list assigned to Event at the instance during the semantic calculation when the verb is reached. Furthermore, if Args0 --- the list of required arguments for the verb --- contains an argument that is an embedding (i.e., a non-atom argument), then DRef will shift (via mov/3) to D (<context_atom>) when the embedding is reached. Aside from the required arguments of Args0, build_predicate/4 (see section 2.5.1) assembles the range of potential additional arguments based on Ls (the <local_atom>s of the environment) with any Args0 overlap subtracted.

(81)

transform(env(Fs, Ds, D, Ls), verb(Event, DRef, S, Args0), namely(DRef, Event, P)) :-
  (
    foreach(A0, Args0),
    foreach(A, Args),
    param(Fs, Ds, D, Ls, Event)
  do
    ( atom(A0) ->
      A = A0
    ;
      transform(env(Fs, Ds, D, Ls), A0, E),
      A = mov(Event, D, E)
    )
  ),
  subtract(Ls, Args, Usable),
  build_predicate(Usable, [at(t(Event), 'EVENT')|Args], S, P).

In (81), there is iteration through each member of Args0 to create Args by having added with each iteration either an unaltered atom from Args0 or a transformed argument from Args0 that is topped by mov/3 to send the Event binding (that is, DRef, introduced through namely/3) to D.

2.6.5   Past tense

In a normalised Prolog expression, the contribution of past tense is retained with past/2. With transformation, this constructs a predicate condition to state that the head <discourse_referent> of the difference list assigned Event is 'past'. The integration with bodyClimb/2 ensures this predicate condition has placement in a final semantic representation at the location where the Event binding is created.

(82)

transform(Env,
          past(Event, E0),
          rel( [],[],'',[E,
               bodyClimb( Event,
                          rel( [],[],'past',
                               [at( t( Event),'h')
                               ]))
               ])
         ) :-
  transform(Env, E0, E).

     With (12) and (13) above, we see the content of (83) expand to (84) (notably, via (10) and (11) above).

(83)

(ACT past) (VB ate)

(84)

past( '.event',
      verb( '.event',
            x( 'EVENT',3)
            ,'ate',
            .( 'LOC_at',
               .( 'ARG0',[]))))

With (84) as input, transform/2 yields (85).

(85)

rel( [],[],'',
     .( namely( x( 'EVENT',3)
                ,'.event',
                rel( [],[],'ate',
                     .( at( t( '.event')
                            ,'EVENT')
                        ,
                        .( at( t( 'LOC_at')
                               ,'LOC_at')
                           ,
                           .( at( t( 'ARG0')
                                  ,'ARG0')
                              ,[])))))
        ,
        .( bodyClimb( '.event',
                      rel( [],[],'past',
                           .( at( t( '.event')
                                  ,'h')
                              ,[])))
           ,[])))

2.6.6   Other predicates

Section 2.6.4 provides predicates which, by including an event argument, are suitable for capturing verbs. Other ways to achieve predicates are provided by (86) and (87). With (86), the predicate relation is created with pred/2 which transforms to a predicate with minimally the distinction of carrying an argument constructed as a 'h' binding, with a fuller range of valence possibilities calculated from the content of Usable.

(86)

transform(env(Fs, Ds, D, Ls), pred(S, Args0), P) :-
  (
    foreach(A0, Args0),
    foreach(A, Args1),
    param(Fs, Ds, D, Ls)
  do
    ( atom(A0) ->
      A = A0
    ;
      transform(env(Fs, Ds, D, Ls), A0, A)
    )
  ),
  Args = ['h'|Args1],
  subtract(Ls, Args, Usable),
  build_predicate(Usable, Args, S, P).

By contrast, (87) creates a predicate with relation/2 transformed to give rel/4 taking its arguments from the second parameter of relation/2 following their transformation.

(87)

transform(Env, relation(S, E0s), rel([], [], S, Es)) :-
  (
    foreach(E0, E0s),
    foreach(E, Es),
    param(Env)
  do
    transform(Env, E0, E)
  ).

     One of the uses for relation/2 is to introduce a propositional level S relation, as seen with (19) above. Also, relation/2 plays a linking role in the transformation of the conjNpSum/6 structure in section 2.6.7.7, and the parenthetical/5 structure in section 2.6.7.9.

2.6.7   Argument forming structures

This subsection discusses the argument forming structures: npr/3, some/5, quant/6, someClassic/5, someFact/6, pro/7, conjNpSum/6, conjNp/4, conjPp/3, and parenthetical/5.

2.6.7.1   Proper names

Constructed with npr/3, a proper name has the namely/3 structure to introduce a <discourse_referent> for the <fresh_atom> binding '@e', which shifts to become an X binding, where X is a <local_atom>. Since '@e' is prefixed with the ‘@’ character, a widest scoped binding obtains that remains accessible as a discourse binding (via a shift to the D environment parameter) following any coordination.

(88)

transform(Env,
          npr(DRef, X, E0),
          namely(DRef, '@e', mov('@e', X, E))
         ) :-
  transform(Env, E0, E).

As an example, the normalised Prolog term from (50) changes as follows:

(89)

[<normalised_term>]
npr( c( 'PERSON','Nicholas'), __X__, __E__)

[<sct_expr>]
namely( c( 'PERSON','Nicholas')
        ,'@e',
        mov( '@e'
             ,__X__,
             __E__)))

2.6.7.2   Noun phrases with restrictions

A basic noun phrase is realised with some(V, DRef, R0, X, E0). After transformation, there is namely/3 to introduce DRef (a <discourse_referent>) for a V (<fresh_atom>) binding, which shifts to an X (<local_atom>) binding for the nuclear scope E0 (i.e., the rest of the containing clause/phrase), together with a further shift to 'h' (a <local_atom>) for the restriction material R0. This latter shift to 'h' is accompanied by removal to the discourse context (D) (via make_subord/6 of section 2.5.2) of any local binding from the containing clause/phrase that is not 'h'. Also, to ensure the restriction material accompanies the quantification introduction of DRef, bodyClimb/2 surrounds the content transformed from R0 and shares the same <fresh_atom> (V) by which the new argument binding is introduced.

(90)

transform(env(Fs, Ds, D, Ls),
          some(V, DRef, R0, X, E0),
          namely( DRef,V,
                  mov( V,X,
                       rel( Fs,Ds,'',
                            [bodyClimb( V,
                                        mov( X,'h',R))
                            ,E])))
         ) :-
  transform(env(Fs, Ds, D, Ls), R0, R1),
  transform(env(Fs, Ds, D, Ls), E0, E),
  make_subord(0, D, Ls, ['h'], clean(1, ['h'], D, R1), R).

     As an example, the normalised Prolog term from (9) changes as follows:

(91)

[<normalised_term>]
some( '@e',
      x( 'LOCATION',2)
      ,
      local( .( 'h',[])
             ,
             pred( 'cafe',[]))
      ,'LOC_at',
      __E__)

[<sct_expr>]
namely( x( 'LOCATION',2)
        ,'@e',
        mov( '@e','LOC_at',
             rel( .( '@e',
                     .( '.event',[]))
                  ,
                  .( '*',
                     .( '*',[]))
                  ,'',
                  .( bodyClimb( '@e',
                                mov( 'LOC_at','h',
                                     clean( 0,
                                            .( 'ARG0',
                                               .( 'LOC_at',[]))
                                            ,'*',
                                            clean( 1,
                                                   .( 'h',[])
                                                   ,'*',
                                                   rel( [],[],'cafe',
                                                        .( at( t( 'h')
                                                               ,'h')
                                                           ,[]))))))
                     ,
                     __E__))))

Note how the shift of the 'LOC_at' binding with mov/3 to 'h' provides an environment suitable for nouns to occupy when constructed with pred/2 of section 2.6.6.

2.6.7.3   Noun phrases with quantification

A quantified noun phrase arises when namely/3 --- the introducer of fresh bindings --- is bundled with quantificational closure. Thus, quant/6 is like some/5, with the addition of taking Oper to specify the operation of quantification via make_closure/4 of section 2.5.3. What exactly is quantified is determined with select_closure/3 of section 2.5.3, on the basis of the <fresh_atom> V. As with some/5, the restriction is insulated from the containing clause by shifting any open local binding with make_subord/6 to the discourse context D with the exception of the binding introduced by the noun phrase, which shifts to 'h' to be available for the restriction content. Also, existential closure ('exists') is introduced to the nuclear scope with make_closure/4.

(92)

transform(env(Fs, Ds, D, Ls), quant(Oper, V, DRef, R0, X, E0), STRUC) :-
  select_closure(V, Fs, C2),
  union([V], C2, C1),
  transform(env(Fs, Ds, D, Ls), R0, R1),
  transform(env(Fs, Ds, D, Ls), E0, E1),
  make_subord(0, D, Ls, ['h'], clean(1, ['h'], D, R1), R),
  make_closure('exists', C2, E1, E),
  make_closure(Oper, C1, namely(DRef, V, mov(V, X, rel(Fs, Ds, '', [bodyClimb(V, mov(X, 'h', R)), E]))), STRUC).

     As an example, the normalised Prolog term from (6) changes as follows:

(93)

[<normalised_term>]
quant( 'EVERYONE','.e',
       x( 'PERSON',1)
       ,
       local( .( 'h',[])
              ,
              pred( '',[]))
       ,'ARG0',
       __E__)

[<sct_expr>]
head( 'EVERYONE',
      .( '.event',
         .( '.e',[]))
      ,
      body( .( '.event',
               .( '.e',[]))
            ,
            namely( x( 'PERSON',1)
                    ,'.e',
                    mov( '.e','ARG0',
                         rel( .( '@e',
                                 .( '.event',[]))
                              ,
                              .( '*',
                                 .( '*',[]))
                              ,'',
                              .( bodyClimb( '.e',
                                      mov( 'ARG0','h',
                                           clean( 0,
                                                  .( 'ARG0',
                                                     .( 'LOC_at',[]))
                                                  ,'*',
                                                  clean( 1,
                                                         .( 'h',[])
                                                         ,'*',
                                                         rel( [],[],'',
                                                              .( at( t( 'h')
                                                                     ,'h')
                                                                 ,[]))))))
                                 ,
                                 .( head( 'exists',
                                          .( '.event',[])
                                          ,
                                          body( .( '.event',[])
                                                ,
                                                __E__)))))))))

2.6.7.4   Classic arguments

someClassic/5 offers a variant of some/5 with no namely/3. Instead, SCT primitive headClimb/3 is used to introduce DRef (a <discourse_referent>). While this DRef receives closure (and thereby its semantic scope) from the commanding closure of V (a <fresh_atom>), it will not exhibit dynamic scope. That is, its binding scope will be over the content of the restriction (R0) and the nuclear scope (E0), but not beyond.

(94)

transform(env(Fs, Ds, D, Ls),
          someClassic(V, DRef, R0, X, E0),
          headClimb( DRef,V,
                     mov( V,X,
                          rel( Fs,Ds,'',
                               [bodyClimb( V,
                                           mov( X,'h',R))
                               ,E])))
         ) :-
  transform(env(Fs, Ds, D, Ls), R0, R1),
  transform(env(Fs, Ds, D, Ls), E0, E),
  make_subord(0, D, Ls, ['h'], clean(1, ['h'], D, R1), R).

As with some/5, open local bindings other than 'h' shift to the discourse context D via make_subord/6 before content from the restriction R0 is reached. Also, the restriction content is surrounded by bodyClimb/2 with V for placement in the semantic representation resulting from semantic calculation.

     As an example, the content of the normalised Prolog term from (18) changes as follows:

(95)

[ADXP output]
someClassic( '.e',
   x( 'TMP',2)
   ,
   local( .( 'h',[])
          ,
          pred( 'now',[]))
   ,'TMP',
   __E__)

headClimb( x( 'TMP',2)
           ,'.e',
           mov( '.e','TMP',
                rel( .( '?e',
                        .( '.e',
                           .( '.event',[])))
                     ,
                     .( '*',
                        .( '*',
                           .( '*',[])))
                     ,'',
                     .( bodyClimb( '.e',
                                   mov( 'TMP','h',
                                        clean( 0,
                                               .( 'ARG0',
                                                  .( 'ARG1',
                                                     .( 'TMP',[])))
                                               ,'*',
                                               clean( 1,
                                                      .( 'h',[])
                                                      ,'*',
                                                      rel( [],[],'now',
                                                           .( at( t( 'h')
                                                                  ,'h')
                                                              ,[]))))))
                        ,__E__))))

2.6.7.5   Propositional arguments

someFact/6 shares the property with someClassic/5 of having headClimb/3 to introduce its DRef (<discourse_referent>), but differs in its treatment of the restriction, R0, which is used to form an embedding (with 'EMB' role) to a predicate with <relation_atom> S. The opened X binding for the nuclear scope E0 binds a term argument of the S predicate with 'h' role but shifts to a '' (empty atom) binding before the content of the restriction R0 occurs. This removes the X binding from having any further binding role inside R0. In further contrast to the restrictions of some/5, quant/6, and someClassic/5, there are no alterations to the local bindings the restriction R0 inherits from the containing clause/phrase.

(96)

transform(env(Fs, Ds, D, Ls),
          someFact(V, S, DRef, R0, X, E0),
          headClimb( DRef,V,
                     mov( V,X,
                          rel( Fs,Ds,'',
                               [bodyClimb( V,
                                           rel( [],[],S,
                                                [at( t( X),'h')
                                                ,
                                                at( mov( X,'',R),'EMB')
                                                ]))
                               ,E])))
         ) :-
  transform(env(Fs, Ds, D, Ls), R0, R),
  transform(env(Fs, Ds, D, Ls), E0, E).

     As an example, consider someFact/6 in (45)/(46), which integrates a participle clause. Abstracting away the content of the participle clause with __R__ and the content of the rest of the containing clause with __E__, the following changes obtain:

(97)

someFact( '.e','that',
          x( 'SITUATION',8)
          ,__R__,'ARG1',__E__)

headClimb( x( 'SITUATION',8)
           ,'.e',
           mov( '.e','ARG1',
                rel( .( '?e',
                        .( '.e',
                           .( '.event',[])))
                     ,
                     .( '*',
                        .( '*',
                           .( '*',[])))
                     ,'',
                     .( bodyClimb( '.e',
                                   rel( [],[],'that',
                                        .( at( t( 'ARG1')
                                               ,'h')
                                           ,
                                           .( at( mov( 'ARG1','',__R__)
                                                  ,'EMB')
                                              ,[]))))
                        ,__E__))))

2.6.7.6   Pronouns

Pronoun contribution is realised with pro/7. Like someClassic/5 and someFact/6, this has headClimb/3 to introduce a fresh <discourse_referent> DRef for an X binding that will have syntactic scope over the content of E0 (the rest of the containing clause), yet scope semantically with the commanding V closure. A pronoun is resolved by receiving as its S antecedent a discourse referent that shares sort information with the <sort_list> Sorts. Candidates for antecedents are gathered with the SCT primitive pick/4, with Sources determined on the basis of C to be either: the sequences assigned to the <context_atom> D, the <local_atom>s of Ls (minus X, the binding from the noun phrase itself), or from the combination of D and Ls (minus X).

(98)

transform(env(Fs, Ds, D, Ls),
          pro(C, Sorts, V, S, DRef, X, E0),
          headClimb( DRef,V,
                     mov( V,X,
                          rel( [],[],'',
                               [bodyClimb( V,
                                           pick( S,
                                                 t( X)
                                                 ,Sources,Sorts))
                               ,E])))
         ) :-
  transform(env(Fs, Ds, D, Ls), E0, E),
  ( C == 'd' ->                % discourse bindings
    Sources = [D]
  ; C == 'lc' ->               % local bindings
    subtract(Ls, [X], Sources)
  ;                            % discourse and local bindings
    subtract([D|Ls], [X], Sources)
  ).

     As an example, the normalised Prolog term from (32) changes as follows:

(99)

[<normalised_term>]
pro( 'd',
  .( 'PERSON',[])
  ,'.e','__EQUALS__You',
  x( 'PERSON',1)
  ,'ARG0',
  __E__)

[<sct_expr>]
(NP headClimb( x( 'PERSON',1)
               ,'.e',
               mov( '.e','ARG0',
                    rel( [],[],'',
                         .( bodyClimb( '.e',
                                       pick( '__EQUALS__You',
                                             t( 'ARG0')
                                             ,
                                             .( '*',[])
                                             ,
                                             .( 'PERSON',[])))
                            ,__E__)))))

2.6.7.7   Noun phrase conjunction

There are two forms of noun phrase conjunction: conjNpSum/6 and conjNp/4. When NP annotation includes an NP-SUM layer, as in (100a), conjNpSum/6 is triggered, while conjNp/4 is the default that arises when there is no NP-SUM layer, as in (100b).

(100)



    a.         NP                b.        NP
               |                           |
             NP-SUM                   +---------+
               |                      NP      CONJP
        +---------+                   |         |
        NP      CONJP                 |      +----+
        |         |                  NPR    CONN  NP
        |      +----+                 |      |    |
       NPR    CONN  NP                |      |   NPR
        |      |    |                 |      |    |
        |      |   NPR             Nicholas and Stuart
        |      |    |
     Nicholas and Stuart

     With conjNpSum/6 of (101), there is introduction of DRef, a discourse referent, which binds into the nuclear scope, and which has the content of each noun phrase conjunct of an S conjunction related to DRef by an '__IN__' relation. Note how the content of a noun phrase conjunct, given as an <np_term>, is deconstructed into a list with =.. so that its X parameter can be added as '__IN__' and its nuclear scope parameter added as relation('__IN__', [t('__IN__'), t('h')]). As a consequence, the discourse referent of each noun phrase conjunct, which is accessible to the added relation/2 nuclear scope as an '__IN__' binding, is related to DRef, the overall discourse referent of the conjunction accessible to the added relation/2 nuclear scope as an 'h' binding.

(101)

transform(env(Fs, Ds, D, Ls),
          conjNpSum(V, S, DRef, NPs, X, E0),
          namely( DRef,V,
                  mov( V,X,
                       rel( Fs,Ds,'',
                            [bodyClimb( V,
                                        mov( X,'h',R))
                            ,E])))
         ) :-
  transform(env(Fs, Ds, D, Ls), E0, E),
  (
    foreach(NP, NPs),
    foreach(R1, Rs),
    param(Fs, Ds, D, Ls)
  do
    NP =.. NPList,
    append(NPList,
           ['__IN__', relation('__IN__', [t('__IN__'), t('h')])], RList),
    R0 =.. RList,
    transform(env(Fs, Ds, D, Ls), R0, R1)
  ),
  make_subord(0, D, Ls, ['h'], clean(1, ['h'], D, rel(Fs, Ds, S, Rs)), R).

     As an example, a normalised Prolog term derived from the NP structure of (100a), as in (52), changes as follows:

(102)

[<normalised_term>]
conjNpSum( '@e','and',
           x( 'GROUP',1)
           ,
           .( npr( c( 'PERSON','Nicholas'))
              ,
              .( npr( c( 'PERSON','Stuart'))
                 ,[]))
           ,__X__,
           __E__)

[<sct_term>]
namely( x( 'GROUP',1)
        ,'@e',
        mov( '@e',__X__,
             rel( .( '@e',
                     .( '.event',[]))
                  ,
                  .( '*',
                     .( '*',[]))
                  ,'',
                  .( bodyClimb( '@e',
                                mov( __X__,'h',
                                     clean( 0,
                                            .( 'ARG0',
                                               .( 'DIR_up',
                                                  .( 'DIR_along',[])))
                                            ,'*',
                                            clean( 1,
                                                   .( 'h',[])
                                                   ,'*',
                                                   rel( .( '@e',
                                                           .( '.event',[]))
                                                        ,
                                                        .( '*',
                                                           .( '*',[]))
                                                        ,'and',
                                                        .( namely( c( 'PERSON','Nicholas')
                                                                   ,'@e',
                                                                   mov( '@e','__IN__',
                                                                        rel( [],[],'__IN__',
                                                                             .( t( '__IN__')
                                                                                ,
                                                                                .( t( 'h')
                                                                                   ,[])))))
                                                           ,
                                                           .( namely( c( 'PERSON','Stuart')
                                                                      ,'@e',
                                                                      mov( '@e','__IN__',
                                                                           rel( [],[],'__IN__',
                                                                                .( t( '__IN__')
                                                                                   ,
                                                                                   .( t( 'h')
                                                                                      ,[])))))
                                                              ,[])))))))
                     ,
                     .( __E__,[])))))

     By contrast, conjNp/4 of (103) applies each <np_term> of NPs to the nuclear scope (E0) as forming an X binding, with each of the resulting propositions related as conjuncts of a dynamic S relation.

(103)

transform(env(Fs, Ds, D, Ls), conjNp(S, NPs, X, E0), rel(Fs, Ds, S, STRUCs)) :-
  (
    foreach(NP, NPs),
    foreach(STRUC, STRUCs),
    param(Fs, Ds, D, Ls, X, E0)
  do
    NP =.. NPList,
    append(NPList, [X, E0], STRUCList),
    STRUC0 =.. STRUCList,
    transform(env(Fs, Ds, D, Ls), STRUC0, STRUC)
  ).

     As an example, a normalised Prolog term derived from the NP structure of (100b) changes as follows:

(104)

[<normalised_term>]
conjNp( 'and',
        .( npr( c( 'PERSON','Nicholas'))
           ,
           .( npr( c( 'PERSON','Stuart'))
              ,[]))
        ,__X__,
        __E__)

[<sct_term>]
rel( .( '@e',
        .( '.event',[]))
     ,
     .( '*',
        .( '*',[]))
     ,'and',
     .( namely( c( 'PERSON','Nicholas')
                ,'@e',
                mov( '@e',__X__,__E__))
        ,
        .( namely( c( 'PERSON','Stuart')
                   ,'@e',
                   mov( '@e',__X__,__E__))
           ,[])))

2.6.7.8   Preposition phrase conjunction

conjPp/3 is much like conjNp/4 creating a conjunction of propositions related by a dynamic relation S, except there is no X parameter, with each conjunct as a <pp_term> already carrying information for binding into what is given as the nuclear scope (E0).

(105)

transform(env(Fs, Ds, D, Ls), conjPp(S, PPs, E0), rel(Fs, Ds, S, STRUCs)) :-
  (
    foreach(PP, PPs),
    foreach(STRUC, STRUCs),
    param(Fs, Ds, D, Ls, E0)
  do
    PP =.. PPList,
    append(PPList, [E0], STRUCList),
    STRUC0 =.. STRUCList,
    transform(env(Fs, Ds, D, Ls), STRUC0, STRUC)
  ).

     As an example, (59) changes into an <sct_term> as follows:

(106)

[<normalised_term>]
conjPp( 'and',
        .( some( '@e',
                 x( 'ENTITY',5)
                 ,
                 local( .( 'h',[])
                        ,
                        pred( 'steps',[]))
                 ,'DIR_up')
           ,
           .( some( '@e',
                    x( 'ENTITY',6)
                    ,
                    local( .( 'h',[])
                           ,
                           pred( 'path',[]))
                    ,'DIR_along')
              ,[]))
        ,__E__)

[<sct_expr>]
rel( .( '@e',
        .( '.event',[]))
     ,
     .( '*',
        .( '*',[]))
     ,'and',
     .( namely( x( 'ENTITY',5)
                ,'@e',
                mov( '@e','DIR_up',
                     rel( .( '@e',
                             .( '.event',[]))
                          ,
                          .( '*',
                             .( '*',[]))
                          ,'',
                          .( bodyClimb( '@e',
                                        mov( 'DIR_up','h',
                                             clean( 0,
                                                    .( 'ARG0',
                                                       .( 'DIR_up',
                                                          .( 'DIR_along',[])))
                                                    ,'*',
                                                    clean( 1,
                                                           .( 'h',[])
                                                           ,'*',
                                                           rel( [],[],'steps',
                                                                .( at( t( 'h')
                                                                       ,'h')
                                                                   ,[]))))))
                             ,
                             .( __E__,[])))))
        ,
        .( namely( x( 'ENTITY',6)
                   ,'@e',
                   mov( '@e','DIR_along',
                        rel( .( '@e',
                                .( '.event',[]))
                             ,
                             .( '*',
                                .( '*',[]))
                             ,'',
                             .( bodyClimb( '@e',
                                           mov( 'DIR_along','h',
                                                clean( 0,
                                                       .( 'ARG0',
                                                          .( 'DIR_up',
                                                             .( 'DIR_along',[])))
                                                       ,'*',
                                                       clean( 1,
                                                              .( 'h',[])
                                                              ,'*',
                                                              rel( [],[],'path',
                                                                   .( at( t( 'h')
                                                                          ,'h')
                                                                      ,[]))))))
                                ,
                                .( __E__,[])))))
           ,[])))

2.6.7.9   Noun phrase parentheticals

Noun phrase parentheticals can be integrated with the parenthetical/5 of (107), with the parenthetical content needing to have the form of a <np_term> (NP1) that occurs alongside its host noun phrase (the <np_term> NP0). With <sct_term> creation, the content of the parenthetical is connected to the binding of its host noun phrase with a '__PRN__' relation, with both this connecting relation and the content of the parenthetical placed outside the restriction of the host noun phrase.

(107)

transform(Env, parenthetical(V, NP1, NP0, X, E0), STRUC) :-
  NP1 =.. NP1List,
  append(NP1List, ['__PRN__', relation('__PRN__', [t('__PRN__'), t(X)])], ParentheticalList),
  Parenthetical =.. ParentheticalList,
  NP0 =.. NP0List,
  append(NP0List, [X, connect('', [bodyClimb(V, Parenthetical), E0])], STRUCList),
  STRUC0 =.. STRUCList,
  transform(Env, STRUC0, STRUC).

     As an example, (53) changes into an <sct_term> as follows:

(108)

[<normalised_term>]
parenthetical( '@e',
               conjNpSum( '@e','and',
                          x( 'GROUP',1)
                          ,
                          .( npr( c( 'PERSON','Nicholas'))
                             ,
                             .( npr( c( 'PERSON','Stuart'))
                                ,[])))
               ,
               some( '@e',
                     x( 'GROUP',2)
                     ,
                     local( .( 'h',[])
                            ,
                            pred( 'twins',[])))
               ,'ARG0',__E__)

[<sct_expr>]
namely( x( 'GROUP',2)
   ,'@e',
   mov( '@e','ARG0',
        rel( .( '@e',
             .( '.event',[]))
          ,
          .( '*',
             .( '*',[]))
          ,'',
          .( bodyClimb( '@e',
                        mov( 'ARG0','h',
                             clean( 0,
                                    .( 'ARG0',
                                       .( 'DIR_up',
                                          .( 'DIR_along',[])))
                                    ,'*',
                                    clean( 1,
                                           .( 'h',[])
                                           ,'*',
                                           rel( [],[],'twins',
                                                .( at( t( 'h')
                                                       ,'h')
                                                   ,[]))))))
             ,
             .( rel( .( '@e',
                     .( '.event',[]))
                  ,
                  .( '*',
                     .( '*',[]))
                  ,'',
                  .( bodyClimb( '@e',
                         namely( x( 'GROUP',1)
                            ,'@e',
                            mov( '@e','__PRN__',
                                 rel( .( '@e',
                                         .( '.event',[]))
                                      ,
                                      .( '*',
                                         .( '*',[]))
                                      ,'',
                                      .( bodyClimb( '@e',
                                           mov( '__PRN__','h',
                                                clean( 0,
                                                    .( 'ARG0',
                                                       .( 'DIR_up',
                                                          .( 'DIR_along',[])))
                                                    ,'*',
                                                    clean( 1,
                                                        .( 'h',[])
                                                        ,'*',
                                                        rel( .( '@e',
                                                                .( '.event',[]))
                                                             ,
                                                             .( '*',
                                                                .( '*',[]))
                                                             ,'and',
                                                             .( namely( c( 'PERSON','Nicholas')
                                                                   ,'@e',
                                                                   mov( '@e','__IN__',
                                                                        rel( [],[],'__IN__',
                                                                             .( t( '__IN__')
                                                                                ,
                                                                                .( t( 'h')
                                                                                   ,[])))))
                                                                ,
                                                                .( namely( c( 'PERSON','Stuart')
                                                                      ,'@e',
                                                                      mov( '@e','__IN__',
                                                                           rel( [],[],'__IN__',
                                                                                .( t( '__IN__')
                                                                                   ,
                                                                                   .( t( 'h')
                                                                                      ,[])))))
                                                                   ,[])))))))
                                ,
                                       .( rel( [],[],'__PRN__',
                                               .( t( '__PRN__')
                                                  ,
                                                  .( t( 'ARG0')
                                                     ,[])))
                                          ,[]))))))
                     ,
                     .( __E__,[])))
                ,[])))))

2.6.8   Embedding

embed/1 protects an embedding from local (Ls) bindings that would otherwise be inherited from the outside environment.

(109)

transform(env(Fs, Ds, D, Ls), embed(E0), E) :-
  transform(env(Fs, Ds, D, Ls), E0, E1),
  make_subord(0, D, Ls, [], E1, E).

     As an example, consider the most embedded occurrence of embed/1 in (28). This occurs within a context that gives 'ARG0', 'ARG1', and 'TMP' as content for the <local_list> parameter taken by the clean/4 instruction of the produced output, seen in (110).

(110)

[<normalised_term>]
embed(__E__)

[<sct_expr>]
clean(0, .('ARG0', .('ARG1', .('TMP', []))), '*', __E__)

2.6.9   Control

Having embed/1 removes all inherited local (Ls) bindings. But binding inheritance may be desirable. In particular, as obligatory dependencies, control dependencies are best captured through the preservation of a local binding of the embedding predicate into the embedding. Such preservation might include a shift to a different local binding name, as accomplished with control/1.

(111)

transform(env(Fs, Ds, D, Ls), control(E0), E) :-
  transform(env(Fs, Ds, D, Ls), E0, E1),
  intersection(['ARG00', 'DARG0', 'h', 'ARG1', 'DARG1', 'ARG2'], Ls, Candidates),
  make_subord(0, D, Ls,  ['ARG0'|Candidates], clean(1, ['ARG0'], D, E1), E2),
  make_subord(0, 'ARG0', Candidates, [], E2, E).

The transformation of control/1 leads to three steps.

These three steps have the effect that, with control/1, there is one binding that can be preserved from the embedding clause into the embedding, with the ordering of preference in (112), with 'ARG2' most preferred:

(112)

'ARG2' > 'ARG1' > 'DARG1' > 'h' > 'DARG0' > 'ARG00' > 'ARG0'

     As an example, consider the occurrence of control/1 in (46). This occurs within a context that gives 'ARG0', 'ARG1', and 'DARG1' as content for the <local_list> parameter.

(113)

[<normalised_term>]
control(__E__)

[<sct_expr>]
clean( 0,
       .( 'ARG1',
          .( 'DARG1',[]))
       ,'ARG0',
       clean( 0,[],'*',
              clean( 1,
                     .( 'ARG0',[])
                     ,'*',
                     __E__)))

     In deviation to control/1, we will also establish control relations with control2/1. This misses out the first step of shifting sequence values to the 'ARG0' binding. With this change, it can only be the 'ARG0' binding that is maintained into the embedding.

(114)

transform(env(Fs, Ds, D, Ls), control2(E0), E) :-
  transform(env(Fs, Ds, D, Ls), E0, E1),
  make_subord(0, D, Ls, ['ARG0'], clean(1, ['ARG0'], D, E1), E).

     As an example, consider the occurrence of control2/1 in (46). This occurs within a context that gives 'ARG0' as content for the <local_list> parameter.

(115)

[<normalised_term>]
control2(__E__)

[<sct_expr>]
clean(0, [], '*', clean(1, .('ARG0', []), '*', __E__))

2.6.10   Coordination

When there is annotation of coordinate structure with an explicit CONJP configuration (see section 2.2.4), the <normalised_term> resulting from conversion will contain connect/2 to integrate with (116) the conjuncts under a single rel/4 structure, with the appropriate relation name supplied through the S parameter.

(116)

transform(env(Fs, Ds, D, Ls), connect(S, E0s), rel(Fs, Ds, S, Es)) :-
  (
    foreach(E0, E0s),
    foreach(E, Es),
    param(Fs, Ds, D, Ls)
  do
    transform(env(Fs, Ds, D, Ls), E0, E)
  ).

     What is most notable about a relation constructed with connect/2 is that it is made sensitive to the Fs parameter, which is used to list the available fresh binding names, and so trigger management (via calls during evaluation leading to allocate/6; see section 3.2.5) of the accessible fresh discourse referents for the conjuncts of the Es list.

     As an example, (56) changes into an <sct_term> as follows:

(117)

[<normalised_term>]
connect( 'and',
         .( verb( '.event',
                  x( 'EVENT',3)
                  ,'dance',
                  .( 'ARG0',[]))
            ,
            .( verb( '.event',
                     x( 'EVENT',4)
                     ,'play',
                     .( 'ARG0',[]))
               ,[])))

[<sct_expr>]
rel( .( '@e',
        .( '.event',[]))
     ,
     .( '*',
        .( '*',[]))
     ,'and',
     .( namely( x( 'EVENT',3)
                ,'.event',
                ifThere( 'DIR_up',
                         ifThere( 'DIR_along',
                                  rel( [],[],'dance',
                                       .( at( t( 'DIR_along')
                                              ,'DIR_along')
                                          ,
                                          .( at( t( 'DIR_up')
                                                 ,'DIR_up')
                                             ,
                                             .( at( t( '.event')
                                                    ,'EVENT')
                                                ,
                                                .( at( t( 'ARG0')
                                                       ,'ARG0')
                                                   ,[])))))
                                  ,
                                  rel( [],[],'dance',
                                       .( at( t( 'DIR_up')
                                              ,'DIR_up')
                                          ,
                                          .( at( t( '.event')
                                                 ,'EVENT')
                                             ,
                                             .( at( t( 'ARG0')
                                                    ,'ARG0')
                                                ,[])))))
                         ,
                         ifThere( 'DIR_along',
                                  rel( [],[],'dance',
                                       .( at( t( 'DIR_along')
                                              ,'DIR_along')
                                          ,
                                          .( at( t( '.event')
                                                 ,'EVENT')
                                             ,
                                             .( at( t( 'ARG0')
                                                    ,'ARG0')
                                                ,[]))))
                                  ,
                                  rel( [],[],'dance',
                                       .( at( t( '.event')
                                              ,'EVENT')
                                          ,
                                          .( at( t( 'ARG0')
                                                 ,'ARG0')
                                             ,[]))))))
        ,
        .( namely( x( 'EVENT',4)
                   ,'.event',
                   ifThere( 'DIR_up',
                            ifThere( 'DIR_along',
                                     rel( [],[],'play',
                                          .( at( t( 'DIR_along')
                                                 ,'DIR_along')
                                             ,
                                             .( at( t( 'DIR_up')
                                                    ,'DIR_up')
                                                ,
                                                .( at( t( '.event')
                                                       ,'EVENT')
                                                   ,
                                                   .( at( t( 'ARG0')
                                                          ,'ARG0')
                                                      ,[])))))
                                     ,
                                     rel( [],[],'play',
                                          .( at( t( 'DIR_up')
                                                 ,'DIR_up')
                                             ,
                                             .( at( t( '.event')
                                                    ,'EVENT')
                                                ,
                                                .( at( t( 'ARG0')
                                                       ,'ARG0')
                                                   ,[])))))
                            ,
                            ifThere( 'DIR_along',
                                     rel( [],[],'play',
                                          .( at( t( 'DIR_along')
                                                 ,'DIR_along')
                                             ,
                                             .( at( t( '.event')
                                                    ,'EVENT')
                                                ,
                                                .( at( t( 'ARG0')
                                                       ,'ARG0')
                                                   ,[]))))
                                     ,
                                     rel( [],[],'play',
                                          .( at( t( '.event')
                                                 ,'EVENT')
                                             ,
                                             .( at( t( 'ARG0')
                                                    ,'ARG0')
                                                ,[]))))))
           ,[])))

The resulting <sct_term> consists of an 'and' conjunction created with rel/4 that is sensitive to '.e' and '.event' bindings. This connects encodings for the two verbs dance and play. Each conjunct has namely/3 to introduce with '.event' a discourse referent: x('EVENT',3) for dance, and x('EVENT',4) for play. Discourse referent introduction is followed by two layers of ifThere/3 with tests to choose between four different potential valencies that vary with respect to the inclusion or exclusion of 'DIR_up' and 'DIR_along' bindings. The valency options all share the need for 'EVENT' and 'ARG0' bindings.

     From (117), the next step (details for which are in chapter 3) is to undertake a calculation that takes the <sct_term> as input together with an assignment state that accumulates information about the calculation, to ultimately reach a logical expression that, notably, will have predicates with determined valencies. For each conjunct, this calculation proceeds as the navigation of a particular route through the ifThere/3 conditionals to determine the returned form, as the chart of (118) illustrates:

(118)

     The illustrated paths through (118) correspond to what happens with the two different (‘__E__’) environments into which the content of (117) is placed when integrated into the preposition phrase coordinate structure seen in (106).

2.6.11   Further ways to build expressions

Bringing together expressions A0 and B0 under an S relation with the ‘dynamic’ behaviour of connect/2 is achieved with join/3 and join_right/3. These differ in the ordering behaviour of and so in the dynamics between A0 and B0:

(119)

transform(env(Fs, Ds, D, Ls), join(S, A0, B0), rel(Fs, Ds, S, [A, B])) :-
  transform(env(Fs, Ds, D, Ls), A0, A),
  transform(env(Fs, Ds, D, Ls), B0, B).

(120)

transform(env(Fs, Ds, D, Ls), join_right(S0, A0, B0), rel(Fs, Ds, S, [B, A])) :-
  atom_concat(S0, '__RIGHT__', S),
  transform(env(Fs, Ds, D, Ls), A0, A),
  transform(env(Fs, Ds, D, Ls), B0, B).

     cond/4 and cond_right/4 are variants of join/3 and join_right/3 that incorporate quantification to support donkey conditionals.

(121)

transform(env(Fs, Ds, D, Ls), cond(V, S, A0, B0), STRUC) :-
  select_closure(V, Fs, C1),
  transform(env(Fs, Ds, D, Ls), A0, A),
  transform(env(Fs, Ds, D, Ls), B0, B1),
  make_closure('exists', C1, B1, B),
  make_closure('forall', C1, rel(Fs, Ds, S, [A, B]), STRUC).

(122)

transform(env(Fs, Ds, D, Ls), cond_right(V, S0, A0, B0), STRUC) :-
  atom_concat(S0, '__RIGHT__', S),
  select_closure(V, Fs, C1),
  transform(env(Fs, Ds, D, Ls), A0, A),
  transform(env(Fs, Ds, D, Ls), B0, B1),
  make_closure('exists', C1, B1, B),
  make_closure('forall', C1, rel(Fs, Ds, S, [B, A]), STRUC).

     As an example, consider the conditional from (64). This occurs within a context that minimally gives '.e' and '.event' as content for the <fresh_list> parameter taken by the rel/4 structure that creates the "CND_CNT_If" conditional relation, as well as the instances of head/3 and body/2 that occur with universal quantification over the entire conditional structure, and existential quantification over the consequent.

(123)

[<normalised_term>]
cond('.', 'CND_CNT_If', __E1__, __E2__)

[<sct_expr>]
head( 'forall',
      .( '.e',
         .( '.event',[]))
      ,
      body( .( '.e',
               .( '.event',[]))
            ,
            rel( .( '.e',
                    .( '.event',[]))
                 ,
                 .( '*',
                    .( '*',[]))
                 ,'CND_CNT_If',
                 .( __E1__,
                    .( head( 'exists',
                             .( '.e',
                                .( '.event',[]))
                             ,
                             body( .( '.e',
                                      .( '.event',[]))
                                   ,__E2__))
                       ,[])))))

2.6.12   Clause typing

In (124), there is question/1 to achieve clause typing for a question.

(124)

transform(env(Fs, Ds, D, Ls),
          question(E0),
          head('exists', C1, head('question', C2, body(C3, E)))) :-
  transform(env(Fs, Ds, D, Ls), E0, E),
  chars_select_closure(['.'], Fs, [], C1),
  chars_select_closure(['?'], Fs, [], C2),
  chars_select_closure(['?', '.'], Fs, [], C3).

2.7   Orientation

In the next chapter we move on to a discussion of the subsequent interpretation of <sct_expr>s as reached by the transformations of normalised annotation in this chapter.








Chapter 3: Semantic calculation

This chapter sets out how <sct_expr>s (see section 2.4) can be used as input for a calculation that returns expressions of a target discourse representation language. Target language expressions (<target_expr>s) include quantificational closures, discourse referents, and relations (both as predicate conditions and connectives), as well as markers to carry information on where discourse referents and conditions are interpreted.

     The chapter is organised as follows. Section 3.1 presents a procedure for collecting the <discourse_referent>s of an <sct_expr>. Section 3.2 introduces a storage mechanism for holding <discourse_referent>s. Section 3.3 presents the calculation from <sct_expr>s to the target language. Finally, section 3.4 details the target language.

3.1   Collecting <discourse_referent>s

A key contribution of head/3, namely/3, and wipe/2, is their use in determining the distributions of <discourse_referent>s. The effects of this contribution are made with discourse_refs(X, E, Ds) of (1). This is true when X is a <fresh_name>, E is an <sct_expr>, and Ds is a difference list with <discourse_referent>s obtained from E.

(1)

discourse_refs(X, head(_, Vs, E), Ds) :-
  ( memberchk(X, Vs) ->
    Ds = D-D
  ;
    discourse_refs(X, E, Ds)
  ).
discourse_refs(X, body(_, E), Ds) :-
  discourse_refs(X, E, Ds).
discourse_refs(X, headClimb(_, _, E), Ds) :-
  discourse_refs(X, E, Ds).
discourse_refs(X, bodyClimb(_, E), Ds) :-
  discourse_refs(X, E, Ds).
discourse_refs(X, namely(DRef, Y, E), Ds) :-
  ( X == Y ->
    discourse_refs(X, E, D-D0),
    Ds = [DRef|D]-D0
  ;
    discourse_refs(X, E, Ds)
  ).
discourse_refs(X, wipe(Y, E), Ds) :-
  ( X == Y ->
    discourse_refs(X, E, [_|D]-D0),
    Ds = D-D0
  ;
    discourse_refs(X, E, Ds)
  ).
discourse_refs(_, t(_), D-D).
discourse_refs(X, at(E, _), Ds) :-
  discourse_refs(X, E, Ds).
discourse_refs(X, rel(_, _, _, Es), D-D0) :-
  (
    foreach(E, Es),
    fromto(D0, In, Out, D),
    param(X)
  do
    discourse_refs(X, E, Out-In)
  ).
discourse_refs(X, ifThere(_, E1, E2), Ds) :-
  discourse_refs(X, E1, Ds),
  discourse_refs(X, E2, Ds).
discourse_refs(X, mov(_, _, E), Ds) :-
  discourse_refs(X, E, Ds).
discourse_refs(X, clean(_, _, _, E), Ds) :-
  discourse_refs(X, E, Ds).
discourse_refs(_, pick(_, _, _, _), D-D).

The definition of discourse_refs/3 has patterns (including wildcards ‘_’) to match the functors that make up the <sct_expr> language. Most functors contribute only the collections from the expressions over which they scope. For rel/4, this includes collecting from a contained list of <sct_expr>s (via the ECLiPSe iterator do; see section 1.3).

     The real action with discourse_refs/3 happens when either namely/3, wipe/2, or head/3 is reached. With namely/3 if there is a match of <fresh_atom>s then the <discourse_referent> carried by namely/3 is entered into the overall difference list, else collection continues with no addition. With wipe/2 there is collection for the embedded <sct_expr>, E, such that if there is a match of <fresh_atom>s then the tail of the collection is returned, otherwise all of the collection is returned. This has the effect of skipping the <discourse_referent> from the next namely/3 when the same <fresh_atom> is shared by head/3 and namely/3. Finally, with head/3 if the <fresh_atom> of the collection happens to be a member of the list that instantiates the Vs parameter of head/3 then the empty list is returned as the collection result (potentially hiding <discourse_referent>s), else the collection for the embedded <sct_expr> is returned.

     As an example of executing discourse_refs/3, consider (2):

(2)

[eclipse 1]: discourse_refs(foo, namely(x(bar,1), foo, namely(x(bar,2), foo, t(foo))), Ds).


Ds = [x(bar,1),x(bar,2)|L] - L
Yes (0.00s cpu)

That is, a difference list is returned containing the <discourse_referent>s carried by the namely/3 instances.

     When head/3 and namely/3 share the same <fresh_atom>, head/3 serves to hide the presence of namely/3, as the return of the empty difference list in (3) shows.

(3)

[eclipse 2]: discourse_refs(foo, head(exists, [foo], namely(x(bar, 1), foo, namely(x(bar, 2), foo, t(foo)))), Ds).


Ds = _229 - _229
Yes (0.00s cpu)

Also taking a <fresh_atom>, wipe/2 differs from head/3 by hiding only what is the next namely/3 instance with the same <fresh_atom>, as (4) demonstrates:

(4)

[eclipse 3]: discourse_refs(foo, wipe(foo, namely(x(bar,1), foo, namely(x(bar,2), foo, t(foo)))), Ds).


Ds = [x(bar, 2)|_224] - _224
Yes (0.00s cpu)

3.2   Storing <discourse_referent>s

This section introduces a storage mechanism capable of keeping track of the status of <discourse_referent>s. This consists of an assignment that assigns with map/2 a (possibly empty) difference list of <discourse_referent>s to each <grammar_atom> (see section 2.3).

     First, val(Assn, X, Ds) succeeds when Ds is the (possibly empty) difference list assigned by Assn to X.

(5)

val(Assn, X, Ds) :-
  ( memberchk(map(X, Ds0), Assn) ->
    Ds = Ds0
  ;
    Ds = D-D                     % otherwise return the empty difference list
  ).

By contrast, contentful_val(Assn, X, Ds) succeeds only if Ds is a non-empty difference list assigned by Assn to X.

(6)

contentful_val(Assn, X, D-D0) :-
  memberchk(map(X, D-D0), Assn),
  D &backslash;== D0.                      % assigned difference list must be non-empty

     Note that with the definition of val/3 in (5), Assn as the empty list ([]) is sufficient for stating the empty assignment, with all X instantiations assigned the empty difference list.

     Now we have the ability to access assigned content, we next introduce methods: push/4, pop/3, shift/4, shift_last/4, allocate/6, and dispose/5. These methods will govern the introduction, release and subsequent accessibility of assigned content.

3.2.1   push/4

Defined in (7), push/4 succeeds when Assn is a variant of assignment Assn0 differing only in that there is a new difference list assigned with map/2 to X (via update/4, see section 1.3.3) that is the concatenation New-Old of the content of the difference list New-D and the difference list D-Old, where the latter was assigned to X by Assn0.

(7)

push(New-D, X, Assn0, Assn) :-
  val(Assn0, X, D-Old),
  update(1, map(X, New-Old), Assn0, Assn).

For example:

(8)

[eclipse 4]: push([x(bar,2)|D]-D, foo, [map(foo, [x(bar,1)|L]-L)], P).


D = [x(bar, 1)|L]
L = L
P = [map(foo, [x(bar, 2), x(bar, 1)|L] - L)]
Yes (0.00s cpu)

3.2.2   pop/3

Defined in (9), pop/3 succeeds when Assn is the same as Assn0 except with the first element of the difference list assigned to X removed.

(9)

pop(X, Assn0, Assn) :-
  contentful_val(Assn0, X, [_|D]-D0),
  update(1, map(X, D-D0), Assn0, Assn).

For example:

(10)

[eclipse 5]: pop(foo, [map(foo, [x(bar,2),x(bar,1)|L]-L)], P).


L = L
P = [map(foo, [x(bar, 1)|L] - L)]
Yes (0.00s cpu)

3.2.3   shift/4

Defined in (11), shift/4 succeeds when Assn is the same as Assn0 except with the first difference list element assigned to X removed and made the first element of the difference list assigned to Y.

(11)

shift(X, Y, Assn0, Assn) :-
  contentful_val(Assn0, X, [DRef|DX]-DX0),
  update(1, map(X, DX-DX0), Assn0, Assn1),
  val(Assn0, Y, DY-DY0),
  update(1, map(Y, [DRef|DY]-DY0), Assn1, Assn).

For example:

(12)

[eclipse 6]: shift(foo, baz, [map(foo, [x(bar,2),x(bar,1)|L]-L)], P).


L = L
P = [map(baz, [x(bar, 2)|_238] - _238), map(foo, [x(bar, 1)|L] - L)]
Yes (0.00s cpu)

3.2.4   shift_last/4

Defined in (13), shift_last/4 succeeds when Assn is the same as Assn0 except with the last difference list element, DRef (found via last_il/3, see section 1.3.4), assigned to X removed (to leave DX-DX0 as the assigned value) and made the first element of the difference list assigned to Y.

(13)

shift_last(X, Y, Assn0, Assn) :-
  contentful_val(Assn0, X, DX1-DX0),
  last_il(DX1, DX, DRef),
  update(1, map(X, DX-DX0), Assn0, Assn1),
  val(Assn0, Y, DY-DY0),
  update(1, map(Y, [DRef|DY]-DY0), Assn1, Assn).

For example:

(14)

[eclipse 7]: shift_last(foo, baz, [map(foo, [x(bar,2),x(bar,1)|L]-L)], P).


L = L
P = [map(baz, [x(bar, 1)|_240] - _240), map(foo, [x(bar, 2)|L] - L)]
Yes (0.00s cpu)

3.2.5   allocate/6 with expression integrity

The required manipulation for moving through the expressions of a discourse from left to right will be automated by allocate/6. A atom X is a <fresh_atom> when namely(X, _, _) occurs within an <sct_expr>. A <fresh_atom> serves as a source of <discourse_referent>s that have not been previously accessed. Taking discourse to be a collection of ordered <sct_expr>s (Es), and supposing X is a <fresh_atom> in Es, then, at the moment of interpreting the entire discourse Es, the assignment state will be assigning a difference list to X that contains all <discourse_referent>s required for all the separate expressions of Es. We can think of such an assigned difference list as being formed so that <discourse_referent>s needing to appear for the first expression of Es (that is, the start of the discourse) will appear last in the assigned difference list. Working through the remaining expressions of Es then amounts to opening up more of the difference list content assigned to X in end-to-front direction, until all <discourse_referent>s are revealed with the last expression of Es, so that, with completion of the discourse, all <discourse_referent>s assigned X will have been accessed. One more thing that allocate/6 does is move the <discourse_referent>s that were accessed by prior expressions to a different <grammar_atom> serving as a <context_atom>. The different uses of <grammar_atom>s are set out in section 2.3. Bearing these matters in mind will help in understanding how allocate/6 is defined.

     First, consider split(N, List, Past, Future) of (15). This succeeds when Past is the first N-1 elements of List and Future is the elements of List from N+1 to the last element.

(15)

split(1, [_|T], [], T) :- !.
split(N, [H|T], [H|Past], Future) :-
  M is N - 1,
  split(M, T, Past, Future).

For example:

(16)

[eclipse 8]: split(3, [a, b, c, d, e], Past, Future).


Past = [a, b]
Future = [d, e]
Yes (0.00s cpu)

     Now consider allocate(N, Xs, Ys, Es, Assn0, Assn), as defined in (17). With Xs and Ys empty, Assn and Assn0 are the same assignment. Otherwise there is recursion to work through the list content of Xs and Ys. Each cycle of recursion succeeds when, relative to integer N and list Es of <sct_expr>s, assignment Assn differs from Assn0 in regards to the content assigned to the head X of Xs and the head Y of Ys. More specifically, N is used to split Es into a list of future expressions (Future) and past expressions (Past), from which lists of <discourse_referent>s for X are extracted (via discourse_refs/3) for the future (Future_DRefs) and past (Past_DRefs) relative to N. The Future_DRefs are then removed (via pop/3) from the assignment to X, while the Past_DRefs are relocated (via shift_last/4) to Y.

(17)

allocate(_, [], [], _, Assn, Assn).
allocate(N, [X|FNs], [Y|CNs], Es, Assn0, Assn) :-
  split(N, Es, Past, Future),
  (                             % the future
    foreach(E, Future),
    fromto([], In, Out, Future_DRefs),
    param(X)
  do
    discourse_refs(X, E, Out-In)
  ),
  (                             % the past
    foreach(E, Past),
    fromto([], In, Out, Past_DRefs),
    param(X)
  do
    discourse_refs(X, E, Out-In)
  ),
  (                             % remove the future
    foreach(_, Future_DRefs),
    fromto(Assn0, In, Out, Assn1),
    param(X)
  do
    pop(X, In, Out)
  ),
  (                             % contextualise the past
    foreach(_, Past_DRefs),
    fromto(Assn1, In, Out, Assn2),
    param(X, Y)
  do
    shift_last(X, Y, In, Out)
  ),
  allocate(N, FNs, CNs, Es, Assn2, Assn).

     To see consequences of allocate/6, consider (18)--(20).

(18)

[eclipse 9]: allocate(1, [foo], [baz], [t(baz), namely(x(bar,2), foo, t(foo)), t(baz)], [map(baz, [x(bar,1)|L1]-L1), map(foo, [x(bar,2)|L2]-L2)], P).


L1 = L1
L2 = L2
P = [map(baz, [x(bar, 1)|L1] - L1), map(foo, L2 - L2)]
Yes (0.00s cpu)

(19)

[eclipse 10]: allocate(2, [foo], [baz], [t(baz), namely(x(bar,2), foo, t(foo)), t(baz)], [map(baz, [x(bar,1)|L1]-L1), map(foo, [x(bar,2)|L2]-L2)], P).


L1 = L1
L2 = L2
P = [map(baz, [x(bar, 1)|L1] - L1), map(foo, [x(bar, 2)|L2] - L2)]
Yes (0.00s cpu)

(20)

[eclipse 11]: allocate(3, [foo], [baz], [t(baz), namely(x(bar,2), foo, t(foo)), t(baz)], [map(baz, [x(bar,1)|L1]-L1), map(foo, [x(bar,2)|L2]-L2)], P).


L1 = L1
L2 = L2
P = [map(baz, [x(bar, 2), x(bar, 1)|L1] - L1), map(foo, L2 - L2)]
Yes (0.00s cpu)

This reveals how what is assigned as difference list content can be discarded altogther, as is the case for x(bar,2) when N is 1 in (18). And if assigned content remains, then it is either: (i) present to support occurrences of namely/3, as is the case with x(bar,2) remaining assigned to foo when N is 2 in (19), or (ii) serving as content that will have been relocated as seen when N is 3 in (20) with x(bar,2) assigned as part of a difference list for baz while the difference list for foo is empty.

     When allocate/6 is called it ensures the appropriate assignment of <discourse_referent>s to <grammar_atom>s in an expression. The calculation is global over the discourse in question, amounting to a check on the operation of the calculation and on the well-formedness of the discourse data, simultaneously.

3.2.6   dispose/5

Defined in (21) with iterations of shift_last/4, dispose(N, Xs, Y, Assn0, Assn) returns Assn as output which is the same as the input assignment Assn0, with the exception that the <discourse_referent>s contained in the difference lists assigned by Assn0 to the <grammar_atom>s of Xs will have become <discourse_referent>s of the difference list assigned to the Y <grammar_atom> when the source difference lists have a length longer than N. The contribution of length_il/2 is discussed in section 1.3.4.

(21)

dispose(_, [], _, Assn, Assn).
dispose(N, [X|T], Y, Assn0, Assn) :-
  val(Assn0, X, D-_),
  length_il(D, M),
  (
    for(_, 1, M - N),
    fromto(Assn0, In, Out, Assn1),
    param(X, Y)
  do
    shift_last(X, Y, In, Out)
  ),
  dispose(N, T, Y, Assn1, Assn).

For example:

(22)

[eclipse 12]: dispose(0, [foo], baz, [map(foo, [x(bar,2),x(bar,1)|L]-L)], P).


L = L
P = [map(baz, [x(bar, 2), x(bar, 1)|_256] - _256), map(foo, L - L)]
Yes (0.00s cpu)

With N = 0, all <discourse_referent>s of the difference list assigned to foo are relocated to baz.

     Like allocate/6, dispose/5 will be utilised to move <discourse_referent>s from one <grammar_atom> to a different <grammar_atom> serving as a discourse context. A key difference is that while with allocate/6 such moves will occur as we proceed through discourse (that is, through ‘coordinate structure’ / linked units (e.g., clauses) of equal status), with dispose/5 the moves are to be triggered as we enter ‘subordinate structure’ (e.g., clauses which are grammatically subordinate because they are part of another clause).

3.3   From <sct_expr>s to <target_expr>s

This section brings together everything seen thus far with calculate/3 which transforms <sct_expr>s into expressions of a target discourse representation language. Defined in (23), calculate(Assn, E, Target) has Assn for an assignment function, E to take the input <sct_expr>, while Target is the output target expression. Assn assigns difference lists of <discourse_referent>s to the <grammar_atom>s contained in E.

     calculate/3 contains calls to the assignment actions of section 3.2: push/4 (7), pop/3 (11), allocate/6 (17), and dispose/5 (21). When encountering occurrences of head/3, calculate/3 calls the operation of discourse_refs/3 (1). This gathers the <discourse_referent>s made available by namely/3 for inclusion into the assignment. Thereafter the assigned content is distributed to parts of the input <sct_expr> with recursive calls of calculate/3. Such recursive calls of calculate/3 may be invoked by a match of rel/4 that through applications of allocate/6 can reposition or remove assigned content based on collections from namely/3. Note how discourse_refs/3 performs two functions: Firstly, with head/3, it collects the <discourse_referent>s of namely/3 instances for inclusion into the assignment, and secondly, with rel/4, it is used in calls of allocate/6 to ensure that already collected <discourse_referent>s that are parts of assigned difference lists are correctly accessible from the inherited assignment state.

(23)

calculate(Assn0, head(Oper, Vs, E), head(Oper, Vs, Bds, Target)) :-
  (
    foreach(X, Vs),
    fromto(Assn0, AssnIn, AssnOut, Assn),     % make assignment changes
    fromto([], BdsIn, BdsOut, Bds),           % collect binding information
    param(E)
  do
    discourse_refs(X, E, D-D0),
    push(D-D0, X, AssnIn, AssnOut),
    binding_filter(D, BdsIn, BdsOut)
  ),
  calculate(Assn, E, Target).
calculate(Assn, body(Vs, E), body(Vs, Target)) :-
  calculate(Assn, E, Target).
calculate(Assn0, headClimb(DRef, X, E), headClimb(DRef, X, Target)) :-
  push([DRef|R]-R, X, Assn0, Assn),
  calculate(Assn, E, Target).
calculate(Assn, bodyClimb(X, E), bodyClimb(X, Target)) :-
  calculate(Assn, E, Target).
calculate(Assn, namely(_, _, E), Target) :-
  calculate(Assn, E, Target).
calculate(Assn, wipe(_, E), Target) :-
  calculate(Assn, E, Target).
calculate(Assn, t(X), DRef) :-
  memberchk(map(X, [DRef|_]-_), Assn).
calculate(Assn, at(E, S), at(Target, S)) :-
  calculate(Assn, E, Target).
calculate(Assn0, rel(Xs, Ys, S, Es), rel(S, Ts)) :-
  (
    foreach(E, Es),
    foreach(Target, Ts),
    count(I, 1, _),
    param(Assn0, Xs, Ys, Es)
  do
    allocate(I, Xs, Ys, Es, Assn0, Assn),
    calculate(Assn, E, Target)
  ).
calculate(Assn, ifThere(X, E1, E2), Target) :-
  ( contentful_val(Assn, X, _) ->
    calculate(Assn, E1, Target)
  ;
    calculate(Assn, E2, Target)
  ).
calculate(Assn0, mov(X, Y, E), Target) :-
  shift(X, Y, Assn0, Assn),
  calculate(Assn, E, Target).
calculate(Assn0, clean(N, Xs, Y, E), Target) :-
  dispose(N, Xs, Y, Assn0, Assn),
  calculate(Assn, E, Target).
calculate(Assn, pick(S, E, Sources, Sorts), rel(S, [DRef|Resolved])) :-
  calculate(Assn, E, DRef),
  (
    foreach(X, Sources),
    fromto([], In, Out, Context),
    param(Assn)
  do
    val(Assn, X, D-_),
    append_il(D, In, Out)
  ),
  antecedents(Sorts, Context, Resolved-[]).

     The following details the consequences of all the functors with regards to direct changes made to the assignment, as well as the contribution made for the overall target expression returned:

(24)

binding_filter(L, Z0, Z) :- var(L), !, Z = Z0.            % reached end, stop
binding_filter([X|L], Z0, Z) :-
  ( X = x(_, _) ->
    Z1 = [X|Z0]
  ;
    Z1 = Z0
  ),
  binding_filter(L, Z1, Z).

     Pronouns can offer information to limit possible antecedents. For example, they should take a group <discourse_referent> as antecedent, while him should link to a male person <discourse_referent>. Defined in (25) antecedents(Sorts, Context, Rs) picks out with the difference list Rs the discourse referents from list Context that have sort information present in the list Sorts.

(25)

antecedents(_, [], R-R).
antecedents(Sorts, [x(S, I)|Context], [x(S, I)|R]-R0) :-
  memberchk(S, Sorts), !,
  antecedents(Sorts, Context, R-R0).
antecedents(Sorts, [c(S, C)|Context], [x(S, C)|R]-R0) :-
  memberchk(S, Sorts), !,
  antecedents(Sorts, Context, R-R0).
antecedents(Sorts, [_|Context], R-R0) :-
  antecedents(Sorts, Context, R-R0).

3.4   The target discourse representation language

The target language reached by the calculation of section 3.3 includes <discourse_referent>s as terminal elements. For complex expressions, there are structures to distinguish relations (rel/2), markers of argument roles (at/2), and quantification (quant/3). The inclusion of <extended_target_expr>s gives structures to manipulate where discourse referents and their conditions are interpreted (head/4, body/2, headClimb/3, and bodyClimb/2).

     A target language expression is a <target_expr>, where:

(26)

<target_expr> ::=
         <discourse_referent>
      |  rel(<relation_atom>, <target_expr_list>)
      |  at(<target_expr>, <role_atom>)
      |  quant(<quantifier>, <bound_list>, <target_expr>)
      |  <extended_target_expr>

<target_expr_list> ::=
         []
      |  .(<target_expr>, <target_expr_list>)

<bound_list> ::=
         []
      |  .(x(<sort_atom>, <integer>), <bound_list>)

<extended_target_expr> ::=
         head(<quantifier>, <fresh_list>, <bound_list>, <target_expr>)
      |  body(<fresh_list>, <target_expr>)
      |  headClimb(<discourse_referent>, <fresh_atom>, <target_expr>)
      |  bodyClimb(<fresh_atom>, <target_expr>)

<fresh_list> ::=
         []
      |  .(<fresh_atom>, <fresh_list>)

     <discourse_referent>s are introduced in (1) of section 2.2. <bound_list>s are lists of discourse referents that are constructed with x/2 (that is, those discourse referents that are variables).

     Relations (rel/2) comprise predications, adverbial modifications, as well as higher order connectives, such as negation and conjunction. The atom parameter of rel/2 identifies the predicate, modifier, connective, etc. in question, while the second parameter is either a list of the arguments built on at/2 structures (of a predicate or modifier), or a list of <target_expr>s (of a connective).

     Argument role markers (at/2) have a <target_expr> parameter (typically built on <discourse_referent>s) and an atom parameter which specifies the argument role relative to the containing relation.

     Functor quant/3 creates quantificational closure, with parameters for a quantificational operation ('exists', 'EVERYONE', etc.), a list of x/2 <discourse_referent>s bound by the operation, and the <target_expr> scoped over.

     The remaining functors carry information about the placement of expression material: head/4 has an atom parameter to specify quantification ('exists', 'EVERYONE', etc.), an atom list parameter to specify indexing with the potential for collecting <discourse_referent>s appearing inside coindexed headClimb/3, a list parameter for <discourse_referent>s that the quantification serves to bind, and a parameter for a <target_expr>, which is typically filled by a body/2 expression. In other words, head/4 brings about a quantificational closure that is indexed to collect x/2 <discourse_referent>s. Like head/4, the functor body/2 has an atom parameter to specify the kind of quantification to which the body/2 is linked ('exists', 'EVERYONE', etc.), and an atom list parameter to specify indexing with the potential for collecting conditions appearing inside coindexed bodyClimb/2, as well as a parameter for a <target_expr>, which is typically filled by a rel/2 expression that is a collection point for coindexed headClimb/3 content. Finally, indexed headClimb/3 and bodyClimb/2 mark x/2 <discourse_referent>s and conditions, respectively, that await integration into the containing expression at higher coindexed instances of head/4 and body/2. In this regard, head/4 acts like the top box of a Discourse Representation Structure (DRS), while body/2 acts as the bottom box.

3.4.1   An example

For a demonstration, consider (27).

(27)

(IP-MAT (PP (P-ROLE ARG0)
            (NP (SORT PERSON)
                (NPR Nicholas)))
        (VB enters))

With conversion to a <normalised_term>, (27) becomes (28). This includes a top level fresh/2 structure to state sources for fresh bindings (see section 2.3), with the presence of '@e' arising because of the contained npr/3, and '.event' triggered by the contained verb/4 that has '.event' as the value for its <fresh_atom> parameter.

(28)

fresh( .( '@e',
          .( '.event',[]))
       ,
       local( .( 'ARG0',[])
              ,
              npr( c( 'PERSON','Nicholas')
                   ,'ARG0',
                   verb( '.event',
                         x( 'EVENT',1)
                         ,'enters',
                         .( 'ARG0',[])))))

With transformation to an <sct_expr>, (28) becomes (29).

(29)

head( 'exists',
      .( '@e',
         .( '.event',[]))
      ,
      body( .( '@e',
               .( '.event',[]))
            ,
            namely( c( 'PERSON','Nicholas')
                    ,'@e',
                    mov( '@e','ARG0',
                         namely( x( 'EVENT',1)
                                 ,'.event',
                                 rel( [],[],'enters',
                                      .( at( t( '.event')
                                             ,'EVENT')
                                         ,
                                         .( at( t( 'ARG0')
                                                ,'ARG0')
                                            ,[]))))))))

With calculation of a <target_expr>, (29) becomes (30).

(30)

head( 'exists',
      .( '@e',
         .( '.event',[]))
      ,
      .( x( 'EVENT',1)
         ,[])
      ,
      body( .( '@e',
               .( '.event',[]))
            ,
            rel( 'enters',
                 .( at( x( 'EVENT',1)
                        ,'EVENT')
                    ,
                    .( at( c( 'PERSON','Nicholas')
                           ,'ARG0')
                       ,[])))))

Presented in the box notation of Kamp and Reyle (1993), the output of (30) is (31):

(31)

The output of (30) revised as a predicate logic formula is (32):

(32)

exists EVENT[1].enters(EVENT[1],PERSON[Nicholas])

3.4.2   Another example

As a further demonstration, consider (33), already seen as (4) in section 2.2.1.

(33)

(IP-MAT (ACT past)
        (PP (ROLE ARG0)
            (NP (ACT INDEF)
                (SORT PERSON)
                (Q Everyone)))
        (VB ate)
        (PP (ROLE LOC_at)
            (NP (ACT DEF)
                (SORT LOCATION)
                (N cafe))))

With conversion to a <normalised_term>, (33) becomes (34), already seen as (13) in section 2.2.1.

(34)

fresh( .( '.e',
          .( '@e',
             .( '.event',[])))
       ,
       local( .( 'ARG0',
                 .( 'LOC_at',[]))
              ,
              quant( 'EVERYONE','.e',
                     x( 'PERSON',1)
                     ,
                     local( .( 'h',[])
                            ,
                            pred( '',[]))
                     ,'ARG0',
                     some( '@e',
                           x( 'LOCATION',2)
                           ,
                           local( .( 'h',[])
                                  ,
                                  pred( 'cafe',[]))
                           ,'LOC_at',
                           past( '.event',
                                 verb( '.event',
                                       x( 'EVENT',3)
                                       ,'ate',
                                       .( 'LOC_at',
                                          .( 'ARG0',[]))))))))

With transformation to an <sct_expr>, (34) becomes (35).

(35)

head( 'exists',
      .( '@e',
         .( '.event',[]))
      ,
      body( .( '@e',
           .( '.event',[]))
        ,
        head( 'EVERYONE',
          .( '.event',
             .( '.e',[]))
          ,
          body( .( '.event',
              .( '.e',[]))
           ,
           namely( x( 'PERSON',1)
              ,'.e',
              mov( '.e','ARG0',
                   rel( .( '@e',
                           .( '.event',[]))
                        ,
                        .( '*',
                           .( '*',[]))
                        ,'',
                        .( bodyClimb( '.e',
                                 mov( 'ARG0','h',
                                      clean( 0,
                                        .( 'ARG0',
                                           .( 'LOC_at',[]))
                                        ,'*',
                                        clean( 1,
                                               .( 'h',[])
                                               ,'*',
                                               rel( [],[],'',
                                                    .( at( t( 'h')
                                                           ,'h')
                                                       ,[]))))))
                           ,
                           .( head( 'exists',
                               .( '.event',[])
                               ,
                               body( .( '.event',[])
                                ,
                                namely( x( 'LOCATION',2)
                                   ,'@e',
                                   mov( '@e','LOC_at',
                                        rel( .( '@e',
                                                .( '.event',[]))
                                             ,
                                             .( '*',
                                                .( '*',[]))
                                             ,'',
                                             .( bodyClimb( '@e',
                                                 mov( 'LOC_at','h',
                                                      clean( 0,
                                                        .( 'ARG0',
                                                           .( 'LOC_at',[]))
                                                        ,'*',
                                                        clean( 1,
                                                          .( 'h',[])
                                                          ,'*',
                                                          rel( [],[],'cafe',
                                                               .( at( t( 'h')
                                                                      ,'h')
                                                                  ,[]))))))
                                                ,
                                                .( rel( [],[],'',
                                                   .( namely( x( 'EVENT',3)
                                                         ,'.event',
                                                         rel( [],[],'ate',
                                                          .( at( t( '.event')
                                                                 ,'EVENT')
                                                             ,
                                                             .( at( t( 'LOC_at')
                                                                    ,'LOC_at')
                                                                ,
                                                                .( at( t( 'ARG0')
                                                                       ,'ARG0')
                                                                   ,[])))))
                                                      ,
                                                      .( bodyClimb( '.event',
                                                          rel( [],[],'past',
                                                               .( at( t( '.event')
                                                                      ,'h')
                                                                  ,[])))
                                                         ,[])))
                                                   ,[])))))))
                    ,[])))))))))

With calculation of a <target_expr>, (35) becomes (36).

(36)

head( 'exists',
      .( '@e',
         .( '.event',[]))
      ,
      .( x( 'LOCATION',2)
         ,[])
      ,
      body( .( '@e',
               .( '.event',[]))
            ,
            head( 'EVERYONE',
                  .( '.event',
                     .( '.e',[]))
                  ,
                  .( x( 'PERSON',1)
                     ,[])
                  ,
                  body( .( '.event',
                       .( '.e',[]))
                    ,
                    rel( '',
                     .( bodyClimb( '.e',
                          rel( '',
                               .( at( x( 'PERSON',1)
                                      ,'h')
                                  ,[])))
                        ,
                        .( head( 'exists',
                             .( '.event',[])
                             ,
                             .( x( 'EVENT',3)
                                ,[])
                             ,
                             body( .( '.event',[])
                               ,
                               rel( '',
                                    .( bodyClimb( '@e',
                                         rel( 'cafe',
                                              .( at( x( 'LOCATION',2)
                                                     ,'h')
                                                 ,[])))
                                       ,
                                       .( rel( '',
                                               .( rel( 'ate',
                                                   .( at( x( 'EVENT',3)
                                                          ,'EVENT')
                                                      ,
                                                      .( at( x( 'LOCATION',2)
                                                             ,'LOC_at')
                                                         ,
                                                         .( at( x( 'PERSON',1)
                                                                ,'ARG0')
                                                            ,[]))))
                                                  ,
                                                  .( bodyClimb( '.event',
                                                       rel( 'past',
                                                            .( at( x( 'EVENT',3)
                                                                   ,'h')
                                                               ,[])))
                                                     ,[])))
                                          ,[])))))
                           ,[])))))))

     When the contents of headClimb/3 and bodyClimb/2 are integrated with the next commanding head/4 and body/2 occurrences that share a corresponding index, their content makes the appropriate contribution to the levels of quantificational closure that the head/4 and body/2 occurrences realise, either by enlarging the range of <discourse_referent>s quantified (as in the case of relocated headClimb/3 content), or having correct placement for restriction material (as in the case of relocated bodyClimb/2 content). With headClimb/3 and bodyClimb/2 eliminated after the relocation of their content, the resulting expression is the equivalent of a DRS encoding, with head/4 to capture quantification, and body/2 to capture conditions. Presented in the box (duplex) notation of Kamp and Reyle (1993), the output of (36) so revised would be (37):

(37)

 ________________________________________________________________
| LOCATION[2]                                                    |
|________________________________________________________________|
|                                                                |
| cafe(LOCATION[2]                                               |
|                                                                |
|  _____________             _________________________________   |
| | PERSON[1]   |   _____   | EVENT[3]                        |  |
| |_____________|  /     \  |_________________________________|  |
| |             | /       \ |                                 |  |
| |             |/EVERYONE \| past(EVENT[3])                  |  |
| |             |\PERSON[1]/| ate(EVENT[3],PERSON[1])         |  |
| |             | \       / | loc_at(EVENT[3]) = LOCATION[2]  |  |
| |             |  \_____/  |                                 |  |
| |_____________|           |_________________________________|  |
|________________________________________________________________|

The output of (36) revised as a predicate logic formula is (38):

(38)

exists LOCATION[2].(cafe(LOCATION[2])
  and EVERYONE PERSON[1].exists EVENT[3].(past(EVENT[3])
        and ate(EVENT[3],PERSON[1]) & loc_at(EVENT[3]) = LOCATION[2]))

Note how in the <target_expr> (36), there is a condition rel( 'cafe', .( at( x( 'LOCATION',2) ,'h'),[])) inside a bodyClimb/2 indexed with '@e'. This same '@e' index occurs with the highest head/4 which brings about the discourse level closure, but does not appear with any other intervening head/4. As a consequence, given elimination of the placement instructions of headClimb/3 and bodyClimb/2, the restrictive content cafe(LOCATION[2]) is situated outside the scope of EVERYONE, as seen in the resulting DRS/predicate logic formula. In this way, the target language manages the quantification and restriction of <discourse_referent>s while taking into account the specific contexts into which they are introduced.








References

Apt, Krzysztof and Mark Wallace. 2006. Constraint Logic Programming using ECLiPSe. Cambridge: Cambridge University Press.

Bos, Johan. 2005. Towards wide-coverage semantic interpretation. In Proceedings of Sixth International Workshop on Computational Semantics (IWCS-6), pages 42–53.

Butler, Alastair. 2007. Scope control and grammatical dependencies. Journal of Logic, Language and Information 16:241–264.

Butler, Alastair. 2010. The Semantics of Grammatical Dependencies, vol. 23 of Current Research in the Semantics/Pragmatics Interface. Bingley: Emerald.

Butler, Alastair. 2015. Linguistic Expressions and Semantic Processing: A Practical Approach. Heidelberg: Springer-Verlag.

Cresswell, M. J. 2002. Static semantics for dynamic discourse. Linguistics and Philosophy 25:545–571.

Dekker, Paul. 2002. Meaning and use of indefinite expressions. Journal of Logic, Language and Information 11:141–194.

Dekker, Paul. 2012. Dynamic Semantics, vol. 91 of Studies in Linguistics and Philosophy. Dordrecht: Springer Verlag.

Eijck, Jan van. 2001. Incremental dynamics. Journal of Logic, Language and Information 10:319–351.

Groenendijk, Jeroen and Martin Stokhof. 1991. Dynamic Predicate Logic. Linguistics and Philosophy 14(1):39–100.

Heim, Irene. 1982. The Semantics of Definite and Indefinite Noun Phrases. Ph.D. thesis, University of Massachusetts, Amherst.

Kamp, Hans and Uwe Reyle. 1993. From Discourse to Logic: Introduction to Model-theoretic Semantics of Natural Language, Formal Logic and Discourse Representation Theory. Dordrecht: Kluwer.

Muskens, Reinhard. 1996. Combining montague semantics and discourse representation. Linguistics and Philosophy 19:143–186.

Schimpf, Joachim. 2014. Logical loops. In P. J. Stuckey, ed., Proceedings of the 2002 International Conference on Logic Programming, Vol. 2401 of Lecture Notes in Computer Science, pages 224–238. Springer-Verlag.

Vermeulen, C. F. M. 1993. Sequence Semantics for Dynamic Predicate Logic. Journal of Logic, Language and Information 2:217–254.

Yana, Yukiko, Koji Mineshima, and Daisuke Bekki. 2019. Variable handling and compositionality: Comparing DRT and DTS. Journal of Logic, Language and Information 28:261–285.

Zeevat, Henk. 1989. A compositional approach to Discourse Representation Theory. Linguistics and Philosophy 12:95–131.





Last updated: September 14, 2019