Script Analysis

Richard Gaskin ambassador at fourthworld.com
Sat Nov 16 02:37:01 EST 2002


Jan Schenkel wrote:

> It's nice to see my name used in these listson a
> regular basis, but it was Monte Goulding who came up
> with the original question :-)
> 4W_UmbrellaMan can indeed prove very useful in
> tracking down the flow of a script, but as I said, it
> shows the flow in _one_ instance.
> 
> How would you do a 'cold' check of the following
> script-snippet and tell what is going to happen?
> 
> on myObfuscatedHandler pParam1, pParam2, pParam3
> global gSomeGLobal,gOtherGlobal
> switch pParam1
> case "some"
> put field gSomeGlobal into tTarget
> put "someMessage" into tMessage
> put "call" into tMethod
> break
> case "other"
> put field (gOtherGlobal&pParam3) into \
> tTarget
> put "otherMessage" && pParam3 into tMessage
> put "send" into tMethod
> break
> default
> return "error: pFirstParam must be some or other"
> break
> end switch
> do tMethod && tMessage && "to" && tTarget && \
> "in" && pParam3 && "seconds"
> end myObfuscatedHandler
> 
> Have fun writing an analyser for that ; only debugging
> this step by step can assure you of its correctness,
> and even then only in your test-cases.
> What would be kind of nice in that department is a
> system that keeps track of which pieces of code have
> not run yet.

That would need to be handled deeper in the engine, but it should be doable
and would be very desirable.

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Developer of WebMerge 2.0: Publish any database on any site
 ___________________________________________________________
 Ambassador at FourthWorld.com       http://www.FourthWorld.com
 Tel: 323-225-3717                       AIM: FourthWorldInc




More information about the use-livecode mailing list