Grouping completed!

Well, that didn’t take long.

Vertices in the code flow graph are now grouped according to these rules:

  • Only consecutive instructions may be grouped.
  • If there is a jump, it must be the last instruction in the group.
  • If there is a jump to an instruction, that instruction must be the first instruction in the group.
  • Once the stack becomes balanced, the group ends with the instruction that balanced the stack.

Here are the scripts from the last post, but now with grouping:

Grouped code flow graph for samnmax/script-33.dmpGrouped code flow graph for samnmax/room-17-209.dmp
And finally, as an example of a really big graph:

Grouped code flow graph for samnmax/room-9-202.dmp
This concludes the third milestone. The next step is to analyze the graph to detect loops and conditionals.