This project is read-only.

Rewriting only changed methods in mutated assembly


Is it possible to not modify method body IL if this method was not modified by mutator's when using ccs.exe ?
Now, even if my mutator will modify only one method, the IL of resulting assembly is quite different from the original one (practically every method body IL is changed). It is hard to find issues, when every method can be the cause.


mikebarnett wrote Aug 20, 2012 at 10:29 PM

Unfortunately, we do not track the decompiled code model to know if it has been modified or not. The process of converting the code model to IL would have to figure this out and then pass through all of the information requested from the method body from the underlying IL method body.

You might want to try running PeToText on the resulting assemblies the mutator produces and see if that helps find the issues.

Karol_Gwaj wrote Aug 21, 2012 at 11:09 AM

I used ILSpy to export IL of original assembly and mutated one, and then compared them after with winmerge. My assembly is quite big (around 2MB, after exporting to text it is around 16MB), and from first look i see that more than 50% of generated IL is different (it is too much for me to analyze manually :)).

mikebarnett wrote Aug 21, 2012 at 5:59 PM

Sorry, I had just meant that if there was some particular method that you were interested in, then comparing the text (as seen via ILSpy or PeToText or any other decompiler) would be useful (as opposed to looking at the IL directly). But I agree: it is not practical to do for an entire assembly. For our internal uses, we make sure that the rewritten code passes the same regression tests that the un-rewritten code passes, but otherwise do not compare the output assemblies to the input assemblies.