[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Stumper



An entity claiming to be Blake Winton (bwinton@tor.dhs.org) wrote:
: * Mark Rogaski <wendigo@pobox.com> [010316 08:33]:
: > An entity claiming to be Piers Cawley (pdcawley@bofh.org.uk) wrote:
: > : Isn't this a halting problem issue?
: > : foo { bar() if bar() && bar() };
: > : How many times does bar get run?
: > I had wondered that myself, but I don't think it is.
: 
: I think I disagree.  If I've got a program that can tell me
: how many times a function will be called, then I can create
: a new program which contains the old program, followed by
: the function "doesThisGetRun()".  If the old program halts,
: then the function will run once, otherwise, it will never run.
: 

We're not testing whether bar() halts, but whether two funtions are
identical.  Function identity is an instance of the halting problem.
However, since we're not using anonymous functions, we don't have to
compare mappings for the entire domain, but rather the unique identifier of
a function.  In essence, we are comparing the encoding of the function
rather than the function itself.

Mark

-- 
[]                   | "Girls in occupied countries always
[] Mark Rogaski      | get into trouble with soldiers," she
[] wendigo@pobox.com | said, when I asked her what the Virgin
[]                   | birth was.  -- Florence King, CoaFSL

PGP signature