Restricted Computations and Parameters in Type-Theory of Acyclic Recursion

Roussanka Loukanova

Institute of Mathematics and Informatics, Bulgarian Academy of Sciences, Sofia, Bulgaria
rloukanova@gmail.com

ABSTRACT

The paper extends the formal language and the reduction calculus of Moschovakis type-theory of recursion, by adding a restrictor operator on terms with predicative restrictions. Terms with restrictions over memory variables formalise inductive algorithms with generalised, restricted parameters. The extended type-theory of restricted recursion (TTRR) provides computations for algorithmic semantics of mathematical expressions and definite descriptors, in formal and natural languages.

The reduction calculi of TTRR provides a mathematical foundation of the work of compilers for reducing recursive programs to iterative ones. The type-theory of acyclic recursion (TTAR) has a special importance to syntax-semantics interfaces in computational grammars.

KEYWORD

Algorithms; Types; Parameters; Restrictor Operator; Reduction Calculi; Iterative Computations; Compiler Iterations

1. Introduction

This paper is part of the author’s work on development of a new type-theory of the mathematical notion of algorithms, its concepts, and potentials for applications to advanced, computational technologies, especially in Artificial Intelligence (AI). For the initiation of this new theory, see the original work on the formal languages of recursion (FLR) (Moschovakis, 1989; Moschovakis, 1993; Moschovakis, 1997). The formal languages of recursion FLR are untyped systems. The typed version of this new approach to algorithmic, acyclic computations was introduced, for the first time in (Moschovakis, 2006), by designating it with Larλ, and demonstrating it by its applications to computational semantics of natural language. For more recent developments of the language and theory of acyclic algorithms Larλ, see, e.g., (Loukanova, 2019b; Loukanova, 2019c; Loukanova, 2020b).

The class Lrλ, of the typed formal languages and theories of full recursion, is an extension of (Gallin, 1975) logic TY2, and thus, of Montague Intensional Logic (IL), (Thomason, 1974). In this paper, we extend the formal language and reduction calculus of Larλ and Lrλ, by incorporating restrictions on terms designating objects and algorithmic computations, which are required to satisfy the corresponding restrictions.

Two standard, distinctive approaches for representing definite descriptions by logic expressions were introduced by (Russell, 1905) and (Strawson, 1950). These two different interpretations were reconsolidated by using Situation Theory to represent each of them, see (Loukanova, 2001), by using situated, restricted parameters.

At first, we extend the type-theory of acyclic recursion Larλ, by adding a restrictor operator and corresponding restricted Larλ-terms, their denotational semantics, and reduction rules.

We demonstrate the application of the extended Larλ, by representing the denotational and algorithmic semantics of various kinds of definite descriptors, by rendering them into restricted Larλ-terms.

The definite descriptors may have interpretations that can be:

(1)Uniqueness conditions over objects, similar to (Ludlow, 2021), while expressed in type-theory Larλ

(2)Restricted references to objects, the restricted values of which are computed in context

(3)In either case, the type-theory Larλ allows the values of the definite descriptors to be erroneous, by flagging them with designated values for errors

The introduction of restricted memory (i.e., recursion) variables and restricted Larλ-terms, introduced in this paper, is a new, algorithmic approach, which pertains to syntax-semantics of programming languages and other specification languages widely used in Computer Science and Artificial Intelligence (AI).

The reduction calculi of Larλ reduces every Larλ-term to its canonical form, which provides a mathematical foundation of the work of compilers for reducing recursive programs to iterative ones. The type-theory Larλ has a special importance to computational syntax-semantics of human language, i.e., natural language

Restricted variables designate memory slots for storing information constrained to satisfy propositional restrictions. The definite descriptor provides restrictions for imposing properties over data and in algorithms with restricted parameters. The algorithmic restrictor is specifically important for computational semantics of formal languages, e.g., in programming, specification languages in data and Artificial Intelligence (AI), and computational syntax-semantics of natural language. In particular, we present alternative possibilities for algorithmic semantics of singular, nominal expressions. For example, a Noun Phrase (NP), which is a definite description, such as “the cube”, can designate an object in a semantic domain, via identifying it as the unique object satisfying the property denoted by the description “cube”. Definite descriptors are abundant in the languages of mathematics, as specialised, subject delimited fragments of human language, which can be intermixed with mathematical expressions, e.g., “the natural number n, such that n + 1 = 2”.

This paper is part of the author’s work on the development of type-theory of algorithms by targeting versatile applications, especially in advanced technology with Natural Language Processing (NLP) in AI. For instance, a sequence of papers (Loukanova, 2011a; Loukanova, 2011b; Loukanova, 2011c; Loukanova, 2012b; Loukanova, 2012a; Loukanova, 2013c; Loukanova, 2013b; Loukanova, 2013a) use Larλ to represent fundamental semantic notions in human language. The research presented in (Loukanova, 2016) is on the applications of Larλ in the important topic of quantifier scope ambiguities, while (Loukanova, 2020b) is on formalisation of binding arguments of recursive properties, represented by functions, across mutual recursion assignments in recursion terms and modeling neural receptors.

Figure 1 depicts two approaches for algorithmic semantics of natural language (NL) used in the author’s work. By (1a), the computational grammar of NL delivers syntactic analyses of NL expressions. Afterwards, the syntactic analyses are used to render them into terms of Larλ, including the extended Lrarλ introduced in this paper, to represent their algorithmic semantics. This approach is useful when algorithmic semantics of NL is the focus without providing syntactic analyses (in details), e.g., as in this paper. By (1b), the computational grammar of NL provides syntax-semantics analyses of NL, in a compositional mode (Loukanova, 2019a). Figure 2 gives the general scheme of the internal to Lrarλ syntax-semantics relation between the syntax of the terms of Lrarλ (Larλ, Lrλ) and their algorithmic and denotational semantics.

Computational Syntax of NLComputational GrammarrenderLarλ/Lrarλ                          (1a)

Computational Syntax of NLrenderLarλ/LrarλComputational Grammar: Including Syntax-Semantics Interface                          (1b)

Figure 1: Algorithmic Syntax-Semantics Interface in Computational Grammar of Natural Language

Recent work (Loukanova, 2019b; Loukanova, 2019c) extends the reduction calculus of type-theory of algorithms in useful ways, by targeting practical applications in advanced technologies, in line with the topic of this paper. A fundamental rule and conversion, η-conversion, of classic λ-calculi, was investigated for Larλ (Loukanova, 2020a), by providing a version that grasps recursion assignments in canonical forms of Larλ terms. A broader work (Loukanova, to appear) presents an algorithmic η-rule and η-reduction in Larλ.

To the best of the author’s knowledge, a precise, mathematical representation of the semantic notion of restricted parameters, as per se semantic objects, in type-theoretic, situated models was introduced by (Loukanova, 1991). The mathematical, semantic models introduced in that work are mathematical structures that include situated, dependent types defined hierarchically, by primitive types and recursion on situated propositions. The mathematical structures are based on relations, without coding them by one-argument functions, i.e., without currying encoding. At a semantic level, the restricted, typed objects of Situation Theory, were used to model both Russell and Strawson definite descriptors (Loukanova, 2001). In contrast to that work on Situation Theory, in this paper, we introduce syntactic counterparts of the semantic objects that are restricted parameters — restricted, memory (recursion) variables — as a special case of new, restricted Larλ-terms.

The generalised restrictor operator in Def. 2, (6a)(6e), was introduced with a focus on algorithmic semantics, by extending the type-theory of algorithms Larλ (Loukanova, 2021). The current paper presents this restrictor operator, by the syntax and semantics of type-theory of parametric algorithms, via covering syntax-semantics interrelations in Larλ and Lrλ. In this extended paper, we emphasise the significance of the theoretical features of Larλ, which we have been developing by targeting advanced applications with new intelligent technologies, primarily through distributed computing in AI.

In Sect. 2, we introduce the formal syntax of the type-theory of algorithms with acyclic recursion and restrictor, Larλ and Lrarλ, by pointing to the corresponding versions with full recursion, Lrλ and Lrrλ. This new restrictor operator, for propositional restrictions, is at the object level of the formal language. In Sect. 3, we add the definition of the denotational semantics of Larλ, by including the denotation of the restrictor terms of the extended Lrarλ. Section 4 provides the full definition of the canonical forms of the terms of the extended type-theory Lrarλ. This definition has distinctive significance because the canonical forms of the proper terms determine the algorithmic semantics of the type-theory of parametric algorithms, in their respective versions, Larλ, Lrarλ, Lrλ, and Lrrλ. Section 5 introduces the most significant ingredient of the type-theory of algorithms, the reduction calculus, by covering terms with restrictor operator. The calculus is equipped with a set of reduction rules that define the system of reducing each term to its canonical form. In Sect. 6, we introduce the notion of generalised variables, as restricted memory slots, by using the restrictor operator. Then we investigate their major role in the theory of algorithms, as specialised memory slots for storing information that is computed algorithmically and restricted by conditions, also computed algorithmically. We demonstrate their reduction to basic memory variables which are irreducible terms. In Sect. 7, we present the significant role of algorithmic semantics in the type-theories of acyclic and full recursion, Lrarλ and Lrrλ, with respect to their denotational semantics. The restrictor operator in the formal languages Larλ, Lrarλ, Lrλ, and Lrrλ have algorithmic meanings, which is demonstrated in Sect. 8.

Definite descriptors play an important role in the many formal languages of logic, in many different applications in computer science, in computational grammars of natural languages, in Natural Language Processing (NLP), by corresponding reflections to AI. In Sect. 9, we provide possibilities for the application of restricted algorithms to represent definite descriptors, which are abundant in data of various forms, including in domain specific areas. For clarity, we exemplify them with expressions from human language, i.e., natural language. Sect. 9, covers various options for algorithmic semantics of descriptors by Lrarλ. In Sect. 10, we summarise the significance of the restrictor operator, some of the existing, forthcoming, and future work.

2. Terms for Algorithms with Acyclic Recursion and Restrictor

Definition 1 (Gallin Types). See (Gallin, 1975) logic TY2:

τ:≡e|t|s(τ1τ2)                          (Types)

We shall designate the type of the state dependent objects of type (s → τ) by (2), see Sect. 3. The semantic objects in the domain 𝕋(s→τ) are called Carnap’s Intensions:

τ~(sτ),for τTypes                          (2)

The set of the constants Consts (also, shortly denoted by K) are given by denumerable (finite) sets of typed constants:

Constsτ={c0τ,,ckτ}(k0)for all τTypes, Kτ,Consts=τConstsτ                          (3)

Larλ has Pure Variables, given by denumerable sets of typed pure variables:

PureVτ={v0τ,}for all τTypes, Kτ,PureV=τPureVτ                          (4)

Larλ has Recursion (Memory) Variables given by denumerable sets of typed recursion (memory) variables: RecV=τRecVτ,forRecVτ={r0τ,}. The vocabulary is without intersections: Consts ≠ RecV ≠ PureV, and the set of all variables is Vars = PureV ∪ RecV.

RecVτ={r0τ,}for all τTypes, Kτ,RecV=τRecVτ                          (5)

In this section, we extend the formal language of Larλ by adding a constant for a restrictor operator (such that), for the formation of new terms, with restrictions. The extended formal language of Lrarλ has the same set of types, constants and variables, as Larλ. Sometimes, when it is clear from the context, we shall write Larλ instead of Lrarλ, by assuming that Larλ = Lrarλ. The Terms are defined by adding one more rule (6e), for the restrictor operator (a special operator constant) such that. Then, we extend the definition of the canonical forms and reduction calculus of Larλ.

Here, we present the recursive rules of the definition of the set of Lrarλ -terms by Def. 2, (6a)(6e), using an extended, typed Backus-Naur Form (TBNF) style, with the assumed types given as superscripts.

We use the typical notations for type assignments, A : τ, and Aτ, to express that A is a term of type τ.

Definition 2 (Terms). The set TermsLrarλ of the terms consists of the expressions defined by the following rules:

A:≡cτ:τxτ:τ(for cτConstsτ,xτPureVτRecVτ)                          (6a)

B(στ)(Cσ):τ(application term)                          (6b)

λ(vσ)(Bτ):(στ)(λ-term)                          (6c)

[A0σ0 where {p1σ1:=A1σ1,,pnσn:=Anσn}]:σ0(recursion term)                          (6d)

(A0σ0such that {C1τ1,,Cmτm}):σ0(restrictor / restriction term)                          (6e)

given that:

(1)c ∈ Consts, x ∈ PureV ∪ RecV, vσ ∈ PureVσ

(2)B, C ∈ Terms of the respective types

(3)in (6d), for n ≥ 0, i = 0, …, n, σi ∈ Types, AiTermsσi;

for i = 1, …, n, piRecVσi, are pairwise different recursion variables, of the same types as of the terms, correspondingly assigned to them

(4)the sequence of assignments in (6d) satisfies the AC, (8a)(8c)

(5)in (6e), for j = 1, …, m (m ≥ 0),

(a)Cjτj ∈ Terms, for τj ∈ Types

(b)τj ∈ Types is either τj ≡ t, i.e., the type t of state-independent truth values, or τj  t~  (s  t), i.e., the type t~ of truth values that may depend on states

and the type σ0 of the restrictor (restriction) term Aσ0 in (6e) is:

σ0{σ0, if τit, for all i{1,,n}σ0(sσ), if τit~, for some i{1,,n}, and  for some σ Types, σ0(sσ)σ0~(sσ0), if τit~, for some i{1,,n}, and  there is no σ, s.th. σ0(sσ)                          (7a, 7b, 7c)

The type σ0 of the restrictor (restriction) term Aσ0 in (6e) is that of A0σ0, in the cases (7a)(7b). In the case (7c), the type σ0 of A0, does not depend directly on states because there is no σ, such that σ0 ≡ (s → σ), while at least one of the restrictions Ci is of state-dependent type, τi  t~, for some i ∈ { 1, …, n }. The state-dependence of the entire restriction term A is reflected by lifting the type σ0 of A0 to its state dependent version, in the type σ0 of A : σ0.

For each τ ∈ Types, Termsτ is the set of the terms of type τ.

We call the terms A of the form (6d) recursion terms, and the terms of the form (6e) restriction or restrictor terms (sometimes, also, restricted terms).

Acyclicity Constraint (AC) For any σi ∈ Types, Ai  Termsσi, and pairwise different recursion variables, pi RecVσi, for i = 1, …, n:

{p1:=A1,,pn:=An}(n0)isanacyclicsequenceiffthereisafunctionrank,suchthat:                          (8a)

rank:{p1,,pn}                          (8b)

foralli,j{1,,n},pjFreeV(Ai)rank(pj)<rank(pi)                          (8c)

We call the sequence (8a) acyclic system of assignments.

The formal language of Lrarλ, without the AC, (8a)(8c), provides the version of the type-theory Lrrλ of full recursion and restrictors.

Bound and Free Variables The sets FreeV(A) and BoundV(A), respectively of the free and bound variables of the Lrarλ-terms A, are defined by structural recursion on A, in the usual way, as part of Def. 2, (6a)(6e), for each clause, with the exception of the recursion and restriction terms, i.e.:

(BFV1) For any recursion term A of the form (6d), i.e., A ≡ [A0 where { p1 := A1, …, pn := An }], all the free occurrences of p1, …, pn, in each of the terms A0, …, An, are bound occurrences in A. All other free (bound) occurrences of variables in A0, …, An are also free (bound) in A, and:

BoundV(A)=BoundV(A0 where {p1:=A1,,pn:=An})=∪ i=0n(BoundV(Ai)){p1,,pn}                          (9a)

FreeV(A)=FreeV(A0where {p1:=A1,,pn:=An})=i=0n(FreeV(Ai)){p1,,pn}                          (9b)

(BFV2) For any restriction term A of the form (6e), i.e., A(A0σ0 suchthat{C1τ1,,Cmτm}), all the free (bound) occurrences of variables in A0, C1, …, Cm are also free (bound) in A, and:

BoundV(A)=BoundV(A0)i=1m(BoundV(Ci))                          (10a)

FreeV(A)=FreeV(A0)i=1m(FreeV(Ci))                          (10b)

All occurrences of constants in any Lrarλ-term are free.

Notation 1. Often, abbreviations for sequences are useful, e.g., for i = 1, …, n, j = 1, …, m (n, m ≥ 0), pi  RecVτi, Ai  Termsτi, vj, ui ∈ PureV, H ∈ Terms, of suitable types:

p:=Ap1:=A1,,pn:=An(n0)                          (11a)

H(u)[H(u1)](un)(n0)                          (11b)

λ(v)(H(u))λ(v1)(λ(vm)([H(u1)](un)))λ(v1)(vm)(H(u1)(un))λ(v1,,vm)(H(u1,,un))(n,m0)                          (11c)

3. Denotational Semantics of Larλ and Lrarλ

A standard semantic structure is a tuple 𝔄(Consts) = <T,I> that satisfies the following conditions:

T={Tσ|σTypes} is a frame, i.e., a set of sets of typed objects, such that:

{0,1,er}TtTe(ertereererror)

Ts (the set of the states)

T(τ1τ2)=(Tτ1Tτ2)={f|f:Tτ1Tτ2} (standard frame)

Optionally, Larλ may designate different objects as the erroneous values, which are typed: er(τ1→τ2) = h, is a function, such that, for every cTτ1,h(c)=erτ2, i.e., designated typed erroneous objects as values

I : Consts → ∪ T is the interpretation function, respecting the types: for every cConstsσ,I(c)Tσ there is some cTτ, such that I(c) = c

𝔄 has the set G of all variable valuations G, respecting the types:

G={gg:PureVRecVT,and for everyx:σ,g(x)Tσ}                          (12)

Definition 3 (Denotation Function). There is a unique denotation function den𝔄:

tenA:Terms{ff:GT}                          (13)

defined by structural induction (i.e., by recursion) on the terms, by (D1)–(D5). For any given, fixed semantic structure 𝔄, we write den ≡ den𝔄.

(D1)(a) den(x)(g) = g(x), for all x ∈ PureV ∪ RecV

(b) den(c)(g) = I (c). for all c ∈ Consts

(D2)den(A(B))(g) = den(A)(g)(den(B)(g))

(D3)den(λx(B))(g) (t) = den(B)(g{ x := t }), for every xVarsτ,tTτ

(D4)den(A0 where {p1 := A1, …,pn := An })(g) =

den(A0)(g{p1:=p¯1,,pn:=p¯n})

where the values p¯iTτi are defined by recursion on rank(pi):

pi¯=den(Ai)(g{pk1:=p¯k1,,pkm:=p¯km})                          (14)

given that pk1, …, pkm are all of the recursion variables pj ∈ {p1, …, pn }, such that rank(pj) < rank(pi) Informally, den(A1)(g), …, den(An)(g) are computed recursively and stored in p1, …, pn, respectively; the denotation den(A0)(g) may depend on values stored in p1, …, pn.

(D5)The stipulation of the denotation of the restricted terms A of the form (6e) is in two cases, with respect to possible state dependent types of the components of A:

A(A0σ0such that {C1τ1,,Cmτm})(A0σ0  s.t. {C})                          (15)

Case 1: for all i ∈ { 1, …, n }, Ci : t
For every gG:

den(A0σ0  s.t. {C})(g)={den(A0)(g),if, for all i{1,,n},den(Ci)(g)=1erσ0if, for some i{1,,n},den(Ci)(g)=0 orden(Ci)(g)=er                          (16)

Case 2: for some i ∈ { 1, …, n }, Ci : t~ (state dependent proposition)
For every gG, and every state ssTs:

den(A0σOs.t.{C})(g)(s)={ den(A0)(g)(s),ifden(Ci)(g)=1, for allis.th.Ci:t, andden(Ci)(g)(s)=1, for allis.th.Ci:t˜, andσ0(sσ)den(A0)(g),ifden(Ci)(g)=1, for allis.th.Ci:t, andden(Ci)(g)(s)=1, for allis.th.Ci:t˜, andthere is no σTypes,suchthatσ0(sσ)erσ0,otherwise,forσ0{ σ,suchthatσ0(sσ)σ0,iftherisnoσTypes,suchthatσ0(sσ)                          (17)

Informally, the denotation of a term A of the form (6e) is the denotation of A0, in case all Ci are true, otherwise it is error, i.e., it is error in the following cases:

the denotation of at least one of the terms A0, Ci (i = 1, …, m) is error, or

the denotation of at least one of the terms Ci is false (i = 1, …, m)

Immediate terms do not carry algorithmic sense; their denotations are obtained by the variable valuations. For details on the immediate terms, see (Moschovakis, 2006) and (Loukanova, 2019b). Here, we provide their definition because they play an essential role in the computational notions of Larλ and Lrarλ, and for self-containment of the paper.

Definition 4 (Immediate and Proper Terms). The set of the immediate terms is defined recursively, e.g., by the style of typed BNF notation:

ImTτ:≡XτY(τ1(τmτ))(v1τ1)(vmτm)(immediate applicative terms)     (ImAp)                          (18a)

ImT(σ1(σnτ)):≡λ(u1σ1)λ(unσn)[Y(τ1(τmτ))(v1τ1)(vmτm)](immediate λ-terms)     (Imλ)                          (18b)

for n ≥ 1, m ≥ 0; ui, vj ∈ PureV, for i = 1, …, n, j = 1, …, m; X ∈ PureV, Y ∈ RecV

A term A is proper if it is not immediate, i.e., the set PrT of the proper terms of Lrarλ consists of all terms that are not in ImT:

PrT=(TermsImT)                          (19)

4. Canonical Forms

For every term A ∈ Terms, there is a term cf (A), a canonical form of A, defined by structural recursion on the term A, according to Definition 5. We extend the corresponding definition given in (Moschovakis, 2006), by adding a clause for cf (A), for terms A of the form (6e).

Definition 5 (Canonical Forms of Terms). In each of the following clause, we assume that the bound recursion variables are distinct for the distinct terms, and from the free recursion variables, because the bound variables can be renamed, by the congruence relation, see Def. 6.

(CF1)For every c ∈ Constsτ, cf (c) :≡ c ≡ c where { }

For every x ∈ PureV ∪ RecV, cf (x) :≡ xx where { }

(CF2)Assume that A ∈ Terms, and

cf(A)A0 where {p1:=A1,,pn:=An}(n0)                          (20a)

A0 where {p:=A}                          (20b)

(CF2a) If X is an immediate term, then

cf(A(X)):≡A0(X)where {p:=A}                          (21)

(CF2b) If B is a proper term and

cf(B)B0 where {q1:=B1,,qm:=Bm}(m0)                          (22a)

B0 where {q:=B}                          (22b)

then

cf(A(B)):≡A0(q0) where {p:=A,q0:=B0,q:=B}                          (23)

where q0 ∈ RecV is a fresh recursion variable

(CF3) Assume that A ∈ Terms, and

cf(A)A0 where {p:=A}                          (24)

Then, for every u ∈ PureVτ, and fresh p1,,pnRecV:

cf(λ(u)A):≡λ(u)A0 where {p1:=λ(u)A1,,pn:=λ(u)An}                          (25)

where Ai' is the result of the simultaneous replacement of all the free occurrences of p1, …, pn in Ai with p1'(u),,pn'(u), respectively

(CF4) Assume that A ∈ Terms is such that

cf(A)A0 where {p:=A}                          (26)

and, for every i = 0, …, n,

cf(Ai)Ai,0 where {pi,1:=Ai,1,,pi,ki:=Ai,ki}                          (27a)

Ai,0 where{pi:=Ai}                          (27b)

Then, for fresh p1, …, pn ∈ RecV:

cf(A):≡A0,0 where {p0:=A0,                          (28a)

p1:=A1,0,p1:=A1,                          (28b)

pn:=An,0,pn:=An}                          (28c)

(CF5) Assume that j = 1, …, m (m ≥ 0), i = 1, …, k (k ≥ 0), and:

(1)A,C1τ1,,Cmτm,R1σ1,,RkσkRσTerms

(2)for j = 1, …, m (m ≥ 0), Cjτj, and for i = 1, …, k (k ≥ 0), Rσ have types of truth values, i.e., τj ≡ t or τjt~; and σi ≡ t or σit~

(3)Cj are proper

(4)Rσ are immediate

(5)cj ∈ RecVτj are fresh with respect to A, Cτ, Rσ

(6)the canonical forms of A,C1τ1,,CmτmTerms are as in (29a)(29b) (without writing the type superscripts, which are not per se part of the terms):

cf(A)cA0 where {p1:=A1,,pn:=An} (n0)A0 where {p:=A}                          (29a)

cf(Cj)cCj,0where {cj,1:=Cj,1,,cj,kj:=Cj,kj}Cj,0where {cj:=Cj},j=1,,m(m0)                          (29b)

given that

(a)no cj' occurs freely in any cj, for j′j′′, and in any Ai (j′, j′′ = 0, …, m, i = 0, …, n), which is guaranteed by the congruence

(b)no cj occurs freely in any Cl (l = 0, …, m), no cj occurs freely in any Ai (i = 0, …, n), because cj are fresh, and guaranteed by the congruence

(CF5a) If A0 is an immediate term, then:

cf(Asuch that{C1,,Cm,R})                          (30a)

(A0such that {c1,,cm,R})where {p:=A,                          (30b)

c1:=C1,0,c1:=C1,cm:=Cm,0,cm:=Cm}                          (30c)

(CF5b) If A0 is a proper term, then, for fresh p0, cj ∈ RecV, j = 1, …, m:

cf(A such that {C1,,Cm,R})                          (31a)

(po such that{C1,...,C,m R})where {p0:=A0,p:=A                          (31b)

c1:=C1,0,c1:=C1,cm:=Cm,0,cm:=Cm}                          (31c)

5. Reduction Calculus of Larλ and Lrarλ

The formal language Larλ has reduction rules that reduce its terms to their unique, up to congruence, canonical forms. Here, after we provide the original set of reduction rules, given in (Moschovakis, 2006), we extend it by adding two Restriction Reduction Rules, (st1)–(st2), for reducing terms having occurrences of the restrictor operator.

5.1. Congruence Relation

Definition 6 (Congruence). The congruence relation, denoted by ≡c, is the smallest relation between Larλ-terms (A ≡c B), i.e., ≡c ⊆ Terms × Terms, that is closed under:

(1)reflexivity, symmetricity, transitivity

(2)the term formation rules of Larλ

constants, variables

application

λ-abstraction

acyclic recursion

restriction term

(3)renaming bound, pure and recursion, variables without causing variable collisions

(4)re-ordering of the assignments within the acyclic sequences of assignments of the recursion terms

(5)re-ordering of the restriction sub-terms in the restriction terms

5.2. Reduction Rules of Lrarλ

5.2.1 Original Reduction Rules of the Theory of Acyclic Recursion

The set of the Larλ-reduction rules is as follows:

Congruence

If AcB , then AB                          (cong)

Transitivity

If AB and BC, then AC                          (trans)

Compositionality

IfAA and BB, then A(B)A(B)                          (ap-comp)

IfAB, then λ(u)(A)λ(u)(B)                          (λ-comp)

IfAiBi,fori=0,,n,thenA0 where{p1:=A1,,pn :=An}B0 where{p1:=B1,,pn :=Bn}                          (wh-comp)

IfA0B0 and CiRi(i=0,...,n),  then                           (st-comp)

A0 such that {C1...,Cn}

B0 such that {R1...,Rn}

The Head Rule

(A0  where {p:=A}) where {q:=B}A0 where {p:=A,q:=B}                          (head)

given that no pi occurs freely in any Bj, for i = 1, …, n, j = 1, …, m

The Bekič-Scott Rule

A0 where {p:=(B0 where {q :=B}),p:=A}A0 where {p:=B0 q:=B, p:=A}                          (B-S)

given that no qj occurs freely in any Ai, for i = 0, …, n, j = 1, …, m

The Recursion-Application Rule

(A0 where {p:=A})(B)A0(B)  where  {p:=A}                          (recap)

given that no pi occurs freely in B, for i = 1, …, n

The Application Rule

A(B)A(p) where {p:=B}                          (ap)

given that B is proper and p is a fresh (recursion) memory variable

The λ-Rule

λ(u)(A0 where {p1:=A1,,pn:=An})λ(u)A0 where {p1:=λ(u)A1,,pn:=λ(u)An}λ(u)A0{p:≡p(u)} where {p:=λ(u)A{p:≡p(u)}}                          (λ)

where:

(1)u ∈ PureVσ

(2)for all i = 1, …, n, pi ∈ RecVσi,

piRecV(σσi) is a fresh recursion variable

(3)for all i = 0, …, n, Ai ∈ Termsσi,

Ai' is the result of the replacement of the free occurrences of p1, …, pn in Ai with p1'(u),…,pn'(u), respectively, i.e.:

Ai:≡Ai{p1:≡p1(u),,pn:≡pn(u)}                          (33a)

Ai:≡Ai{p:≡p(u)}                          (33b)

5.2.2 Extending the Original Reduction by Rules for Restriction Terms

Restriction / Restrictor Rules of Lrarλ                          (st1) / (st2)

Given that, for j = 1, …, m (m ≥ 0), i = 1, …, k (k ≥ 0):

(1)Each Cjτj ∈ Terms is proper

(2)Each Riσ ∈ Terms in Rσ is immediate

(3)Cjτj and Riσ have types of truth values, i.e., τj ≡ t or τjt~; and σi ≡ t or σit~ there are two reduction rules for the restrictor (restricted) terms:

(st1) A0 is an immediate term, m ≥ 1

(A0 such that {C1,,Cm,R})(A0 such that {c1,,cm,R})where {c1:=C1,,cm:=Cm}                          (st1)

for fresh cj ∈ RecV (j = 1, …, m)

(st2) A0 is a proper term

(A0 such that {C1,,Cm,R})(a0 such that {c1,,cm,R})where {a0:=A0,c1:=C1,,cm:=Cm}                          (st2)

for fresh A0, cj ∈ RecV (j = 1, …, m)

Informally, the restriction parts in (st1) / (st2) are proposition terms.

Definition 7 (Irreducible Terms). We say that a term A ∈ Terms is irreducible in Lrarλ iff

for allBTerms,AB=AcB                          (36)

Theorem 1 (Criteria for Irreducibility). With respect to the extended set of reduction rules:

(1)Every A ∈ Consts ∪ Vars is irreducible

(2)A(B) is irreducible iff B is immediate and A is explicit and irreducible

(3)λ(x)(A) is irreducible iff A is explicit and irreducible

(4)[A0 where {p:=A}] is irreducible iff all parts Ai (i = 0, …, n) are explicit and irreducible

(5)(A0 such that {C}) is irreducible iff all parts A0, Ci (i = 0, …, n) are immediate

Proof. By structural induction on terms and checking the reduction rules.

6. Algorithmically Restricted Memory Parameters

Theorem 2 (Basic, Restricted Memory Variables). Assume that, for any n ≥ 1:

Rj are immediate terms (j = 1, …, n), and

pi ∈ RecV (i = 2, …, n) are fresh with respect to p1, Rj

Then:

((((p1 s.t. R1) s.t. R2)) s.t. Rn)                          (37a)

(pn s.t. Rn) where {pn:=(pn1 s.t. Rn1),                          (37b)

,p2:=(p1 s.t. R1)}                          (37c)

Proof. The proof is by induction on n ≥ 1.

Induction Basis: n = 1

(p1s.t.R1)(p1s.t.R1) is trivially true.

Induction Hypothesis: Assume (37a)(37c), for an arbitrary n ≥ 1.

Induction Step: We reduce the term (38a) to the canonical form (38g)(38i), by applying the reduction rules (compositionally), as follows:

(((p1 s.t. R1)) s.t. Rn)pn+1 s.t. Rn+1)                          (38a)

by (st2):

(pn+1 s.t. Rn+1) where {                          (38b)

pn+1:=(((p1 s.t.R1)) s.t. Rn)}                          (38c)

by ind.hyp.; (wh-comp):

(pn+1 s.t. Rn+1) where {pn+1:=[(pn s.t. Rn) where {                          (38d)

pn:=(pn1 s.t. Rn1),…,                          (38e)

p2:=(p1 s.t. R1)}]                          (38f)

by (B-S):

(pn+1 s.t. Rn+1) where {pn+1:=(pn s.t. Rn),                          (38g)

pn:=(pn1 s.t. Rn,1),,                          (38h)

p2:=(p1 s.t. R1)}                          (38i)

Therefore, (37a)(37c) hold, for every n ≥ 1.

Theorem 3 (Restricted Memory Variables). Assume that, for n ≥ 1, j = 1, …, n, and i = 2, …, n:

Cj are proper terms, and Rj are immediate

pi ∈ RecV and cj ∈ RecV are fresh with respect to p1, Cj,Rj

Then:

V((((p1 s.t. {C1,R1}) s.t. {C2,R2})) s.t. {Cn,Rn})                          (39a)

(pns.t.{cn,Rn}) where {pn:=(pn1 s.t. {cn1,Rn1}),,                          (39b)

p2:=(p1 s.t. {c1,R1}),                          (39c)

c1:=C1,,cn:=Cn}                          (39d)

The term (39b)(39d) is in canonical form, i.e., it is the canonical form cf(V ) of the term V in (39a), iff the terms in Ci are explicit (i.e., without occurrences of the constant where) and irreducible, for all i = 1, …, n.

Proof. by induction on n ≥ 1 and using the reduction rules.

This theorem and it’s proof are generalization of the Theorem 2. The proof is long, we do not include it here.

We call the terms of the form (39a) and (39b)(39d), and also (37a), (37b)(37c), restricted memory variables. Optionally, we call the terms (37b)(37c) and (39b)(39d) memory networks of restricted memory locations pi ∈ RecV, for all i = 1, …, n.

Note 1. It is essential that Theorem 2 and Theorem 3 provide generalised, restricted memory variables / locations / slots: the memory variables pi ∈ RecV, for all i = 1, …, n. Each one of them is recursively linked to the others, by the corresponding recursion term.

(M1)The memory (recursion) variable p1 ∈ RecV is free in both of the terms (37a), (37b)(37c), and restricted by R1.

(M2)For all i = 2, …, n, the memory variables pi ∈ RecV are both restricted by Ci,Ri and bound by the recursion operator where, in the recursion term (37b)(37c).

(M3)The memory, i.e., recursion, variable p1 ∈ RecV is free in both of the terms (39a) and (39b)(39d), while it is restricted by C1,R1.

(M4)For all i = 2, …, n, the memory variables pi ∈ RecV are both restricted by Ci,Ri and bound by the recursion operator where, in the recursion term (39b)(39d).

In the special case of Ci = ∅, for all i = 1, …, n, the memory variables pi ∈ RecV (i = 1, …, n) are called basic, restricted memory variables, or basic, restricted memory (variables). Restricted parameters were introduced, as generalised parameters in situated structures of relational, partial information, in (Loukanova, 2002; Loukanova, 2014; Loukanova, 2017).

Definition 8 (Reduction Relation, ⇒). The reduction rules of Lrarλ, which we often designate as Larλ, define a reduction relation between terms, A B :

For every A, BLrarλ

ABAA0AnBforsomeAiLrarλ,i=0,,n(n0)                          (40a)

by application of reduction rules of Lrarλ, given in Sect. 5.2

ABABby abbreviation                          (40b)

Typically, we shall write AB, instead of A B, i.e., as in (40b), when there is no confusion.

Often, we write Larλ instead of Lrarλ

Note 2. The Canonical Form Theorem 4 encompasses the extended language and reduction calculus of Lrarλ, i.e., it covers terms that have occurrences of the constant of the restriction operator such that. Such terms are formed by Def. 2, blending (6e) with all the other formation rules (6a)(6e).

Theorem 4 (Canonical Form Theorem). For every A ∈ Terms, there is a unique up to congruence, irreducible term B, such that (41):

Bcf(A)Terms                          (41)

The term cf (A) is called the canonical form of A, It has the properties (1)–(5):

(1)For some explicit, irreducible A0, …, An ∈ Terms (n ≥ 0):

cf(A)A0 where {p1:=A1,,pn:=An}                          (42)

(2)A and its canonical form cf (A) have the same constants, (43a), and the same free (pure and memory) variables, (43b):

Consts(A)=Consts(cf(A))                          (43a)

FreeV(A)=FreeV(cf(A))                          (43b)

(3)Cannonical irreducibility, modulo congruence:

A is irreducibleAccf(A)                          (44)

(4)Uniqueness of the canonical forms, in reduction sequences, up to congruence:

ABcf(A)ccf(B)                          (45)

(5)cf (A) is the unique, up to congruence, irreducible term, i.e., for every B,

ABand Bis irreducible cf(A)ccf(B)                          (46)

Proof. The proof is by structural induction on formation of the term A, according to Def. 2, and using Def. 5 of the canonical forms cf (A), the reduction rules in Sects. 5.2.1–5.2.2, and by the Criteria for Irreducibility, Theorem 1.

The full proof is long and we do not include it.

For example, the proof of item (1), for the case in the indiction step, in which A is a restriction term, i.e., of the form (6e), in Def. 2, uses Def. 5 of the canonical forms cf (A), (CF5) (30a)(30c).

Corollary 4.1 (Canonical Form of Restricted Terms). Assume that D ∈ Terms is a restriction term of the form

D(Asuch that {C,R})                          (47)

given that, for j = 1, …, m (m ≥ 0), i = 1, …, k (k ≥ 0):

(1)Each Cjτj ∈ Terms is proper

(2)Each Riσ ∈ Terms in Rσ is immediate

(3)Cjτj and Riσ have types of truth values, i.e., τj ≡ t or τjt~; and σi ≡ t or σit~

Then (48) follows:

cf(D)(Asuch that {c,R})where{p1:=A1,,pn:=An}                          (48)

for some immediate A′ ∈ Terms, some explicit, irreducible A1, …, An ∈ Terms (n ≥ 0), and memory variables cj, pi ∈ RecV (j = 1, …, m, m ≥ 0, i = 1, …, n), such that cp (i.e., for all j, cj ∈ { p1, …, pn }).

Theorem 5 (Effective Reduction Calculus). For every term A ∈ Terms, its canonical form cf (A) is effectively computed, by using the reduction calculus. That is, A is effectively reduced to its canonical form cf (A), by a finite number of applications of the reduction rules:

Acfcf(A)                          (49)

Proof. The proof is by structural induction on the term A, by Def. 2, and using Def. 5 of the cf (A), the reduction rules in Sects. 5.2.1–5.2.2, and by the Criteria for Irreducibility, Theorem 1.

The full proof is long. We shall prove the case in the indiction step, in which A is a restriction term, i.e., of the form (6e), in Def. 2

Induction Hypothesis Assume that D ∈ Terms is a restriction term of the form (50a)(50c):

D(Asuch that {Dϑ})                          (50a)

Acf(A),Dicf(Di)                      (Induction Hypothesis)                          (50b)

for Dϑof types of truth values,i.e.,ϑit or  ϑit~,i=1,,k(k0)                          (50c)

Induction Step We shall prove that Dcf cf (D).

By the congruence, Def. 6, the term parts in the scope of the operator such that can be reordered as in (51):

Dc(Asuch that {C,R})                          (51)

with the term parts as in Corollary 4.1

Case 1 A ∈ Terms is immediate

Then, by applying the reduction rule (st1) to D in (51), and taking A′A, we get, (52a), for fresh recursion (memory) variable cj ∈ RecV (j = 1, …, m):

D(A such that {c1,,cm,R})               where {c1:=C1,,cm:=Cm}                          (52a)

from D in (51), by (st1), for A'A immediate

(A such that {c1,,cm,R})where {c1:=cf(C1),,cm:=cf(Cm)}from (52a), by Induction Hypothesis (50b) and (wh-comp)                          (52b)

(A such that {c1,,cm,R})where {c1:=C1,0,c1:=C1,                          (52c) cm:=Cm,0,cm:=Cm}                          

from (52b), by the Bekič-Scott Rule (B-S)

cf(D) from (52a) and (50b),by Def. 5 of the canonical forms for D,cf(D)                          (52d)

Case 2 A ∈ Terms is proper

Then, by applying the reduction rule (st2) to A in (47), we have:

D(A such that {c1,,cm,R})where {c1:=C1,,cm:=Cm}                          (53a)

(p0 such that {c1,,cm,R})where {p0:=cf(A),c1:=cf(C1),,cm:=cf(Cm)}from (53a),by Induction Hypothesis (50b)and (wh-comp)                          (53b)

(p0 such that {c1,,cm,R})where {p0:=A0,0,p0:=A0c1:=C1,0,c1:=C1cm:=Cm,0,cm:=Cm}                          (53c)

from (53b), by the Bekič-Scott Rule (B-S)

cf(D) from (53a) and (50b), by Def. 5 of the canonical forms for D, cf(D)                          (53d)

7. Algorithmic Syntax-Semantics in Larλ and Memory Restrictions

In this section, we emphasise the significance of the algorithmic semantics in the type-theory of acyclic recursion Lrarλ, with respect to its denotational semantics.

Immediate Terms. In case A is an immediate term of Larλ, and thus of Lrarλ, see Def. 4, e.g., of the form λ(u1) … λ(un) p(v1) … (vm), as in (18b), it has no algorithmic sense. The value den(A)(g) is given by the valuations g(p) and g(vi), and abstracting away from the values uj.

Proper Terms. In case A is a proper term, i.e., non-immediate, there is an algorithm alg(A) for computing den(A)(g). The algorithm alg(A) is determined by the canonical form cf (A) of A, (54).

By the Canonical Form Theorem 4 and (42), the canonical form cf (A) is unique up to congruence:

cf(A)A0 where {p1=A1,...,pn=An}                          (54)

for some explicit, irreducible Ai ∈ Terms, i = 1, …, n (n ≥ 0)

The canonical form cf (A) of a proper term A determines the algorithm for computing the denotational value den(A)(g) = den(cf (A))(g) from the components den(Ai)(g) of the canonical form cf (A), by Def. 3.

Syntax ofLarλ/LrarλAlgorithms for Iterative Computations:cf(A)Canonical ComputationsDenotationsComputational Syn-Sem: Algorithmic and Denotational Semantics ofLarλ/Lrarλ/Lrλ

Figure 2: Computational Syntax-Semantics Interface for Parametric Computations in Lrrλ

For every algorithmically meaningful, i.e., proper (non-immediate) term A, A ∈ Terms, its canonical form cf (A) determines the algorithm alg(A) for computing den(A).

The denotational semantics of Lrarλ (Larλ) is by induction on term structure

The type theories Larλ and Lrarλ have effective reduction calculi, see Theorem 5 for Lrarλ. For Larλ, see (Moschovakis, 2006) and (Loukanova, 2019b; Loukanova, 2019c; Loukanova, 2020b). For every A ∈ Terms, there is a unique, up to congruence, canonical form cf (A), which can be obtained from A, by a finite number of reductions:

Acfcf(A)                          (55)

For a given, fixed semantic structure 𝔄 and valuations G, for every algorithmically meaningful A ∈ Termsσ, the algorithm alg(A) for computing den(A) is determined by cf (A), so that:

den(A)(g)=den(cf(A))(g),for gG                          (56a)

alg(A)=alg(cf(A)):GTσ                          (56b)

The denotation den(A)(g) = den(cf (A))(g) of a proper term A is computed stepwise, iteratively, according to the ranking rank(pi), i = 1, …, n (n ≥ 0). By starting with i of the lowest value among rank(p1) …, rank(pn), and moving in increasing order, the algorithm computes the denotational values of the parts den(Ai)(g) and saves them in the corresponding memory variables pi. Then, these values are used for computing the denotation:

den(A)(g)=den(cf(A))(g)=den(A0)(g)                          (57)

Figure 2 gives the general scheme of the relation between the syntax of the terms of Lrarλ (Larλ, Lrλ) and their algorithmic and denotational semantics, via computational syntax-semantics interface within Lrarλ (Larλ, Lrλ).

7.1. Formalization of the Notion of Iterative Algorithm

The type-theory of acyclic recursion is a formalization of the mathematical notion of algorithm, for computing values of recursive functions designated by recursion terms. The values of the functions, when denoted by meaningful, i.e., proper, recursive terms, are computed iteratively by algorithms determined by the canonical forms of the corresponding terms. In this paper, we have introduced Lrarλ, which is an enrichment of Larλ, by restricted memory variables (to save parametric data). I.e., the concept of algorithm, with memory parameters, which are constrained to store data, which in addition to being typed, can be restricted to satisfy properties. The algorithms are expressed by terms in canonical forms, which carry data components computed and stored in restricted memory variables, i.e., memory slots. The restrictions of the memory variables, are expressed algorithmically by the canonical forms as well.

Thus, the concept of algorithm, with restricted memory parameters, is formalised at the object level of the syntax and reduction calculus of Lrarλ.

For a term ALrarλ, such that A has occurrences of the restrictor operator, the canonical form cf (A) has occurrences of the restrictor only in sub-terms that represent restricted immediate terms of the form (P such that { C1, …, Cm }), for immediate terms P, C1, …, Cm.

8. Algorithmic Syntax-Semantics and Constants

For each algorithmically meaningful term A, the denotation of the term den(A) = den(cf(A)) is computed by stepwise, iterative computations, according to the algorithm determined by its canonical form cf (A), by the increasing rank of the term parts Ai. In the computational process, the values of the parts Ai of cf (A) are computed in the iterative steps and stored in corresponding memory slots pi.

In this section, we shall provide examples of applications of the type-theory Lrarλ of restricted algorithms to algorithmic semantics of basic arithmetic expressions.

The algorithms for computing the values of the expressions are expressed by terms in canonical forms. Some of the terms are restricted terms that have occurrences of restricted recursion variables, i.e., restricted memory locations for saving data satisfying restrictions.

For this purpose, we shall use simple examples from arithmetics, to explicate the algorithmic concepts.

In the terms in this section, we use the symbol “/” for denoting the division operation, in ratio terms like n/d.

8.1. Canonical Terms of Arithmetic Expressions without Restrictions

Example 8.1. The terms A, B, C, respectively in (58a), (59a), (60), designate different algorithms for computing the same numerical value 40, which is the denotation of each of these terms. The corresponding algorithms are determined by the canonical forms cf (A), cf(B), cf(C), given in (58b), (59b), (60):

(1)The term cf (A) in (58b) determines the algorithm for computing den(A):

A(200+40)/6                          (58a)

cf n/d where {n:=(a1+a2)algorithmic pattern,a1:=200,a2:=40,d:=6algorithmic instantiation of memory slots}cf(A)                          (58b)

(2)The term cf(B) in (59b) determines the algorithm for computing den(B):

B(120+120)/6                          (59a)

n/d where {n:=(a1+a2),a1:=120,a2:=120,d:=6}cf(B)                          (59b)

(3)The term C ≡ cf(C) in (60) determines the algorithm for computing den(C):

Cn/d where {n:=(a+a),a:=120,d:=6}cf(C)                          (60)

Here, as an example, we assume that the numerical denotations are with respect to the decimal number system (base 10).

The terms A, B, C, in this example, have the same denotations as their canonical forms, respectively, cf (A), cf(B), cf(C).

The canonical forms cf (A), cf(B), cf(C) of the terms A, B, C, respectively in (58b), (59b), (60), determine different algorithms that compute the same number, which is, in addition, denoted by the numeral constant 40, as their denotational values. But, each of their denotations, while equal as denotational values, den(A) = den(B) = den(C) = den(40), is computed by different algorithms, expressed, correspondingly, by their canonical forms cf(A), cf(B), cf(C), den(40), (61a)(61b).

These numerical constants have numerical values, which are computed by algorithms that depend on the base of the number system. An important feature of the theory of recursion Larλ, is that some constants by themselves may have denotations computed by, more or less complex, algorithms. By the term cf(B) in (59b), the same value of the constant 120 gets computed twice and stored in two different memory slots: A1 := 120 and a2 := 120.

den(A)=den(B)=den(C)=den(40)(decimal number system)                          (61a)

alg(A)alg(B)alg(C)alg(40)                          (61b)

8.2. Parametric Algorithms for Arithmetic Expressions with Restrictions

Example 8.2. Recursion terms with restrictor operator designated by the operator constant such that:

Restrictor terms having satisfied restrictor partssuch that:

D1(n/d such that {n,d,d0})restrictor term Rwhere {                          (62a)

n:=(a1+a2),d:=(d1×d2),                          (62b)

a1:=200,a2:=40,d1:=2,d2:=3}                          (62c)

A term having the restrictor unsatisfied:

E1(n/d such that {n,d,d0}) restrictor term Rwhere {                          (63a)

n:=(a1+a2), d:=(d1×d2),                          (63b)

a1:=200,a2:=40,d1:=2,d2:=0}                          (63c)

cf(D1) determines the algorithm alg(D1) for computing the value den(40)

cf(E1) determines the algorithm alg(E1) for computing the value den(E1)

alg(D1) computes den(D1)=den(40)      (decimal base)                          (64a)

alg(E1)computes den (E1)=Errorer                          (64b)

Example 8.3. Restricted memory locations, i.e., restricted variables

The constant such that designates a restrictor operator:

R ≈ cf (R) and r0 designate parametric, restricted algorithms

R(n/d such that {(n), (d), (d0)})restrictor term R                          (65a)

R1[(a0 such that {zn,zd,d0})restricted memory variable r0 where {                          (65b)

a0:=n/d,zn:=(nN),zd:=(dN),d0:=¬p,p:=(d=0)}]                          (65c)

r0, in (65b), and R1, in (65b)(65c), are restricted memory variables

R1 instantiates r0 via parametric (underspecified) assignments (65c)

D ∈ Terms instantiates the restrictor R1, by (66a)(66b)

Dr where {r:=R1, n :=(a1+a2), d:=(d1×d2)                          (66a)

a1:=200, a2:=40, d1:=2, d2:=3}                          (66b)

cf (D) designates the algorithm alg(D) for computing the value:

den(D) = den(40) (in decimal number system)

Example 8.4. Restricted memory locations, i.e., restricted variables and restriction with negation operator

R1 ≈ cf(R1) designate the parametric, restricted algorithm alg(R1) represented by cf(R1)

R1cf[(a0 such that {zn,zd,d0})restricted memory variable r0 where {                          (67a)

a0:=n/dzn:=(nN),zd:=(dN)d0:=¬p,p:=(d=n0),n0:=0}]                          (67b)

D ∈ Terms instantiates the memory variables R1, cf(R1), r

Dr where {r:=[(a0 such that {zn, zd, d0}) restricted memory variable r0where {                          (68a)

a0:=n/d,                          (68b)

zn:=(n), zd:=(d),                          (68c)

d0:=¬p, p:=(d=n0), n0:=0}],                          (68d)

n:=(a1+a2), d:=(d1×d2),                          (68e)

a1:=200, a2:=40, d1:=2, d2:=3}                          (68f)

cfr where {r:=(a0 such that {zn,zd,d0})restricted memory variable r0,                           (68g)

a0:=n/d,                          (68h)

zn:=(n), zd:=(d),                          (68i)

d0:=¬p, p:=(d=n0), n0:=0,                          (68j)

n:=(a1+a2), d:=(d1×d2),                          (68k)

a1:=200, a2:=40, d1:=2, d2:=3}cf(D)                          (68fl)

from (68a)(68f), by (B-S)

cf (D) designates the algorithm alg(D) for computing the value:

den(D) = den(40) (in decimal number system)

The term cf (D) is a restricted memory location r, in which the algorithm alg(D) computes and “stores” the value den(D) = den(40)

9. Application to Algorithmic Semantics of Definite Descriptors

Definite descriptors are present in data of various forms in specific domains of information. For the purposes of general demonstration, we use the natural language definite descriptions, consisting of noun phrases (NPs) formed by the definite determiner “the”.

First Order Logic (FOL) and Higher Order Logic (HOL) offer possibilities for rendering expressions of the definite descriptions that have the determiner “the” as a constituent.

We shall briefly present such possibilities because, firstly, while they have unsatisfactory aspects, they are in use in various domains of applications of FOL or classic HOL. We shall show that the classical logical representations of such descriptions in FOL and HOL are available in Lrarλ.

Then, in addition to the standard possibilities from FOL and HOL, we shall provide new, more adequate possibilities, by using the restricted terms in the extended type-theory of parametric algorithms lrar. The reduction calculi of Lrarλ provide algorithmic patterns by canonical terms, for more adequate computational semantics of definite descriptors.

In this section, as an illustration of the restricted memory variables, we give one of several possible alternatives, for representation of descriptions formed with the definite determiner “the”.

The terms with restricted parameters provide alternatives for computational semantics of definite descriptors, in particular the referential descriptors.

Alternative Definite Operators We shall present different alternative operators for representing the uniqueness property designated by some of the definite descriptors. Such optional representations are dependent on the context, in which descriptors occur. The formal language of Lrarλ provides varieties of terms for such variations.

9.1. Classic Representations of the Definite Descriptors

We shall demonstrate some of the typical representations of the definite descriptors by examples from human language, by using the definite determiner “the”, e.g., by the sentence Φ in (69):

Φ The cube is large                          (69)

9.1.1 First Order Logic (FOL)

The so called Russellian analysis of definite descriptions has been used for representing the determiner “the” in logic forms.

In First Order Logic (FOL), the sentence Φ in (69) can be rendered to the formula A in (70a). A is logically equivalent to the formulae that are the usual Russellian descriptions, i.e., logical forms of the definite determiner “the”. The predicate symbol isLarge, which renders the verbal phrase (VP) “is large”, is applied over the quantified variable.

For example, the logical forms of the definite descriptions are exemplified by the FOL meta-formula, i.e., FOL scheme of definite descriptors, like (70b), by replacing the meta-variables P and Q with specific predicate expressions, e.g., constants cube and isLarge, respectively:

Φ render Ax[y( cube (y)x=y)uniqueness isLarge(x)]                          (70a)

Sx[y(P(y)x=y)uniqueness Q(x)] meta-formula in FOL: scheme for FOL formulae                           (70b)

The predication expressed by a Russellian logic form, like (70b), and its specific case (70a), has the following features:

Existential quantification as the direct, topmost predication

Predication of the uniqueness: in conjunction with the predication by the VP (“is large”)

The logical form A of Φ has no referential force towards the object denoted by the noun phrase (NP) “the cube”, (71):

[the cube]NP                          (71)

There is no distinctive, separate component rendering of the definite descriptor “the cube”, (71), i.e., of its compositional rendering, from the renderings of its constituents: the determiner “the” and the common noun “cube”

There is no compositional analysis, i.e., no “derivation” of the rendering of A from the renderings of the linguistic components of the sentence Φ

Note 3. In FOL, (70b) is an expression in meta-language, i.e., a formula scheme for many well-formed FOL formulae, including for (70a).

In Larλ, (70b) is a well-formed Larλ-term, i.e., S ∈ Terms, for P, Q ∈ Vars, e.g., in each of the cases P,Q ∈ PureV or P,Q ∈ RecV.

9.1.2 Higher Order Logic (HOL)

The method of the generalised quantifiers was introduced by (Henkin, 1950) and (Mostowski, 1957). It can be used for the definite descriptions like Φ in (69). By generalised quantification that uses the Russellian descriptions, the determiner “the” has lost its natural referential force of interpretation, e.g., in the following renderings (there are optional alternatives):

therenderT[λPλQ[x[y(P(y)x=y)uniquenessQ(x)]]]                          (72a)

 the cube  render CT( cube )                          (72b) C[λPλQ[x[y(P(y)x=y)uniqueness Q(x)]]]( cube )

|=|DλQ[x[y(cube (y)x=y)uniquenessQ(x)]]                          (72c)

(from (72b) by denotational β -conversion)

The rendering C in (72b) is obtained by the operation of functional application of T, from (72a), to the rendering of the common noun, cube, i.e.: CT (cube), which is denotationally equivalent to D ∈ Terms in (72c).

Then, the rendering of a sentence like Φ into a term BD(isLarge) is the next application, as in (73b):

ΦThe cube is largerender BD (isLarge)                          (73a)

B[λQ[x[y(cube(y)x=y)uniquenessQ(x)]]](isLarge)                          (73b)

|=|Ax[y(cube(y)x=y)uniquenessisLarge(x)]                          (73c)

(from (73b) by denotational β-conversion)

The formula A′, in (73c), is well-formed term of HOL, obtained by β-conversion from the term BD(isLarge) in (73a). After that, A′ is the same expression as the FOL formula A, in (70a).

Property 1 (Montague Intensional Logic (IL)). The denotational equalities in (72a)(72b)(72c), and (73a)(73c) are valid in Montague Intensional Logic (IL) (and other classic λ-calculus).

The stepwise, component analysis represented by T in (72a), and then by D, from T in (72b)(72c), followed by using D in (73a)(73c), to obtain A′, can be put into a joint sequence of β-conversions, by using the compositionally of the denotational equality.

Property 2 (Montague Intensional Logic (IL)). The denotational equalities in (74a)(74b)(74c) and (74c)(74d) are valid in Montague Intensional Logic (IL) (and other classic λ-calculi with valid β-conversion). (Thomason, 1974).

L[T(cube)](isLarge)                          (74a)

[[λPλQ[x[y(P(y)x=y)uniquenessQ(x)]]](cube)]β-conversion(isLarge)                          (74b)

|=|[λQ[x[y(cube(y)x=y)uniquenessQ(x)]]](isLarge)                          (74c)

(from (74b), by denotational β-conversion and Denotational Replacement Property)

|=|A[x[y(cube(y)x=y)uniquenessisLarge(x)]]                          (74d)

(from (74c), by denotational β-conversion)

Property 3 (In Larλ and Lrarλ). Assume that:

(i)  x,yPureVee~,P,QPureV(e~t~)

(ii) cube, isLargeConsts(e~t~)

Then:

(1) the above expressions T, C, D, B, A′ are well-formed Larλ-terms, i.e., T, C, D, B, A′ ∈ Terms, of respective types

(2) The above replacements (74a)(74b)(74c) and (74c)(74d) are denotationally valid in Larλ, and also in Lrarλ

Proof. Item (1) follows from Def. 2, (6a)(6e) for the set Terms of Larλ and Lrarλ.

Item (2) follows from the denotational β-conversion and Denotational Replacement Property in Larλ. see (Moschovakis, 2006) and (Loukanova, 2019b; Loukanova, 2019c)

Question 1. Are the above replacements (74a)(74b)(74c) and (74c)(74d) algorithmically equivalent in Larλ or not?

To provide an answer of this question, we need to develop the addition of the standard quantifiers and quantified formulae, such asxA andxA to the set of the logical operators for formation of formulae of Larλ. Furthermore, there is need to develop the reduction rules to encompass formulae. This work is outside the scope of this paper, especially because it is space taking.

9.2. Direct Interpretation of the Definite Determiner (Option 1)

The type-theory of acyclic recursion Larλ provides good flexibility for representing the referential force of the definite descriptors.

The determiner “the” can be used in NPs for reference to specific entities that are subject to uniqueness requirement. We present rendering “the” to a referential constant of definitness:

therendertheConsts((e~t~)e~)                          (75)

The following denotation of the constant the is provided by (Moschovakis, 2006):

[(den(the))(g)](p¯)(s0)={y, if y is the unique yTe, for which p¯(sy)(s0)=1er, otherwise,  i.e., there is no unique entity  that has the property p¯ in s0                          (76a)

for every p¯T(e~t~) and every s0Tsin the semantic domains                          (76b)

Then, a sentence like Φ can be rendered into a term A0 ≈ cf (A0), as in (77a)(77c):

The cube large render cf(A0) : t~                          (77a)

A0  isLarge(the(cube))                          (77b)

isLarge(d) where {d:=the(c), c:=cube}cf(A0)                          (77c)

from (77b) by (ap), (wh-comp), (ap), (B-S)

Instead of the direct denotation of the constant the, we shall consider several options by using restrictor terms, with such that. Towards that, at first, we introduce a constant designating the relation uniqueness.

9.3. Optional Properties of Uniqueness of Objects

Here, we shall consider several options for constants of Lrarλ that express alternative properties of uniqueness of objects, by defining them by slight denotational differences. We shall select the constant unique defined by (86).

Example 9.1 (Option 2: Tentative Candidate for Combination with Definitness Determiner“the”). Here, we shall look into a constant unique0 for uniqueness of any object y satisfying a property p in a state s0, by (79).

 unique 0Consts(e~t~)(e~t~))                          (78)

For every p¯T(e~t~),q¯Te~, and every s0Ts, we can define the denotation den(unique0) by (79):

[(den( unique 0))](p¯)(q¯)(s0)={1,q¯(s0) is the unique yTe s.t. p¯(sy)(s0)=1 er,  otherwise                           (79)

The weakness of the constant unique0 is that, by (79), both (80a)(80b) are possible, for some p¯0T(et~), q¯0Te~, s0Ts:

q¯0(s0)=er andq¯0(s0) is the unique yTe s.t. p¯0(sy)(s0)=1                          (80a)

[(den(unique0))](p¯0)(q¯0)(s0)=1                          (80b)

We shall consider better possibilities for the uniqueness property, instead of Option 2, to be used in definite descriptors.

Example 9.2. Now, we shall look into a possible constant unique1 for uniqueness of yer satisfying a property p in a state s0

For everyp¯T(e~t~),q¯Te~,s0Ts,                           [(den( unique 1))(g)](p¯)(q¯)(s0)={1, if q¯(s0) is the unique yTe such that y er and p¯(sy)(s0)=1 er,  otherwise                           (81)

By defining the constant unique1, with (81), we have that

den(unique)den(unique1)                          (82)

Then, by using (82): It is possible that there exist some p-0T(e~t~), q-0Te~, s0Ts, such that:

 for all x[[xer&p¯0(sx)(s0)=1]x=q¯0(s0)]                          (83a)

p¯0(ser)(s0)=1                          (83b)

From the statement (83a), it follows that q-0(s0)er and q-0(s0) is the unique yTe~, such that yer and p-0(sy)(s0) = 1. Therefore, (84a) holds.

From (83a)(83b), it follows that both q-0(s0)er and er have the property p-0 in s0, i.e., q-0 is not the unique yTe~ that has the property p-0 in s0. Thus, q-0(s0)er, but q-0(s0) is not the unique yTe~, such that p-0(sy)(s0) = 1. Therefore, (84b).

(den(unique1))(g)(p¯0)(q¯0)(s0)=1                          (84a)

(den(unique))(g)(p¯0)(q¯0)(s0)=er                          (84b)

Suggested Constant Designating Property of Uniqueness of Objects Now, we shall consider a constant unique denoting a property of uniqueness of the object y = q(s0) in s0, for a given, state-dependent object q, satisfying any given property p in a state s0.

Assume that Larλ has a constant unique of the type in (85):

uniqueConsts((e~t~)(e~t~))                          (85)

We can define the denotation of the constant unique by (86), for any given function gG, which is a variable valuation, i.e., provides values to all variables of Larλ. Note that, as a simplification, the variable valuation g can be suppressed, since it doesn’t affect the value of the constant unique when applied to objects in the semantic domains. We can define

For every p¯T(e~t~),q¯Te~, and every s0Ts:                          

[(den(unique))(g)](p¯)(q¯)(s0)={1,ifq¯0(s0)erandq¯(s0)is the uniqueyTe   such thatp¯(sy)(s0)=1er,otherwise                          (86)

Therefore, [(den(unique))(g)](p¯)(q¯)(s0)=[(den(unique))](p¯)(q¯)(s0)=1 iff there exists (exactly one) entity y, yTe, such that y=q¯(s0)er, and y is the unique object that has the property p¯ in s0, i.e., p¯(sy)(s0)=1. This esistence condition is expressed by (87a), and also by its instantiated version (87b). These expressions, (87a) and (87b), are in metalanguage, not in Lrarλ, and designate equivalent statements. Otherwise, the reference fails, i.e., [(den(unique))(g)](p¯)(q¯)(s0)=er.

y[y=q¯(s0)er&x[p¯(sx)(s0)=1x=y]]                          (87a)

q¯(s0)er& for all x[p¯(sx)(s0)=1                          (87b) x=q¯(s0)]

9.4. Rendering of the Definite Determiner “the” via Underspecification

Syntactically, we take the definite determiner “the” to be a lexeme of the syntactic part of speech, category DET of the determiners.

For given memory (recursion) variables p, q of the types in (88c), the definite determiner “the” can be rendered into an underspecified term, as in (88a) for a property denoted by the memory variable p:(e~t~) and an entity q : p:e~. Semantically, by the term (88a), the definite determiner “the” is treated as designating a restricted parameter. Any entity that is denoted by (88a) is the denotation of q restricted to be the unique object having an underspecified property p that would be contributed by the nominal complement of the determinar “the”.

therenderA1(qs.t.{unique(p)(q)}):e~                          (88a)

therendercf(A1)(qs.t. {U}where {U:=unique(p)(q) }                          (88b)

 for pRec(e~t~),qRece~,URect~                          (88c)

The memory variable p is free, i.e., underspecified, in the term A1, i.e., p ∈ FreeV(A1), in (88a), and also in the canonical form cf(A1), i.e., p ∈ FreeV(cf (A1)).

Then, p can be specified when the determiner “the” is combined with the nominal head in NPs. In this example, we take simple common nouns, like “cube”:

 the cube renderA2(q s.t. { unique (p)(q)}) where {p:= cube }                          (89a)

 the cube rendercf(A2)(q s.t. {U}) where {U:= unique (p)(q),p:= cube }                          (89b)

by (st1), (head), from (89a)

Algorithmic Pattern of Referential Force Both terms (88b) and (89b) have referential force, in distinction from existential predications involving uniqueness:

The term (88b) expresses the underspecified, algorithmic pattern of reference to the unique object q having the underspecified (unknown) property p

The term A2 has a referential force, by also being a restricted variable constrained to be the unique, with already specified property, e.g., p := cube

It is possible to render the definite determiner “the” into (88a), and then instantiate p, e.g., as in (89a), and then reduce to the canonical form cf(A2)

The underspecified term cf(A1) in canonical form, in (88b), is preferable for rendering the definite article “the”. Then, (88b) can be instantiated by suitable assignment, e.g., as in (89b)

The canonical form cf (A2 ) in (89b) represents an algorithmic pattern for semantic representation of a class of definite descriptions interpreted as reference to entities by the restrictor (q s.t. { U }). The subterm U := unique(p)(q), In the term (89b), is for uniqueness, i.e., definiteness, for the property represented p := cube, in this example. The recursion variable q is free, and, thus underspecified, obtaining its denotation in a specific context. via assignments, e.g., by a “forthcoming” verb (V) or a verb phrase VP.

Then, a sentence having such a definite description in its subject position, can be rendered to the respective term A3, or better directly to its canonical form cf(A3) as in (90a)(90d):

The cube is large render cf(A3) : t~                          (90a)

A3isLarge ((s.t. {unique(p)(q)}) where {p:=cube})                          (90b)

 isLarge (Q) where {                  Q:=[(q s.t. {unique(p)(q)}) where {p:= cube }]}                          (90c)

by (ap), from (90b)

cfcf(A3)isLarge(Q) where {Q:=(q s.t. {U}),U:=unique(p)(q),p:= cube }                          (90d)

by (st1), (wh-comp), (head), (B-S), from (89b), (90c)

The term cf (A3 ) in (90d) carries an algorithmic pattern for rendering predicative sentences, which have a subject NP that is a definite descriptor, into Lrarλ. The reference by the descriptor is expressed by the memory variable Q, which in this specific example is instantiated by the assignments to Q, U, and p, but in other instances, the corresponding term parts can be different instantiations.

9.5. Algorithmic Pattern: Definite Descriptors (Option 3)

The canonical form A ≡ cf (A) in (91a) is a generalization from (90d), by taking away the specific instantiations for the predicate constants is Large and cube.

The term A ≡ cf (A) in (91a) represents the computational algorithm for definite descriptors, e.g., such as composed with the definite article “the” and common nouns. The open predicative term L(Q) designates predication of a property L to an underspecified object designated by the underspecified definite descriptor Q.

The restricted recursion (memory) variable Q := (q s.t. { U }) is underspecified without a context.

therenderAcf(A)L(Q) where {Q:=(qs.t.{U}),U:=unique(p)(q)}                          (91a)

p,q,LFreeV(A),pRecV(e~t~),qRecVe~,                          (91b)

QRece~,URect~,LRecV(e~t)                          (91c)

Note that qRecVe~ is a memory variable, which is free in A ∈ Terms, in (91a), i.e., q ∈ FreeV(A). Its denotation den(q)(g) can be obtained by a variable assignment g satisfying the restriction of uniqueness in (91a).

9.6. Named Entities in Definite Descriptors and Predications

Here, we give an example of the definite descriptors as a direct reference by named entities in predicative sentences:

The cube n is large render cf(A4):t~                          (92a)

A4isLarge((s.t. {unique(N)(q), p(q)})where {                          (92b) q:=n, p:=cube, N:=named-n})                                   

cfcf(A4)isLarge(Q) where {Q:=(q s.t. {U,C}),U:= unique (N)(q),C:=p(q),q:=n,p:= cube, N:= named- n}                          (92c)

The restriction about the uniqueness of the object named by a constant can be dropped out, by assuming that it is a part of the interpretation function on the constants, such as n ∈ Consts. Thus, the same sentence can be rendered into the following, simpler term. in it, there is a direct reference; uniqueness and existence are consequences, not a direct part of the rendering term

The cube n is largerendercf(A5) : t~                          (93a)

A5isLarge((q s.t. {p(q)}) where {q:=n,p:= cube })                          (93b)

cfcf(A5)isLarge(Q) where {Q:=(q s.t. {C}),C:=p(q),                                                      q:=n,p:= cube }                          (93c)

In Sects. 9.2–9.6, we provided renderings of descriptors and of sentences that include them, to Lrarλ terms, which do not use any λ-abstractions and λ-applications. Instead, the renderings of the larger expressions combine the ones of the components, by the operator of term applications guided by types of the components, and / or specifications of underspecified memory variables, by adding assignments, in a compositional mode.

9.7. Rendering of the Definite Article “the” via λ-Abstraction

In this and the following Sects. 9.7–9.8, we provide compositional renderings of expressions by combining smaller components into larger ones, by using λ-abstractions and λ-applications, by Lrarλ terms and reduce them to canonical forms, by the reduction rules of Lrarλ, from Sect. 5.2.

In (94a)(94e), we give a possible rendering of the definite article “the”, which is the essential component of many of the definite descriptors:

 the render B1((e~t~)e~)/cf(B1((e~t~)e~)), for unique  Consts ((e~t~)(e~t~)) as in (86)                          (94a)

B1λ(x)([q s.t. { unique (p)(q)}] where {p:=x})                          (94b)

λ(x)([[s.t.{U}] where {U:=unique(p)(q)}]                          (94c) where {p:=x})

by (st1), (wh-comp), (λ-comp), from (94b)

λ(x)([s.t. {U}] where {U:=unique(p)(q),p:=x})                          (94d)

by (head), (λ-comp), from (94c)

cfλ(x)[q s.t. {U(x)}] where {U:=λ(x)[unique(p(x))(q)],p:=λ(x)(x)}                          (94e)

by (λ), from (94d)

cf(B1)                          (94f)

The rendering of a definite descriptor, like “the cube” in (95a)(95e), combines the ones of its components, i.e., here we chose cf (B1), for the definite article “the”, from (94e), instead of B1, and the term (i.e., the constant) cube rendering the noun “cube”:

the cuberendercf(cf(B1)(cube))cf(B2):e~from(94e)                          (95a)

B2[λ(x)[s.t. {U(x)}] where {                          (95b) U:=λ(x)[unique(p(x))(q)], p:=λ(x)(x)}](cube)

[λ(x)[s.t.{U(x)}]](cube) where{                          (95c) U:=λ(x)[unique(p(x))(q)], p:=λ(x)(x)}

by (recap), from (95b)

[[λ(x)[s.t.{U(x)}]](c) where {c:=cube}]                          (95d) where {U:=λ(x)[unique(p(x))(q)], p:=λ(x)(x)}

by (ap), (wh-comp), from (95c)

cfcf(B2)[[λ(x)[s.t.{U(x)}]](c)]                          (95e) where {U:=λ(x) [unique(p(x))(q)], p:=λ(x)(x),c:=cube}

by (head), (cong), from (95d)

9.8. The Definite Determiner “the” and Descriptors in Predicative Sentences

Computational grammar of natural language can implement compositional combinations of the renderings of the sentence components. In (96a)(96d), the rendering of the verb phrase, a predicate term, e.g., is Large, is applied to that of a definite descriptor, like “the cube” from (95a)(95e):

The cube is largerenderisLarge (cf(B2))B3:t~ from (95e) by trem application                          (96a)

B3isLarge([[λ(x)[q s.t. {U(x)}]](c)] where {U:=λ(x)[ unique (p(x))(q)],p:=λ(x)(x),c:= cube })                          (96b)

 isLarge (Q) where {Q:=([[λ(x)[q s.t. {U(x)}]](c)] where {U:=λ(x)[ unique (p(x))(q)],p:=λ(x)(x),c:= cube })}                          (96c)

by (ap), from (96b)

cfcf(B3)isLarge(Q) where {Q:=[λ(x)[q s.t. {U(x)}]](c)U:=λ(x)[ unique (p(x))(q)]p:=λ(x)(x),c:= cube }                          (96d)

by (B-S), from (96c)

10. Conclusions and Outlook

In this paper, we have extended the theory of typed, acyclic recursion Larλ, by introducing terms with restrictions. The result is a formal language Lrarλ, which is a proper extension of the language Larλ and its reduction calculus. The same extension applies to the version of the type-theory with full recursion Lrλ without the acyclicity.

The two subclasses of the terms with restrictions, i.e., the basic restricted memory variables, and restricted memory variables, see Theorem 3, provide parametric algorithmic patterns for semantic representations of memory locations. The memory variables are typed, and thus, can be used to store data of the corresponding types. In addition, the restricted memory variables, introduced in this paper, can be used to store data, which is constrained to satisfy propositional restrictions. The restrictions are calculated recursively, by iterative algorithms determined by canonical forms of formal terms of Lrarλ. We have introduced a formalization of restricted algorithmic patterns for computational semantics of formal languages, e.g., in programming, and natural languages, by illustrations with mathematical expressions and definite descriptors of natural language, which are typical problems for Natural Language Processing (NLP) of a class of singular NPs that are definite descriptions.

Restrictor versus Conditionals This paper does not cover possible representations of the conditionals by Lrarλ. We shall only comment that topic, briefly in this note.

In the formal language of Lrarλ, the operator constant such that is essentially different from the conditional operator constant if … then …, by the definitions of syntax and semantics of term formation of restricted terms, see Def. 2, (6a)(6e). Relatively complex or simple, it can be used for the same restrictor operator designated by the constant such that. Its syntactic and semantic roles are determined by the denotational and algorithmic semantics, and the reduction calculi. The restricted terms (6e) can be replicated only to certain extend by the traditional terms involving “if … then”, and “if … then … else …”. To some extend this is so, because Larλ, and Lrarλ, do not include constants (or terms) for the erroneous semantic values such as er. Secondly, restricted terms of the form (6e) carry referential force, which is demonstrated by the analysis of the definite descriptions in Lrarλ, presented in this paper.

An investigation of potential distinctions and similarities between the restrictor operator and the conditionals is a subject of other forthcoming work. This is more important, for an extended type-theory of full recursion, by allowing terms that do not obey the Acyclicity Constraint (AC) given on page 6.

This paper is part of such extended work. Our focus is on developments in two interrelated lines of work: type-theory of parametric algorithms and applications.

Theoretical Developments Here we shall briefly mention wider classes of formal languages and their algorithmic type theories. Recent theoretical work (Loukanova, 2019b; Loukanova, 2019c) extends the reduction calculi of Larλ and Lrλ. Extensive research on the algorithmic syntax-semantics of the type-theory of algorithms is in our ongoing and future work, by covering the following distinctions:

The formal language Lrλ of full recursion is similar to the formal language of Larλ, by Def. 2, (6a)(6d), without the acyclicity constraint (AC), (8a)(8c)

The formal language Lrrλ of full recursion and restrictors is similar to the formal language of Lrarλ, by Def. 2, (6a)(6e), without the AC, (8a)(8c)

The classes of formal languages, with their corresponding reduction calculi and theories, Lrλ, Lrrλ, come with similar sets of reduction rules, as Larλ, Lrarλ, respectively

The reduction computations, AB, are defined, for all terms A, B of the formal theories Larλ / Lrarλ / Lrλ / Lrrλ, according to the corresponding set of reduction rules

Applications In our ongoing and future work on applications of type-theory of algorithms, with acyclic, Larλ and Lrarλ, and, respectively, with full recursion Lrλ and Lrrλ, we have been maintaining several lines of applications. Our focus is on the reduction calculus of Larλ and Lrarλ, for acyclic algorithms, having terms with restrictor operator, and corresponding reduction rules introduced by this paper. The reason is that acyclic recursion and iteration guarantee termination of algorithms. This feature of Larλ and Lrarλ has great significance for practical applications of AI, e.g.:

Applications to formal and natural languages

Computational Semantics

Computational Syntax-Semantics Interfaces

Semantics of programming and specification languages

Theoretical foundations of compilers

Computational Neuroscience, e.g., by theoretical development, which has potential applications for linking receptors (Loukanova, 2020b)

Applications to Computational Grammar of Natural Language Applications to advanced, intelligent technologies, including AI areas, require integration of computational grammar of natural language, by covering syntax-semantics interfaces, e.g., (Loukanova, 2019a). In forthcoming and future work, we present syntax-semantic interfaces for phrasal varieties of natural language. For example, a broad class of noun phrases (NPs), will benefit and require adequate coverage of computational semantics, which is provided by the algorithmic approach of the extended type-theory of algorithms Lrarλ including the restrictor operator, presented by Def. 2, (6a)(6e). Compositionally, the algorithmic semantics of such NPs propagates into the semantics of enclosing sentences and other expressions, by syntax-semantics in the computational grammar.

Definite Descriptors Descriptors are abundant in natural and formal languages, e.g., in specification languages in data bases and advanced software packages. Sentences that include definite descriptors, like Φ in (69), express prediction of a property, e.g., “is large”, to the entity designated by the descriptor, e.g., “the cube”. Classic logic, e.g., as in Sect. 9.1, represents such property predications by enclosing the corresponding property formulae in existential predications, which also include FOL formulae for uniqueness, e.g., by the FOL A in (70a). Introducing generalized quantifiers, e.g., as in Sect. 9.1.2, significantly improve the compositionally of the semantic representations of the syntactic components of the definite descriptors and sentences that include them, e.g., by the denotational equalities in (74a)(74d).

Type-theory of algorithms Larλ (Lrλ) has formal terms that are also in FOL and HOL, including in Montague IL. This will facilitate upgrading of software that uses such classic semantics to advanced algorithmic semantics. Among the other advantages of the Larλ terms, especially by the extended Lrarλ, is that they express their denotations and also, their algorithmic semantics—the canonical forms of the Larλ and Lrarλ terms determine the respective algorithmic steps, i.e., by computational iteration of ranked algorithmic assignments.

In addition, Larλ and Lrarλ provide terms that express more subtle semantic distinctions, including for expressions of semantic reference force to the objects designated by definite descriptors. We investigated alternative options in Sects. 9.2–9.8.

10.1. Acknowledgements

This paper is essentially extended work from (Loukanova, 2021).

11. References

Gallin, D., 1975. Intensional and Higher-Order Modal Logic: With Applications to Montague Semantics. North-Holland Publishing Company, Amsterdam and Oxford, and American Elsevier Publishing Company. ISBN 0 7204 0360 X.

Henkin, L., 1950. Completeness in the Theory of Types. Journal of Symbolic Logic, 15(2):81–91.

Loukanova, R., 1991. Situation Semantical Analysis of Natural Language. Ph.D. thesis, Faculty of Mechanics and Mathematics, Moscow State University (MGU), Moscow. (in Russian).

Loukanova, R., 2001. Russellian and Strawsonian Definite Descriptions in Situation Semantics. In Gelbukh, A., editor, Computational Linguistics and Intelligent Text Processing. CICLing 2001, volume 2004 of Lecture Notes in Computer Science, pages 69–79. Springer, Berlin, Heidelberg. ISBN 978-3-540-44686-6.

Loukanova, R., 2002. Quantification and Intensionality in Situation Semantics. In Gelbukh, A., editor, Computational Linguistics and Intelligent Text Processing. CICLing 2002, volume 2276 of Lecture Notes in Computer Science, pages 32–45. Springer, Berlin, Heidelberg. ISBN 978-3-540-45715-2.

Loukanova, R., 2011a. Reference, Co-reference and Antecedent-anaphora in the Type Theory of Acyclic Recursion. In Bel-Enguix, G. and Jiménez-López, M. D., editors, Bio-Inspired Models for Natural and Formal Languages, pages 81–102. Cambridge Scholars Publishing.

Loukanova, R., 2011b. Semantics with the Language of Acyclic Recursion in Constraint-Based Grammar. In Bel-Enguix, G. and Jiménez-López, M. D., editors, Bio-Inspired Models for Natural and Formal Languages, pages 103–134. Cambridge Scholars Publishing.

Loukanova, R., 2011c. Syntax-Semantics Interface for Lexical Inflection with the Language of Acyclic Recursion. In Bel-Enguix, G., Dahl, V., and Jiménez-López, M. D., editors, Biology, Computation and Linguistics, volume 228 of Frontiers in Artificial Intelligence and Applications, pages 215–236. IOS Press, Amsterdam; Berlin; Tokyo; Washington, DC. ISBN 978-1-60750-761-1.

Loukanova, R., 2012a. Algorithmic Semantics of Ambiguous Modifiers by the Type Theory of Acyclic Recursion. In Web Intelligence and Intelligent Agent Technology, IEEE/WIC/ACM International Conference, volume 3, pages 117–121. IEEE Computer Society, Los Alamitos, CA, USA.

Loukanova, R., 2012b. Semantic Information with Type Theory of Acyclic Recursion. In Huang, R., Ghorbani, A. A., Pasi, G., Yamaguchi, T., Yen, N. Y., and Jin, B., editors, Active Media Technology - 8th International Conference, AMT 2012, Macau, China, December 4-7, 2012. Proceedings, volume 7669 of Lecture Notes in Computer Science, pages 387–398. Springer.

Loukanova, R., 2013a. Algorithmic Granularity with Constraints. In Imamura, K., Usui, S., Shirao, T., Kasamatsu, T., Schwabe, L., and Zhong, N., editors, Brain and Health Informatics, volume 8211 of Lecture Notes in Computer Science, pages 399–408. Springer International Publishing.

Loukanova, R., 2013b. Algorithmic Semantics for Processing Pronominal Verbal Phrases. In Larsen, H. L., Martin-Bautista, M. J., Vila, M. A., Andreasen, T., and Christiansen, H., editors, Flexible Query Answering Systems, volume 8132 of Lecture Notes in Computer Science, pages 164–175. Springer Berlin Heidelberg.

Loukanova, R., 2013c. A Predicative Operator and Underspecification by the Type Theory of Acyclic Recursion. In Duchier, D. and Parmentier, Y., editors, Constraint Solving and Language Processing, volume 8114 of Lecture Notes in Computer Science, pages 108–132. Springer Berlin Heidelberg.

Loukanova, R., 2014. Situation Theory, Situated Information, and Situated Agents. In Nguyen, N. T., Kowalczyk, R., Fred, A., and Joaquim, F., editors, Transactions on Computational Collective Intelligence XVII, volume 8790 of Lecture Notes in Computer Science, pages 145–170. Springer, Berlin, Heidelberg.

Loukanova, R., 2016. Relationships between Specified and Underspecified Quantification by the Theory of Acyclic Recursion. ADCAIJ: Advances in Distributed Computing and Artificial Intelligence Journal, 5(4):19–42. ISSN 2255-2863.

Loukanova, R., 2017. Typed Theory of Situated Information and its Application to Syntax-Semantics of Human Language. In Christiansen, H., Jiménez-López, M. D., Loukanova, R., and Moss, L. S., editors, Partiality and Underspecification in Information, Languages, and Knowledge, pages 151–188. Cambridge Scholars Publishing.

Loukanova, R., 2019a. Computational Syntax-Semantics Interface with Type-Theory of Acyclic Recursion for Underspecified Semantics. In Osswald, R., Retoré, C., and Sutton, P., editors, IWCS 2019 Workshop on Computing Semantics with Types, Frames and Related Structures. Proceedings of the Workshop, pages 37–48. The Association for Computational Linguistics (ACL), Gothenburg, Sweden.

Loukanova, R., 2019b. Gamma-Reduction in Type Theory of Acyclic Recursion. Fundamenta Informaticae, 170(4):367–411. ISSN 0169-2968 (P) 1875-8681 (E).

Loukanova, R., 2019c. Gamma-Star Canonical Forms in the Type-Theory of Acyclic Algorithms. In van den Herik, J. and Rocha, A. P., editors, Agents and Artificial Intelligence, pages 383–407. Springer International Publishing, Cham.

Loukanova, R., 2020a. Algorithmic Eta-Reduction in Type-Theory of Acyclic Recursion. In Rocha, A., Steels, L., and van den Herik, J., editors, Proceedings of the 12th International Conference on Agents and Artificial Intelligence (ICAART 2020), volume 2, pages 1003–1010. INSTICC, CITEPRESS – Science and Technology Publications, Lda. ISBN 978-989-758-395-7.

Loukanova, R., 2020b. Type-Theory of Acyclic Algorithms for Models of Consecutive Binding of Functional Neuro-Receptors. In Grabowski, A., Loukanova, R., and Schwarzweller, C., editors, AI Aspects in Reasoning, Languages, and Computation, volume 889, pages 1–48. Springer International Publishing, Cham. ISBN 978-3-030-41425-2.

Loukanova, R., 2021. Type-Theory of Parametric Algorithms with Restricted Computations. In Dong, Y., Herrera-Viedma, E., Matsui, K., Omatsu, S., González Briones, A., and Rodríguez González, S., editors, Distributed Computing and Artificial Intelligence, 17th International Conference, pages 321–331. Springer International Publishing, Cham. ISBN 978-3-030-53036-5.

Loukanova, R., to appear. Eta-Reduction in Type-Theory of Acyclic Recursion.

Ludlow, P., 2021. Descriptions. In Zalta, E. N., editor, The Stanford Encyclopedia of Philosophy. Metaphysics Research Lab, Stanford University, Fall 2021 edition.

Moschovakis, Y. N., 1989. The formal language of recursion. Journal of Symbolic Logic, 54(4):1216–1252.

Moschovakis, Y. N., 1993. Sense and denotation as algorithm and value. In Oikkonen, J. and Väänänen, J., editors, Logic Colloquium ’90: ASL Summer Meeting in Helsinki, volume Volume 2 of Lecture Notes in Logic, pages 210–249. Springer-Verlag, Berlin.

Moschovakis, Y. N., 1997. The logic of functional recursion. In Dalla Chiara, M. L., Doets, K., Mundici, D., and van Benthem, J., editors, Logic and Scientific Methods, volume 259, pages 179–207. Springer, Dordrecht.

Moschovakis, Y. N., 2006. A Logical Calculus of Meaning and Synonymy. Linguistics and Philosophy, 29(1):27–89. ISSN 1573-0549.

Mostowski, A., 1957. On a generalization of quantifiers. Fundamenta Mathematicae, 1(44):12–36.

Russell, B., 1905. On Denoting. Mind, 14(56):479–493. ISSN 00264423, 14602113.

Strawson, P. F., 1950. On Referring. Mind, 59(235):320–344. ISSN 00264423, 14602113.

Thomason, R. H., editor, 1974. Formal Philosophy: Selected Papers of Richard Montague. Yale University Press, New Haven, Connecticut.