Strict function

Strict function

A strict function in the denotational semantics of programming languages is a function f where f\left(\perp\right) = \perp. The entity \perp, called bottom, denotes an expression which does not return a normal value, either because it loops endlessly or because it aborts due to an error such as division by zero. A function which is not strict is called non-strict. A strict programming language is one in which user-defined functions are always strict.

Intuitively, non-strict functions correspond to control structures. Operationally, a strict function is one which always evaluates its argument, a non-strict function is one which may not evaluate some of its arguments. Functions having more than one parameter may be strict or non-strict in each parameter independently, as well as jointly strict in several parameters simultaneously.

As an example, the if-then-else expression of many programming languages may be thought of as a function of three parameters. This function is strict in its first parameter, since the function must know whether its first argument evaluates to true or to false before it can return; but it is non-strict in its second parameter, because (for example) if(false,\perp,1) = 1, as well as non-strict in its third parameter, because (for example) if(true,2,\perp) = 2. However, it is jointly strict in its second and third parameters, since if(true,\perp,\perp) = \perp and if(false,\perp,\perp) = \perp.

See also


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • Function-level programming — In computer science, function level programming refers to one of the two contrasting programming paradigms identified by John Backus in his work on programs as mathematical objects, the other being value level programming.In his 1977 Turing award …   Wikipedia

  • Strict (disambiguation) — The term strict can refer to:* Strict relational operators in mathematics * Strict functions in programming languages * Strict histories (or executions) in scheduling …   Wikipedia

  • Strict weak ordering — The 13 possible strict weak orderings on a set of three elements {a, b, c}. The only partially ordered sets are coloured, while totally ordered ones are in black. Two orderings are shown as connected by an edge if they differ by a single… …   Wikipedia

  • Strict differentiability — In mathematics, strict differentiability is a modification of the usual notion of differentiability of functions that is particularly suited to p adic analysis. In short, the definition is made more restrictive by allowing both points used in the …   Wikipedia

  • Function composition (computer science) — In computer science, function composition (not to be confused with object composition) is an act or mechanism to combine simple functions to build more complicated ones. Like the usual composition of functions in mathematics, the result of the… …   Wikipedia

  • Bent function — The 2 ary bent functions with Hamming weight 1 Their nonlinearity is …   Wikipedia

  • Primitive recursive function — The primitive recursive functions are defined using primitive recursion and composition as central operations and are a strict subset of the recursive functions (recursive functions are also known as computable functions). The term was coined by… …   Wikipedia

  • Convex function — on an interval. A function (in black) is convex if and only i …   Wikipedia

  • Monotonic function — Monotonicity redirects here. For information on monotonicity as it pertains to voting systems, see monotonicity criterion. Monotonic redirects here. For other uses, see Monotone (disambiguation). Figure 1. A monotonically increasing function (it… …   Wikipedia

  • Ackermann function — In recursion theory, the Ackermann function or Ackermann Péter function is a simple example of a general recursive function that is not primitive recursive. General recursive functions are also known as computable functions. The set of primitive… …   Wikipedia

Share the article and excerpts

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