Divergence (computer science)

From Wikipedia, the free encyclopedia
(Redirected from Terminating)
Jump to navigation Jump to search

In computer science, a computation is said to diverge if it does not terminate or terminates in an exceptional state.[1]: 377  Otherwise it is said to converge.[citation needed] In domains where computations are expected to be infinite, such as process calculi, a computation is said to diverge if it fails to be productive (i.e. to continue producing an action within a finite amount of time).

Definitions

[edit | edit source]

Various subfields of computer science use varying, but mathematically precise, definitions of what it means for a computation to converge or diverge.

Rewriting

[edit | edit source]

In abstract rewriting, an abstract rewriting system is called convergent if it is both confluent and terminating.[2]

The notation tn means that t reduces to normal form n in zero or more reductions, t↓ means t reduces to some normal form in zero or more reductions, and t↑ means t does not reduce to a normal form; the latter is impossible in a terminating rewriting system.

In the lambda calculus an expression is divergent if it has no normal form.[3]

Denotational semantics

[edit | edit source]

In denotational semantics an object function f : AB can be modelled as a mathematical function f:A{}B{} where ⊥ (bottom) indicates that the object function or its argument diverges.

Concurrency theory

[edit | edit source]

In the calculus of communicating sequential processes (CSP), divergence occurs when a process performs an endless series of hidden actions.[4] For example, consider the following process, defined by CSP notation: Clock=tickClock The traces of this process are defined as: traces(Clock)={,tick,tick,tick,}={tick}* Now, consider the following process, which hides the tick event of the Clock process: P=Clocktick As P cannot do anything other than perform hidden actions forever, it is equivalent to the process that does nothing but diverge, denoted 𝐝𝐢𝐯. One semantic model of CSP is the failures-divergences model, which refines the stable failures model by distinguishing processes based on the sets of traces after which they can diverge.

See also

[edit | edit source]

Notes

[edit | edit source]
  1. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  2. ^ Baader & Nipkow 1998, p. 9.
  3. ^ Pierce 2002, p. 65.
  4. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).

References

[edit | edit source]