halting problem I've got more questions



hi

After thinking more about it, I've got more problems then before. I've
looked at several versions of the halting problem argument. Most of
them are in C language. after some thought, it's clearly not right.
(because C is not interpreted, and a function is different from a
program.)
I've tred to it in bash version, but still it doesn't work. Now the
only option is to do it in scheme or lisp. any thought?

will_it_halt.sh
# usage: will_it_halt.sh program.sh input.txt
# if program.sh halts prints TRUE
# else prints FALSE

#!/bin/bash
# try_this.sh
RESULT=`will_it_halt.sh $1 $2`
if [ "$RESULT" = "TRUE" ] ; then
while [ "1" = "1" ] ; do
i = i + 1
done
else
echo TRUE
fi

try_this.sh try_this.sh try_this.sh

my problem is with do I feed the code with "the program" or "the
program plus the machine or the interpreter"? there is clearly a
distinction between them.

.



Relevant Pages

  • Re: Avoiding an Infinite Loop in Arbitrary eval(user_code)
    ... Short of writing a javascript-in-javascript interpreter, ... an algorithm to be written for a universal solution of the Halting Problem. ... I could, for example, solve this problem by writing a javascript ... Whether or not they have considered it as an attack vector is ...
    (comp.lang.javascript)
  • Re: In search of the perfect Disassembler
    ... line decoder and interpreter are finished already. ... |> existing piece of code were the halting problem can be watched. ... |> Seems it belongs to theoretical, abstract languages only. ...
    (alt.lang.asm)