Abstract
Compare first-order functional programs with higher-order 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, higher-order values may be first-order 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: second-order
programs are more powerful than first-order, since a function f of type [Bool]-〉Bool is
computable by a cons-free first-order functional program if and only if f is in PTIME, whereas
f is computable by a cons-free second-order program if and only if f is in EXPTIME. Exact
characterizations are given for those problems of type [Bool]-〉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.
Publisher
Cambridge University Press (CUP)
Cited by
72 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Declassification Policy for Program Complexity Analysis;Proceedings of the 39th Annual ACM/IEEE Symposium on Logic in Computer Science;2024-07-08
2. Polynomial Time and Dependent Types;Proceedings of the ACM on Programming Languages;2024-01-05
3. Asymptotic speedup via effect handlers;Journal of Functional Programming;2024
4. Origami: (un)folding the Abstraction of Recursion Schemes for Program Synthesis;Genetic and Evolutionary Computation;2024
5. A General Noninterference Policy for Polynomial Time;Proceedings of the ACM on Programming Languages;2023-01-09