Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relooper, Stackifier, decompiler problems #13

Open
kdabwl opened this issue Jun 15, 2022 · 3 comments
Open

Relooper, Stackifier, decompiler problems #13

kdabwl opened this issue Jun 15, 2022 · 3 comments
Labels
question Further information is requested

Comments

@kdabwl
Copy link

kdabwl commented Jun 15, 2022

Thank you for bringing the Relooper problem class to my attention (and indirectly the Stackifier problem class).
.
I had previously assumed that bytecode was "always" a 100% decompilable substitute for missing source code (100% identical, except temporary names), as is the case with Smalltalk decompiler.
.
What might be the reason for the problems of Relooper and Stackifier that are not present in the Smalltalk system?

@curiousdannii
Copy link
Owner

curiousdannii commented Jun 15, 2022

I'm not familiar with Smalltalk.

But the main issue is a mismatch between structured code (loops and if/else) and jump/branch to address models. Some languages only support one of them, and some VM formats use the other.

Also many, probably most, bytecodes definitely aren't 100% reversible. That sounds like Python's which is really just a compressed source code. Most bytecodes for VMs are truly compiled for them, and lots of information is lost.

@curiousdannii curiousdannii added the question Further information is requested label Jun 15, 2022
@kdabwl
Copy link
Author

kdabwl commented Jun 15, 2022

what information can be lost by Inform7 compiled bytecode; I'm sure I can find examples (going the very long way), but your experience could shortcut that for me; thanks

@curiousdannii
Copy link
Owner

Whether the code used loops, switch statements, arbitrary jumps, etc. That's the main difficult for which reloopers are designed to solve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants