FP (programming language)

FP (programming language)

Infobox programming language
name = FP
logo =
paradigm = function-level
year = 1977
designer = John Backus
developer =
latest release version =
latest release date =
typing =
implementations =
dialects =
influenced_by = APL
influenced = FL, J

FP (short for Function Programming) is a programming language created by John Backus to support the function-level programming paradigm. This allows for the elimination of named variables.

Overview

The values that FP programs map into one another comprise a set which is closed under sequence formation:

if x1,...,xn are values, then the sequencex1,...,xn〉 is also a value

These values can be built from any set of atoms: booleans, integers, reals, characters, etc.: boolean : {T, F} integer : {0,1,2,...,∞} character : {'a','b','c',...} symbol : {x,y,...}

is the undefined value, or bottom. Sequences are "bottom-preserving":

x1,...,,...,xn〉 =

FP programs are "functions" f that each map a single "value" x into another:

f:x represents the value that results from applying the function f to the value x

Functions are either primitive (i.e., provided with the FP environment) or are built from the primitives by program-forming operations (also called functionals).

An example of primitive function is constant, which transforms a value x into the constant-valued function . Functions are strict: f: =

Another example of a primitive function is the selector function family, denoted by 1,2,... where: 1:〈x1,...,xn〉 = x1 "i":〈x1,...,xn〉 = xi if 0 < "i" ≤ n = ⊥ otherwise

Functionals

In contrast to primitive functions, functionals operate on other functions. For example, some functions have a "unit" value, such as 0 for "addition" and 1 for "multiplication". The functional unit produces such a value when applied to a function f that has one: unit + = 0 unit &times; = 1 unit foo = ⊥

These are the core functionals of FP:

composition f°g where f°g:x = f:(g:x)

construction [f1,...fn] where [f1,...fn] :x = 〈f1:x,...,fn:x

condition (hf;g) where (hf;g):x = f:x if h:x = T = g:x if h:x = F = otherwise

apply-to-all"f where "α"f:〈x1,...,xn〉 = 〈f:x1,...,f:xn

insert-right /f where /f:〈x〉 = x and /f:〈x1,x2,...,xn〉 = f:〈x1,/f:〈x2,...,xn〉〉 and /f:〈 〉 = unit f

insert-left f where f:〈x〉 = x and f:〈x1,x2,...,xn〉 = f:〈f:〈x1,...,xn-1〉,xn〉 and f:〈 〉 = unit f

Equational functions

In addition to being constructed from primitives by functionals, a function may be defined recursively by an equation, the simplest kind being: f ≡ "E"fwhere "Ef is an expression built from primitives, other defined functions, and the function symbol f"' itself, using functionals.

ee also

* FL programming language (Backus' successor to FP)
* Function-level programming
* Programs as mathematical objects
* J programming language
* John Backus

References

* [http://www.stanford.edu/class/cs242/readings/backus.pdf Can Programming Be Liberated from the von Neumann Style?] Backus' Turing award lecture.


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • Programming language — lists Alphabetical Categorical Chronological Generational A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that… …   Wikipedia

  • Programming language theory — (commonly known as PLT) is a branch of computer science that deals with the design, implementation, analysis, characterization, and classification of programming languages and programming language features. It is a multi disciplinary field, both… …   Wikipedia

  • Programming Language Design and Implementation — (PLDI) is one of the ACM SIGPLAN s most important conferences. The precursor of PLDI was the Symposium on Compiler Optimization, held July 27–28, 1970 at the University of Illinois at Urbana Champaign and chaired by Robert S. Northcote. That… …   Wikipedia

  • Programming Language for Business — or PL/B is a business oriented programming language originally called DATABUS and designed by Datapoint in the early 1970s as an alternative to COBOL because its 8 bit computers could not fit COBOL into their limited memory, and because COBOL did …   Wikipedia

  • programming language — ➔ language * * * programming language UK US noun [C] ► COMPUTER LANGUAGE(Cf. ↑computer language) …   Financial and business terms

  • programming language — Language Lan guage, n. [OE. langage, F. langage, fr. L. lingua the tongue, hence speech, language; akin to E. tongue. See {Tongue}, cf. {Lingual}.] [1913 Webster] 1. Any means of conveying or communicating ideas; specifically, human speech; the… …   The Collaborative International Dictionary of English

  • Programming Language One — Programming Language One, oft als PL/I (auch PL/1, PL1 oder PLI) abgekürzt ist eine Programmiersprache, die in den 1960er Jahren von IBM entwickelt wurde. Die Bezeichnung PL/1 ist vor allem in Deutschland gebräuchlich. Ursprünglich wurde PL/I… …   Deutsch Wikipedia

  • Programming Language 1 — noun A computer programming language which combines the best qualities of commercial and scientific oriented languages (abbrev PL/1) • • • Main Entry: ↑programme …   Useful english dictionary

  • Programming Language —   [engl.], Programmiersprache …   Universal-Lexikon

  • Programming language specification — A programming language specification is an artifact that defines a programming language so that users and implementors can agree on what programs in that language mean.A programming language specification can take several forms, including the… …   Wikipedia

  • programming language — noun (computer science) a language designed for programming computers • Syn: ↑programing language • Topics: ↑computer science, ↑computing • Hypernyms: ↑artificial language …   Useful english dictionary

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”