Chilli with a Side-Order of Syntax
While standing in the queue for my Chilli Deal (with a white bun toasted and spread with a little garlic butter and a double chocolate muffin) at Tim Horton’s on Friday, a colleague, jhb, asked me a simple question, building on the discussion which led to my two previous blog postings.
Before we consider it, I perhaps ought to orient non-Canadian readers by mentioning that Tim Horton was an ice hockey player who, on retirement, founded a chain of coffee-and-doughnut shops across Canada. These have now branched out to providing simple meals like my Chilli Deal (again, for non-Canadians, perhaps I should explain that a “deal” is a pre-set combination of items that is together cheaper than the sum of its constituent parts).
Jhb’s question was this:
Given a computer loaded with a program, would it be possible to deduce the purpose of the program by inspection of the computer?
I quickly cleaned away the brushwood around this problem, determined that we were talking of a computer equivalent to a Turing machine running a program that completed in finite time, and found he wasn’t asking me to deduce the purpose the programmer had in mind in writing the program (e.g., “to impress the boss” or “to code something with as few lines as possible” or “to create a program that fails in order to test the exception handling system”). Instead he meant the actual purpose of the program itself.
Now it is clear that an analysis could lead to the transfer function between input and output spaces, the syntactical transformations that the program performs. Perhaps it would be possible to deduce from this the “purpose” of the program. If, for example, it were found that an input value of 0 gave an output value of 1, an input value of 1.570796327 gave an output of something very small and input values of plus or minus 0.7853981634 both gave an output value of 0.7071067812 then one could possibly deduce that the “purpose” of the program was to calculate the cosine of an angle. But perhaps not: further whitebox examination might shew that input values between 0.31 and 0.32 were treated specially. Such white-box checking would, of course, be just expediency: since the computer is digital the input space is finite and could, in principle, be handled exhaustively.
In summary, deducing what the program does would seem to be possible (I’m going to avoid questions of whether it ever halts) but deducing its purpose would seem to be impossible.
Having led me down the garden path to this conclusion on our walk back to the main dining area, jhb linked my answer to the Computational Theory of the Mind (CTM) I have been reading about in Jerry Fodor’s book, the mind doesn’t work that way—mentioned in a previous posting to this blog.
If the CTM is true (and note that Fodor doesn’t claim that it is anywhere close to being the complete truth) then psychology could be considered equivalent to deducing the purpose of jhb’s program.