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



On Wed, 2011-08-17 at 17:40 +0200, Anne Pacalet wrote:
> Le 17/08/2011 17:26, Daniel Sheridan a ?crit :
> > I see that I could use the functor to get the result that I want. But I
> > wonder whether this would be a useful enhancement, either in filter.ml
> > or in sparecode?
> 
> Yes: [sparecode] should test whether the condition as a known value
> (probably using [Db.Value.condition_truth_value]) to tell that the if statement
> is invisible. I am wondering if it is a good idea or not to put that test
> in [filter] since the "clients" of [filter] might want to keep the 'if',
> don't they ?

Yes, it seems reasonable that [filter] strictly follows the rules set in
the T_RemoveInfo instance rather than being clever on its own. I think I
was distracted by the name "optim_if" into assuming it was an
optimisation step.

I'll open a feature request. Thanks for your help.

	Dan.