Software Musings

Chilli with a Side-Order of Syntax

Posted on: 15/04/2007

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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

April 2007
M T W T F S S
« Mar   May »
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Disclaimer

The author of this blog used to be an employee of Nortel. Even when he worked for Nortel the views expressed in the blog did not represent the views of Nortel. Now that he has left, the chances are even smaller that his views match those of Nortel.
%d bloggers like this: