objectionary / ideas

Here we keep ideas for future research in EO programming language and Polystat static analyzer
https://www.eolang.org
7 stars 0 forks source link

Automated remover of C goto statements #4

Open yegor256 opened 1 year ago

yegor256 commented 1 year ago

There is goto statement in C programming language, which can be used freely in any place of the code. For example, this code is valid:

goto a;
while (x < 10) {
  if (y > 4) {
    a:
    i += 1;
  }
}

This code is impossible to translate to EO goto object "as is" (correct me if I'm wrong). I would be nice to have an automated tool, which would take C code as an input and generate a new C code without goto statements.

This may be relevant: https://www.researchgate.net/publication/2644650_A_Goto-Elimination_Method_And_Its_Implementation_For_The_McCat_C_Compiler

idlozhkin commented 1 year ago

Our team (HSE) will do this task

yegor256 commented 1 year ago

@idlozhkin great, find me in Telegram to discuss details