Programming Computable Functions
In computer science, Programming Computable Functions, or Programming with Computable Functions, or Programming language for Computable Functions, is a programming language which is typed and based on functional programming, introduced by Gordon Plotkin in 1977, based on prior unpublished material by Dana Scott. It can be considered as an extended version of the typed lambda calculus, or a simplified version of modern typed functional languages such as ML or Haskell.
A fully abstract model for PCF was first given by Robin Milner. However, since Milner's model was essentially based on the syntax of PCF it was considered less than satisfactory. The first two fully abstract models not employing syntax were formulated during the 1990s. These models are based on game semantics and Kripke logical relations. For a time it was felt that neither of these models was completely satisfactory, since they were not effectively presentable. However, Ralph Loader demonstrated that no effectively presentable fully abstract model could exist, since the question of program equivalence in the finitary fragment of PCF is not decidable.
Syntax
The data types of PCF are inductively defined asnat is a type- For types σ and τ, there is a function type σ → τ
- Variables
- Application
- λ-abstraction
- The Y fixed point combinator
- The successor and predecessor operations on nat and the constant 0
- The conditional if with the typing rule:
Semantics
Denotational semantics
A relatively straightforward semantics for the language is the Scott model. In this model,- Types are interpreted as certain domains.
- *
- * is interpreted as the domain of Scott-continuous functions from to, with the pointwise ordering.
- A context is interpreted as the product
- Terms in context are interpreted as continuous functions
- * Variable terms are interpreted as projections
- * Lambda abstraction and application are interpreted by making use of the cartesian closed structure of the category of domains and continuous functions
- * Y is interpreted by taking the least [fixed point] of the argument