top | item 32822909

(no title)

alexmingoia | 3 years ago

Can you give an example of why you need non-terminating semantics? Programs can still be run "forever", if they are run for each input while maintaining terminating semantics for deriving output. Abstractly the Turing machine is infinite, but in the real world input and output is almost always finite and discrete.

I guess you wouldn't be able to use it to build a machine that is supposed to display Pi or Fibinocci?

discuss

order

AnimalMuppet|3 years ago

Here's a CPU that controls an automobile engine. Inputs are the position of the throttle, and the rotational position of the crankshaft. Outputs are instructions to the fuel injector and the timing of spark plugs firing.

You can terminate that program when the user turns the engine off.

Or, you can say the program should consist of "read the stored state, re-configure the fuel injectors, fire a spark plug if one is supposed to fire now, update the stored state, and terminate". You could say that it should be written that way. But when you do, you've got a bunch of cynical old embedded software people saying, "Explain to me how that is better in any way? Does it make the program easier to write? No, it doesn't. Does it make it less error prone? More reliable? No and no. Does it make it use fewer resources? Also no. So why in the world do we want to write it that way?"