Reverse Engineering for matlab code?

Hi,
I want to create a flow diagram for my matlab code. Is there a tool out there which can do reverse engineering and help create the flow diagram?
Thanks

댓글 수: 12

José-Luis
José-Luis 2014년 10월 1일
I don't get it. Matlab is not a compiled language. What do you mean by reverse-engineer? Don't you have the .m file?
dpb
dpb 2014년 10월 1일
Not aware of one, but do a search at the File Exchange and see if are any submissions there...leftmost link at top of this page...
Neesha
Neesha 2014년 10월 1일
ok,thanks
David Young
David Young 2014년 10월 1일
편집: David Young 2014년 10월 1일
José-Luis: MATLAB is a compiled language. But Neesha wants, I think, to reverse-engineer from the m-file to a more abstract or graphical description.
José-Luis
José-Luis 2014년 10월 1일
편집: José-Luis 2014년 10월 1일
No, it is not compiled. It is interpreted. At least most of it is, unless we start talking JIT.
Matlab is NOT directly transformed into machine code, which is the definition of a compiled language as far as I understand it.
Guillaume
Guillaume 2014년 10월 1일
Way off topic, but compiled does not necessary mean machine code. See .Net languages which are compiled into the CIL (bytecode) which is only translated at runtime into machine code by the CLR.
Java works the same way.
José-Luis
José-Luis 2014년 10월 1일
편집: José-Luis 2014년 10월 1일
Guillaume
Guillaume 2014년 10월 1일
That page actually confirms what I said, It does say that C# is compiled to bytecode (proper name is CIL). It also kind of contradict itself, as it categorises that as hybrid higher up.
dpb
dpb 2014년 10월 1일
It's a murky page at best. The best imo portion of it is at the very top where it says a combination of both solutions is also increasingly common: a compiler can translate the source code into some intermediate form (often called bytecode), which is then passed to an interpreter which executes it.
In my book that is still not really "compiled" and by that definition Matlab is one of those and doesn't qualify as a compiled language (and I note it's not in the list on down of those the article claims are altho I've some serious objections with quite a few on the list for the same reason).
José-Luis
José-Luis 2014년 10월 1일
편집: José-Luis 2014년 10월 1일
This discussion is verging to semantics. I would normally leave it at that, but I am frustrated trying to decipher some Fortran code plagued with globals so I'll keep on arguing.
Whether you are right or wrong depends on how you define things. I have always understood a compiled language to be one that directly transforms text to machine code, using a compiler. Ergo not Matlab. Ergo not even C# as CIL is not machine code and needs another step of translation.
Matlab is, at most, an hybrid between interpreted and compiled. Just try running Matlab without the Java runtime.
Anyway, this all depends on how you define things and is way beyond the scope of what the OP asked.
dpb
dpb 2014년 10월 1일
I agree completely with your version of semantics...fwiw which ain't a lot! :)
For Fortran, look at the Understand for Fortran product from SciTools https://scitools.com/. I've successfully used it on grossly sphaghettified code. It's pricey, but they have a fully functional demo that you can use on a single project for like 15 day or so which is generally enough with it to get thru the rough patches on anything that isn't truly humongous in size.
José-Luis
José-Luis 2014년 10월 2일
Thanks for the tip. I'll check it out.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

질문:

2014년 10월 1일

댓글:

2014년 10월 2일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by