Self-modifying code

Steven Ryan smryan at garth.UUCP
Sun Jul 17 07:41:47 AEST 1988


>As to the semantics of self-modifying code, isn't it identical to
>a Turing machine's or am I missing something?

No. The state mechanism of a Turing machine is fixed and finite.

To show equivalence, it is necessary to show that self modifying code
does not increase the number of states. Usually, people just appeal
to Church-Turing and assume all the states are there, somewhere.

For something like a load and go compiler, since every possible program
is not hidden somewhere in the compiler, it would appear to escape CT.
However the compiled program can be regarded as a transformation of the
input tape into another region of the tape and its apparent execution
as an interpretation of the tape by the compiler/loader/cpu state machine.

Then again, if you believe really hard and clap your hands.....

                            sm ryan

----------------------------------
Hugh: Why does he carry a sword?
Fred: He has delusions of grandeur.
him:  Uh, Fred...
      (SWOOP)
Fred: YEEK
him:  ...before you make a value judgement about a person's delusions...
      (poink)
Fred: AWK! My head feathers!
him:  ...you'd better be absolutely sure they ARE delusions.
      (JAB)
Fred: OUCH!
                    -- Odd Bodkins



More information about the Comp.lang.c mailing list