Z
Variable Constant
The programmer merely specifies the logic, he doesn't execute it.
At no point does the programmer logically argue his way through all the situations that occur in the day-to-day running of the machine. That's why he designed it - to save humans the labour of having to do this.
They do infer because that's all inference is. Computers, in fact, prove that logical inference is purely mechanical. Not that anyone has needed proof for hundreds of years now.
Bingo.
Humans build machines. They arrange the matter in such a way that the matter has a system for doing logic. Humans design it - so humans build the underlying logical system. Then machines do the logic.
Now step back a level - where did the human get this logical system? It was built into them via education. Each person who does logic was taught to do so by a prior person.
Yet at some points, a few had to figure it out on their own from trial and error.
The initial beginnings of logic occured when the first protolife figured out how to tend to its basic needs... or, more to the point, when the first protolife survived because its automatic mechanistic behaviors acted as a purely accidental logic-gate, allowing it to gain what it needed and survive.
Over billions of years, these accidental combinations of logic-gates have combined and recombined, and resulted in a myriad of life on earth. But unlike deliberately built and designed logic machines, these are much more random and inconsistant in their design. They often run a single signal down multiple paths.
Consider the visual signal. The eye captures light and movement information, and sends it down bundles of nerves, through the amydgala (sp?) (allowing us to become afraid of something before we even 'see' it), into the visual cortex, then around into the prefrontal lobes (where awareness first occurs). All this, along dozens of pathways - some redundant. Some information is lost. Some is inserted from the memory core. Some information goes other places, from time to time. And all of this information travel occurs along pathways that have formed in slipshod patterns over extensive times.
It's like taking circuits and transistors and stuff, and randomly sticking them into boards again and again, and keeping the ones that let electricity go somewhere. After a while, you'll probably get a computer out of it. But it may not seem a very logical computer. You might get it to say that 2+2=4, or 11, or 9.112, or green, or Norkkwess. You might have to teach it about 2+2 and its resulting quadrology. You might have an autistic computer who insists 2+2=blue, no matter what.
I'm 100% certain we will make intelligent, cognitive, conscious artificial life... unless we die off first. And believe me, that life - will definitely 'do logic'.
After all, we already have created artificial proto-life that does logic...