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] Using results of one plugin in another plugin


On 02/15/2012 07:28 AM, Boris Hollas wrote:
> I wrote
> let prj = File.create_project_from_visitor "foo" (new foo) in
> Project.set_current prj;
> Dynamic.Parameter.String.set "-jessie-atp" "gui";
> (Dynamic.get ~plugin:"Jessie" "run_analysis" (Datatype.func
> Datatype.unit Datatype.unit)) ()
> to use the results of plugin foo in Jessie. However, this crashes Jessie
> on some C-files and results can't be used by eg wp. What's the proper
> way to pipe plugins?

That is a possible way. But unfortunately Jessie does not work so well 
in multi-projects mode. You can try to call the following function 
before computing the AST of the initial project (and thus at least 
before calling File.create_project_from_visitor).

let prepare_jessie () =
   Kernel.SimplifyCfg.on ();
   Kernel.KeepSwitch.on ();
   Kernel.Constfold.on ();
   Kernel.PreprocessAnnot.on ();
   Cabs2cil.setDoTransformWhile ();
   Cabs2cil.setDoAlternateConditional ()

Jessie is happy now in simple cases, but I provide no guarantee that it 
is enough in all situations...