[identity profile] http://users.livejournal.com/_rowan_tree_/ 2007-01-07 03:11 pm (UTC)(link)
Slowly from the beginning: in order to determine whether a program compiles correctly you need to determine whether the compiler halts on that program which is undecidable.

[identity profile] anhinga-anhinga.livejournal.com 2007-01-07 03:56 pm (UTC)(link)
OK :-)

So what I wrote in my answer to Cema, is that

1) It depends on the particular type system, for some of them (Standard ML) it is decidable, but the compiter does not terminate in any practically reasonable time/space, so it still "loops" in practice;

2) It is not clear whether one can covert a magic instant solver of the halting problem (a "Turing oracle") into a practical solver for the actual outcome of the type inference (since the termination can be of two types: "validated" and "error found").

***************************************

There is also the third type of possible eqiuvalence here, which is also not clear. The question is, given an oracle solving system F, can we obtain the solution of halting problem (without specific complexity constraints)? I don't know the answer to that either..

[identity profile] anhinga-anhinga.livejournal.com 2007-01-07 04:31 pm (UTC)(link)
I don't remember enough of the proof for system F to say whether halting problem reduces to it, although usually the proofs are made in such a fashion that it would, and then, in the third sense, we would have an equivalence..

BTW, if we know that type inference for a program in system F nonterminates, does this tell us anything about the program?

[identity profile] anhinga-anhinga.livejournal.com 2007-01-07 05:40 pm (UTC)(link)
> 2) It is not clear whether one can covert a magic instant solver of the halting problem (a "Turing oracle") into a practical solver for the actual outcome of the type inference (since the termination can be of two types: "validated" and "error found").

Actually, this is doable -- one just considers a modified program: which loops, if the original one gave the "error found" answer, or, alternatively, which loops, if the original one gave the "validated" answer, and apply the oracle to those.. Cool!