Skip to main content Accessibility help
×
Hostname: page-component-77c89778f8-m8s7h Total loading time: 0 Render date: 2024-07-17T10:24:18.489Z Has data issue: false hasContentIssue false

2 - Computability

from Part 1 - Functions and Foundations

Published online by Cambridge University Press:  05 June 2012

John C. Mitchell
Affiliation:
Stanford University, California
Get access

Summary

Some mathematical functions are computable and some are not. In all general-purpose programming languages, it is possible to write a program for each function that is computable in principle. However, the limits of computability also limit the kinds of things that programming language implementations can do. This chapter contains a brief overview of computability so that we can discuss limitations that involve computability in other chapters of the book.

PARTIAL FUNCTIONS AND COMPUTABILITY

From a mathematical point of view, a program defines a function. The output of a program is computed as a function of the program inputs and the state of the machine before the program starts. In practice, there is a lot more to a program than the function it computes. However, as a starting point in the study of programming languages, it is useful to understand some basic facts about computable functions.

The fact that not all functions are computable has important ramifications for programming language tools and implementations. Some kinds of programming constructs, however useful they might be, cannot be added to real programming languages because they cannot be implemented on real computers.

Expressions, Errors, and Nontermination

In mathematics, an expression may have a defined value or it may not. For example, the expression 3 + 2 has a defined value, but the expression 3/0 does not.

Type
Chapter
Information
Publisher: Cambridge University Press
Print publication year: 2002

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • Computability
  • John C. Mitchell, Stanford University, California
  • Book: Concepts in Programming Languages
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511804175.003
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • Computability
  • John C. Mitchell, Stanford University, California
  • Book: Concepts in Programming Languages
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511804175.003
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • Computability
  • John C. Mitchell, Stanford University, California
  • Book: Concepts in Programming Languages
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511804175.003
Available formats
×