[Libre-soc-bugs] [Bug 980] Implement C-based Power ISA pseudocode compiler

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Fri Jan 5 15:26:37 GMT 2024


https://bugs.libre-soc.org/show_bug.cgi?id=980

--- Comment #52 from Dmitry Selyutin <ghostmansd at gmail.com> ---
As discussed in the previous comments, I'll skip the functions (def, args,
varargs, etc.). This mostly means that, after a cleanup and commit into some
branch, we can now proceed with checking whether the code is correct.

As I'm extremely lazy with the manual checks, I have the following (crazy?)
idea on how to test that the parsing is correct.
1. The new code can produce a valid AST tree after parsing.
2. The new code can convert an AST tree back into the pseudocode.
3. The old code can convert a pseudocode into a Python code.
4. If we do pycode(pseudocode(parse(mdwn))) and things still work, it means our
AST is correct.

So the next stage would be to do exactly this. I'll clean the code a bit,
commit it into a branch and modify the OLD parser so that it fetches an AST
with a NEW parser then converts this AST into a pseudocode. The new pseudocode
will be used in place of an old one, substituted in runtime. Then I'll check
for discrepancies in the generation and see what went wrong. I think checking
python generated code would be OK, then CI.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list