what's the meaning of the circle node in pdgs which is generated by frama-c

佐手、 提交于 2019-12-06 11:51:51

Use the command frama-c -print main.c to see how the program was translated (I include the translated version below).

The statement goto __Cont; in the normalized version is the translation of continue; in the original.

And, as Binyamin said, the for loop was normalized into a while loop.

int main(int argc, char **argv)
{
  int __retres;
  int i;
  int a;
  i = 0;
  while (i < 100) {
    a = 0;
    if (a == 0) { goto __Cont; }
    else { break; }
    __Cont: /* internal */ i ++;
  }
  __retres = 0;
  return (__retres);
}

Most of it is self explanatory:

  • circle - flow control (branching)
  • rhombus - condition (a == 0 etc.)
  • square - assignment

Your for loop was translated to a while loop

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!