Re:Psyche-C: automatic compilation of partially-available C ...
by bluetomcat on Sunday May 26, 2024 @01:15PM
(#40483757)
Looks like a solution in search of a problem. Given the weakly-typed nature of C, how can this ever be reliable? In an expression like “x = y”, the operands can differ in size and signedness. The inferred types can be wrong and the resulting program can expose different behavior.
Re:Psyche-C: automatic compilation of partially-available C ...
by nextaccountic on Sunday May 26, 2024 @05:00PM
(#40485342)
This is complimentary to LLMs. For example, LLMs often produce code that doesn't quite compile. What if with some tweaks we could make it run and produce some output? Then, we could assess if the output is right.
Re:Psyche-C: automatic compilation of partially-available C ...
by saagarjha on Sunday May 26, 2024 @03:14PM
(#40484603)
What is the purpose of this? You pull some stuff out of IDA and bash it until it works? Not entirely sure what you could do with this given the mechanics behind what it does to fill in the missing code…
Re:Psyche-C: automatic compilation of partially-available C ...
by segfaultbuserr on Sunday May 26, 2024 @10:14PM
(#40487061)
> What is the purpose of this?
It's a demo application of the research team's C compiler front-end [0], and demonstrates its automatic type inference feature. The compiler front-end itself is intended to be a general-purpose library to power high-level static analysis tools. While this demo itself is not very useful, being able to do static analysis on incomplete code snippet is certainly extremely useful.
Re:Psyche-C: automatic compilation of partially-available C ...
by quelsolaar on Sunday May 26, 2024 @06:59PM
(#40486169)
It would be super cool to see it generate the missing definitions and declarations to make it comparable in a regular C compiler. It would help a lot when reconstructing missing header files, and similar lost source data.
It's a demo application of the research team's C compiler front-end [0], and demonstrates its automatic type inference feature. The compiler front-end itself is intended to be a general-purpose library to power high-level static analysis tools. While this demo itself is not very useful, being able to do static analysis on incomplete code snippet is certainly extremely useful.
[0] https://github.com/ltcmelo/psychec