--- layout: fc_discuss_archives title: Message 10 from Frama-C-discuss on August 2011 ---
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] Simplifying branches



Hi,

I am working on a plugin which eliminates branches of code under certain
circumstances. Using a combination of constant propagation and spare
code analysis, I end up with code of the form

 if (1) {
    ...
 }

which is technically correct, but would be more useful if it were
simplified. I notice that saving the code to disk and loading it in to
Frama-C is enough to eliminate the unnecessary "if".

Is it possible to access this simplification step from a plugin, or do I
need to write my own visitor-based implementation of it?

Thanks,

	Dan.