draperlaboratory / VIBES

Verified, Incremental, Binary Editing with Synthesis
MIT License
50 stars 1 forks source link

Refactor Cegis Loop #63

Open philzook58 opened 3 years ago

philzook58 commented 3 years ago

The cegis loop is currently being refactored to not rebuild the core_theory->IR pass every time but it currently reingests the patch config every time. This should probably only happen once, just like the core_theory translator

philzook58 commented 3 years ago

JT seems to think that this extra loading was unnecessary and removed it?

jtpaasch commented 3 years ago

Yes! I did remove it in #67 because I double-checked and it is indeed unnecessary.

When we start the pipeline, we have the patches as sexps in config.

Then, the pipeline call's Pipeline.init, and we pass in the config. Here's what happens:

Next, the pipeline extracts a seed from the result of all that, which does this:

Then, the pipeline calls the cegis loop. On each iteration on the loop, it calls Pipeline.create_patched_exe, and we pass it the seed. Here's what happens in create_patched_exe:

It looks to me from all this that each cegis iteration only needs the ir, not the sexps or bir. That's why our system tests are still passing, after we merged the changes in #67 (i.e., that's why our pipeline is still patching our test binaries correctly).

@philzook58 do you want to go through the above reasoning and make sure it makes sense to you, just to make sure I haven't missed something? If so, we can close this issue.

codyroux commented 3 years ago

Ping @philzook58