--- layout: fc_discuss_archives title: Message 63 from Frama-C-discuss on February 2012 ---
On 02/15/2012 01:32 PM, Boris Hollas wrote: > On Wed, 2012-02-15 at 11:41 +0100, Julien Signoles wrote: >> 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... > > I tried it on a complicated source file and it works. > > Jens Gerlach suggested in private mail to use option -then. I tried > -then -jessie -jessie-atp=gui after calling my plugin, but it didn't > work as I expected. Since you implement a visitor by copy which returns a new project, you should use option -then-on on this new project. However, calling the function "prepare_jessie" before computing the initial AST is still required in order to not fall into your previous crash. Roughly speaking, the option -then-on is the command line counterpart of the Frama-C function Project.on which is often better to use than Project.set_current. Hope this helps, Julien