This task is for improving the results of decompilation by recovering types (
char *, structures, unions, classes, etc). Apart from ability to inference them through analyzing data flow, radeco should be able to exchange this information with radare2 and Cutter, initially loading from them, then synchronizing back refined results.
- Define and implement type system
- Implement type inference techniques
- Support for structural types loading and inference
- Support for constrained types
- Implement IR writer/reader with type information
- Implement a backend to convert the IR to C AST with type information
The student should be familiar with Rust and decompilation basics or be able to learn it quickly.
Benefits for the student
The student will learn decompilation theory and work with the type system.
Benefits for the project
This task allows to produce the more readable IR/C output.
Assess requirements for midterm/final evaluation
- 1st term: Basic and structured types support in IR and propagation through all stages of radeco
- 2nd term: Types inference engine
- Final term: Integration with radare2 and Cutter, regression tests, complex types inference, radare2 book documentation
- Commands and API for setting/changing types of the variables - Issue #183
- Constrained types support in Radeco - Issue #232
- Value limits support and analysis - Issue #91 hxxps://github.com/radareorg/radeco-lib/issues/91
- Radare2 types issues - hxxps://github.com/radare/radare2/labels/types
- HexRaysCodeXplorer - hxxps://github.com/REhints/HexRaysCodeXplorer
- Virtuailor - hxxps://github.com/0xgalz/Virtuailor - vtables reconstruction based on runtime information
- Pharos - types inference with Prolog - hxxps://github.com/cmu-sei/pharos