Frama-C-discuss mailing list archives

This page gathers the archives of the old Frama-C-discuss archives, that was hosted by Inria's gforge before its demise at the end of 2020. To search for mails newer than September 2020, please visit the page of the new mailing list on Renater.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] Simplifying branches


  • Subject: [Frama-c-discuss] Simplifying branches
  • From: djs at adelard.com (Daniel Sheridan)
  • Date: Wed, 17 Aug 2011 15:29:46 +0100

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.