7

I'm less interested in languages where you can write almost anything, but then are required to write an accompanying proof that what you wrote terminates.

I'm more interested in the design space of languages inherently confined to certain complexity classes by construction.

Is there any sort of theory hierarchy for sub-turing-complete languages?

Raphael
  • 73,212
  • 30
  • 182
  • 400
sfultong
  • 73
  • 3

2 Answers2

7

There are plenty of classes of programming languages where all programs terminate. The most common form of enforcing termination is by way of types. The most well-developed theory of typing systems for terminating computation might be that of Barendregt's Lambda cube, which decomposes typing into three orthogonal axes:

Starting from a terminating languages such as the simply typed $\lambda$-calculus, one can add any combination of those three axes and retain termination.

This has close connections with logic, via the Curry-Howard correspondence.

There are many extensions and refinements, including types that capture complexity classes.

Martin Berger
  • 8,358
  • 28
  • 47
5

Following Bellantoni & Cook's foundational work in A New Recursion-Theoretic Characterization of Polytime Functions, there's been a lot of work on simple characterizations of complexity classes by means of total languages, with strong connections to linear logic as Martin Berger notes in the comments.

Building on this work, other complexity classes have been characterized: Leivant and Marion have given characterizations of PSPACE and ELEM (that last one is particularly nice).

There's also been work on LOGSPACE, again with Leivant and Ramyaa.

It's a pretty exciting field, with a yearly conference!

cody
  • 8,427
  • 33
  • 64