{"id":26,"date":"2010-06-14T21:55:02","date_gmt":"2010-06-14T21:55:02","guid":{"rendered":"https:\/\/blogs.scummvm.org\/pidgeot\/?p=26"},"modified":"2022-05-21T11:42:48","modified_gmt":"2022-05-21T11:42:48","slug":"grouping-completed","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/pidgeot\/2010\/06\/14\/grouping-completed\/","title":{"rendered":"Grouping completed!"},"content":{"rendered":"<p>Well, that didn&#8217;t take long.<\/p>\n<p>Vertices in the code flow graph are now grouped according to these rules:<\/p>\n<ul>\n<li>Only consecutive instructions may be grouped.<\/li>\n<li>If there is a jump, it must be the last instruction in the group.<\/li>\n<li>If there is a jump to an instruction, that instruction must be the first instruction in the group.<\/li>\n<li>Once the stack becomes balanced, the group ends with the instruction that balanced the stack.<\/li>\n<\/ul>\n<p>Here are the scripts from the last post, but now with grouping:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/blogs.scummvm.org\/pidgeot\/wp-content\/uploads\/sites\/32\/2022\/05\/script-33_grouped.png\" alt=\"Grouped code flow graph for samnmax\/script-33.dmp\" width=\"253\" height=\"485\" \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/blogs.scummvm.org\/pidgeot\/wp-content\/uploads\/sites\/32\/2022\/05\/room-17-209_grouped.png\" alt=\"Grouped code flow graph for samnmax\/room-17-209.dmp\" width=\"768\" height=\"1152\" \/><br \/>\nAnd finally, as an example of a\u00a0<b>really<\/b>\u00a0big graph:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/blogs.scummvm.org\/pidgeot\/wp-content\/uploads\/sites\/32\/2022\/05\/room-9-202.png\" alt=\"Grouped code flow graph for samnmax\/room-9-202.dmp\" width=\"3692\" height=\"6053\" \/><br \/>\nThis concludes the third milestone. The next step is to analyze the graph to detect loops and conditionals.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well, that didn&#8217;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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-26","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/pidgeot\/wp-json\/wp\/v2\/posts\/26","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/pidgeot\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/pidgeot\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/pidgeot\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/pidgeot\/wp-json\/wp\/v2\/comments?post=26"}],"version-history":[{"count":1,"href":"https:\/\/blogs.scummvm.org\/pidgeot\/wp-json\/wp\/v2\/posts\/26\/revisions"}],"predecessor-version":[{"id":30,"href":"https:\/\/blogs.scummvm.org\/pidgeot\/wp-json\/wp\/v2\/posts\/26\/revisions\/30"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/pidgeot\/wp-json\/wp\/v2\/media?parent=26"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/pidgeot\/wp-json\/wp\/v2\/categories?post=26"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/pidgeot\/wp-json\/wp\/v2\/tags?post=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}