MvGulik Posted August 31, 2011 Posted August 31, 2011 Just thinking/working on some source code recursion scanner. (nothing fancy, just a basic potential problem locator/scanner) But I'm kinda at a loss at finding a nice or good way go about is. Steps that passed my mind. - Find all function(definitions) names. [working] - Get hold of function code. (from full source) [working] - Scan function code for calls to other function. [initial scan: working] At this point I got array(s) with: - User-function(def) names. - User-function(unique) call count from that function. (+names of those calls) Here is where I kinda run out of ideas. Probably just need some more time to come up with something ... "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ...
MvGulik Posted September 3, 2011 Author Posted September 3, 2011 (edited) ... almost done with initial working version by the looks of it. Mmm, If you like me to test run it on your code. Prep link, to source, in zip. (unless its some small code case.) (normal function calls support only. So 'OtherFunction' in (for example) AdlibRegister("OtherFunction") are ignored.) Edited September 3, 2011 by iEvKI3gv9Wrkd41u "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ...
monoscout999 Posted September 3, 2011 Posted September 3, 2011 So... you can search the function in the script, but you can not find the function called inside the function?... the /striponly parameter of the offucscator will find all the function used and put it in the script, maybe you can look the way that the ofuscator do his things to find out that.
MvGulik Posted September 3, 2011 Author Posted September 3, 2011 (edited) ... but you can not find the function called inside the function?No silly. I just did not spend any time on scanning for function call's that are made from things like GUICtrlSetOnEvent(<CTRL-ID>, "function") or AdlibRegister("function").When things are working ok, adding that part should not be a problem. But its currently not a priority to me. (ergo: not supported (yet))---But, yea ... description of the function call type's I was revering to was truly unclear. Edited September 3, 2011 by iEvKI3gv9Wrkd41u "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ...
monoscout999 Posted September 4, 2011 Posted September 4, 2011 Sorry but my english in not very good and sometimes i can not undertand the meaning :S can you be more clear?
MvGulik Posted September 4, 2011 Author Posted September 4, 2011 (edited) Not sure if 'I' can be more clearer ... trying anyway. The code target(idea) is to look for possible/potential function call paths that can be taken inside a given code source. With the initial idea to detect/locate function-call recursion/loops, spanning multiple functions. But I imaging the data might also be used for other things. Like creation a flow-chart displaying the function links ... But I suck at the data management that is involved with tree-like data collections. So the last part is somewhat the core of the OP question. Example: (from a previous test run.) Paths found.A>B1>C1:[END] A>B1>C2>C1:[END] A>B2>D1:[END] A>B2>D2>D1:[END] A>B2>D3>D2>D1:[END]Based on the following test-code setup.Func A() B1() B2() EndFunc Func B1() C1() C2() EndFunc Func B2() D1() D2() D3() EndFunc Func C1() ;; terminator. EndFunc Func C2() C1() EndFunc Func D1() ;; terminator. EndFunc Func D2() D1() EndFunc Func D3() D2() EndFunc - Currently trying to get rid of the issues that surfaced when test running it on some real source codes. --- Got tangled up in the data management I used ... need to take a step back and take a other look at it. (progress on hold) Edited September 6, 2011 by iEvKI3gv9Wrkd41u "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now