Results 1  10
of
15
The Expressive Power of Higherorder Types or, Life without CONS
, 2001
"... Compare firstorder functional programs with higherorder programs allowing functions as function parameters. Can the the first program class solve fewer problems than the second? The answer is no: both classes are Turing complete, meaning that they can compute all partial recursive functions. In pa ..."
Abstract

Cited by 30 (1 self)
 Add to MetaCart
Compare firstorder functional programs with higherorder programs allowing functions as function parameters. Can the the first program class solve fewer problems than the second? The answer is no: both classes are Turing complete, meaning that they can compute all partial recursive functions. In particular, higherorder values may be firstorder simulated by use of the list constructor ‘cons’ to build function closures. This paper uses complexity theory to prove some expressivity results about small programming languages that are less than Turing complete. Complexity classes of decision problems are used to characterize the expressive power of functional programming language features. An example: secondorder programs are more powerful than firstorder, since a function f of type &lsqb;Bool&rsqb;〉Bool is computable by a consfree firstorder functional program if and only if f is in PTIME, whereas f is computable by a consfree secondorder program if and only if f is in EXPTIME. Exact characterizations are given for those problems of type &lsqb;Bool&rsqb;〉Bool solvable by programs with several combinations of operations on data: presence or absence of constructors; the order of data values: 0, 1, or higher; and program control structures: general recursion, tail recursion, primitive recursion.
Higher Type Recursion, Ramification and Polynomial Time
 Annals of Pure and Applied Logic
, 1999
"... It is shown how to restrict recursion on notation in all finite types so as to characterize the polynomial time computable functions. The restrictions are obtained by enriching the type structure with the formation of types !oe, and by adding linear concepts to the lambda calculus. 1 Introduction ..."
Abstract

Cited by 28 (3 self)
 Add to MetaCart
(Show Context)
It is shown how to restrict recursion on notation in all finite types so as to characterize the polynomial time computable functions. The restrictions are obtained by enriching the type structure with the formation of types !oe, and by adding linear concepts to the lambda calculus. 1 Introduction Recursion in all finite types was introduced by Hilbert [9] and later became known as the essential part of Godel's system T [8]. This system has long been viewed as a powerful scheme unsuitable for describing small complexity classes such as polynomial time. Simmons [16] showed that ramification can be used to characterize the primitive recursive functions by higher type recursion, and Leivant and Marion [14] showed that another form of ramification can be used to restrict higher type recursion to PSPACE. However, to characterize the much smaller class of polynomialtime computable functions by higher type recursion, it seems that an additional principle is required. By introducing linear...
Safe recursion with higher types and BCKalgebra
 Annals of Pure and Applied Logic
, 2000
"... In previous work the author has introduced a lambda calculus SLR with modal and linear types which serves as an extension of BellantoniCook's function algebra BC to higher types. It is a step towards a functional programming language in which all programs run in polynomial time. In this paper ..."
Abstract

Cited by 26 (3 self)
 Add to MetaCart
(Show Context)
In previous work the author has introduced a lambda calculus SLR with modal and linear types which serves as an extension of BellantoniCook's function algebra BC to higher types. It is a step towards a functional programming language in which all programs run in polynomial time. In this paper we develop a semantics of SLR using BCKalgebras consisting of certain polynomialtime algorithms. It will follow from this semantics that safe recursion with arbitrary result type built up from N and ( as well as recursion over trees and other data structures remains within polynomial time. In its original formulation SLR supported only natural numbers and recursion on notation with first order functional result type. 1 Introduction In [10] and [11] we have introduced a lambda calculus SLR which generalises the BellantoniCook characterisation of PTIME [2] to higherorder functions. The separation between normal and safe variables which is crucial to the BellantoniCook system has been achieved...
A mixed modal/linear lambda calculus with applications to BellantoniCook safe recursion
, 1998
"... . This paper introduces a simplytyped lambda calculus with both modal and linear function types. Through the use of subtyping extra term formers associated with modality and linearity are avoided. We study the basic metatheory of this system including existence and inference of principal types. The ..."
Abstract

Cited by 19 (7 self)
 Add to MetaCart
. This paper introduces a simplytyped lambda calculus with both modal and linear function types. Through the use of subtyping extra term formers associated with modality and linearity are avoided. We study the basic metatheory of this system including existence and inference of principal types. The system serves as a platform for certain higherorder generalisations of BellantoniCook's function algebra capturing polynomial time using a separation of the variables into "safe" and "normal" ones. The distinction between and the syntactic restrictions involved with the safe and normal variables in the BellantoniCook framework are captured by the modal function space and the associated typing rules. The linear function spaces on the other hand are used to enable a certain form of primitive recursion with functional result type which is conservative over polynomial time. The proofs associated with these applications are based on an interpretation of the lambda calculus in a categorytheor...
An Application of CategoryTheoretic Semantics to the Characterisation of Complexity Classes Using HigherOrder Function Algebras
, 1997
"... We use the category of presheaves over PTIMEfunctions in order to show that Cook and Urquhart's higherorder function algebra PV ! defines exactly the PTIMEfunctions. As a byproduct we obtain a syntaxfree generalisation of PTIMEcomputability to higher types. By restricting to sheaves for ..."
Abstract

Cited by 11 (6 self)
 Add to MetaCart
We use the category of presheaves over PTIMEfunctions in order to show that Cook and Urquhart's higherorder function algebra PV ! defines exactly the PTIMEfunctions. As a byproduct we obtain a syntaxfree generalisation of PTIMEcomputability to higher types. By restricting to sheaves for a suitable topology we obtain a model for intuitionistic predicate logic with \Sigma b 1 induction over PV ! and use this to reestablish that the provably total functions in this system are in polynomial time computable. Finally, we apply the categorytheoretic approach to a new higherorder extension of BellantoniCook's system BC of safe recursion. 1 Introduction Cook and Urquhart's system PV ! [3] is a simplytyped lambda calculus providing constants to denote natural numbers and an operator for bounded recursion on notation like in Cobham's characterisation of polynomialtime computability. 1 Although functionals of arbitrary type can be defined in this system one can show that thei...
Semantics of Linear/modal Lambda Calculus
 Journal of Functional Programming
, 1998
"... In previous work the author has introduced a lambda calculus SLR with modal and linear types which serves as an extension of BellantoniCook's function algebra BC to higher types. It is a step towards a functional programming language in which all programs run in polynomial time. While this pre ..."
Abstract

Cited by 5 (2 self)
 Add to MetaCart
(Show Context)
In previous work the author has introduced a lambda calculus SLR with modal and linear types which serves as an extension of BellantoniCook's function algebra BC to higher types. It is a step towards a functional programming language in which all programs run in polynomial time. While this previous work was concerned with the syntactic metatheory of SLR in this paper we develop a semantics of SLR in terms of Chu spaces over a certain category of sheaves from which it follows that all expressible functions are indeed in PTIME. We notice a similarity between the Chu space interpretation and CPS translation which as we hope will have further applications in functional programming. 1 Introduction In [10] we have introduced a lambda calculus SLR which generalises the BellantoniCook characterisation of PTIME [4] to higherorder functions. The separation between normal and safe variables which is crucial to the BellantoniCook system has been achieved by way of an S 4 modality on types. ...