🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #2523

Re: Self-modifying code

#2523
From: Bj|rn Lisper
Date: Wed, 11 Oct 1989 15:07
11 lines
1189 bytes
Self-modifying code can be seen as partial evaluation delayed to runtime.
Partial evaluation, in its cleanest form, is to use the knowledge of some
function arguments to simplify the function. Consider a function f(x,y) in
two arguments x,y. If we know the value of x, say that x=c, then we can
substitute c for x in the call f(c,y) and obtain a simplified "residual"
function fc(y). Usually this is done at compile-time. A prime example is
substitution of symbolic constants. Nothing prevents, however, that this is
done at runtime (if, for instance, x is not known before then), which then
results in self-modifying code.

Bjorn Lisper
Technical Details
Message-ID: <BJORNL.89Oct11160723@octopus.tds.kth.se>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!sunic!draken!bjornl
References: <1080@mipos3.intel.com> <48682@ricerca.UUCP> <236@bbxsda.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!sunic!draken!bjornl
From: bjornl@tds.kth.se (Bj|rn Lisper)
Newsgroups: comp.arch
Subject: Re: Self-modifying code
Message-ID: <BJORNL.89Oct11160723@octopus.tds.kth.se>
Date: 11 Oct 89 15:07:24 GMT
References: <1080@mipos3.intel.com> <48682@ricerca.UUCP> <236@bbxsda.UUCP>
Sender: news@nada.kth.se
Organization: The Royal Inst. of Technology (KTH), Stockholm, Sweden.
Lines: 11
In-reply-to: scott@bbxsda.UUCP's message of 10 Oct 89 22:03:57 GMT