DavidMazarro / wasm-verify

A proof-of-concept formal verification tool for WebAssembly.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add property-based test(s) to check the CFG simplification function

DavidMazarro opened this issue · comments

The top level function used to simplify CFGs, simplifyCFG, relies on fusionableNodes to figure out which pair of nodes to fuse next. The order in which fusionable nodes are found depends on the implementation of fusionableNodes.

However, in the thesis we stated that "the order in which fusionable nodes are fused does not impact the final, simplified CFG". We gave no formal proof that this statement holds. To have some guarantee that it holds (without having to give a formal proof), a property-based test could be added which uses a function that returns pairs of fusionable nodes randomly for a given CFG, and check that in every simplification we arrive at the same final, simplified CFG (possibly with different node labels, but the nodes' instructions and the edges between nodes should be the same).