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 generated globals in the source code
- Subject: [Frama-c-discuss] Using generated globals in the source code
- From: virgile.prevosto at m4x.org (Virgile Prevosto)
- Date: Tue, 10 Jul 2012 16:04:41 +0200
- In-reply-to: <1341899958.3535.2.camel@iti27.informatik.htw-dresden.de>
- References: <1341814711.12360.33.camel@iti27.informatik.htw-dresden.de> <CA+yPOVi81WL_9t8X6d1Zth+wsKocnNTBoNtQz98+dU7OaT9SgA@mail.gmail.com> <1341899958.3535.2.camel@iti27.informatik.htw-dresden.de>
Hello, 2012/7/10 Boris Hollas <hollas at informatik.htw-dresden.de>: > yes, I have to inspect the original source to declare appropriate > globals and loc1 and loc2 are in the same file. Can I solve the problem > by two-pass parsing? > A first pass with Kernel.ReadAnnot.Off () generates the globals and > writes them to a file defs.h with Cil.d_global. In this case, how do I > change Cil.defaultCilPrinter to my out_channel? Yes, this should work. I'm not sure I understand your question, though: Cil.d_global, as all pretty-printing functions, takes as first argument a formatter channel, that you can create from an out_channel with Format.formatter_of_out_channel (see OCaml's standard library manual for more information). > Then a second pass can include defs.h with Kernel.CppExtraArgs and do > any further processing. However, the pretty-printed globals may contain > non-ASCII symbols. Can the toolchain handle these? In theory yes. If there is some issue, you can switch to -no-unicode pretty-printing (after having reported the problem of course ;-) > If this works, can I just call > Visitor.visitFramacFile (new Plugin.plugin) (Ast.get ()); > twice with the corresponding options for each pass? I would suggest that you use distinct projects (possibly removing the old one after everything is processed) for the two phases. Best regards, -- E tutto per oggi, a la prossima volta Virgile
- References:
- [Frama-c-discuss] Using generated globals in the source code
- From: hollas at informatik.htw-dresden.de (Boris Hollas)
- [Frama-c-discuss] Using generated globals in the source code
- From: virgile.prevosto at m4x.org (Virgile Prevosto)
- [Frama-c-discuss] Using generated globals in the source code
- From: hollas at informatik.htw-dresden.de (Boris Hollas)
- [Frama-c-discuss] Using generated globals in the source code
- Prev by Date: [Frama-c-discuss] value analysis
- Next by Date: [Frama-c-discuss] Compiling Frama-C and why
- Previous by thread: [Frama-c-discuss] Using generated globals in the source code
- Next by thread: [Frama-c-discuss] Frama-C Development Tooling (FCDT) plug-in V1.2 Release
- Index(es):