HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

An imperative program is analogous to how a Turing machine works?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
analogousprogramworksimperativehowturingmachine

Problem

Since Turing machines has great influence on typical hardware architecture (Von Neumann) and both uses concept of state, is correct to say that an imperative program is analogous to how a Turing machine works?


“Computability via Turing machines gave rise to imperative
programming. Computability described via λ-calculus gave rise to
functional programming.” — Cooper, S. B., Leeuwen, J. (2013) . Alan
Turing: His Work and Impact.

And


"Imperative programming languages such as Fortran, Pascal etcetera as
well as all the assembler languages are based on the way a Turing
machine is instructed: by a sequence of statements." - Barendregt, H.,
Barendsen, E. (2000) . Introduction to Lambda Calculus

Solution

At a high enough level and when contrasted with functional programming, sure. Turing machine models and imperative programs have in common that they start from an input and take a series of steps that change a state stored in memory, ending with some output.

This contrasts with lambda calculus and functional programming which generally and loosely do not have the above features.

I think reading any more into the comparison than this, or trying to take it any farther, is probably a mistake. As Yuval says, Turing machines are quite different from modern machines and program execution environments.

Context

StackExchange Computer Science Q#65477, answer score: 4

Revisions (0)

No revisions yet.