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] Kernel functions
- Subject: [Frama-c-discuss] Kernel functions
- From: virgile.prevosto at m4x.org (Virgile Prevosto)
- Date: Tue, 21 Feb 2012 10:47:52 +0100
- In-reply-to: <CA+yPOVgXg39LbKaDtW6PPkb37-g2nmWgR+-k-_OZtNX6oXDgkg@mail.gmail.com>
- References: <1329204516.12949.148.camel@iti27.informatik.htw-dresden.de> <CA+yPOVgEsa8OAjeF2YF1HD4Q1qRYhDwpzi7BhE2AyDAWgh18=Q@mail.gmail.com> <1329464214.2127.282.camel@iti27.informatik.htw-dresden.de> <CA+yPOVhX1_Pqu2wRYUvshx3qhpFZhJBLdyahBrRC8-mTQTvf0g@mail.gmail.com> <1329494588.2127.327.camel@iti27.informatik.htw-dresden.de> <CA+yPOVhhhUGvqi0BD5Pg0sDaQs=neJ_n-OMN4owcx17_sk7TFA@mail.gmail.com> <1329725500.2127.2065.camel@iti27.informatik.htw-dresden.de> <CA+yPOVhTTxmxq6vjcY+=enmNFMAC_wpciJBEUe58wzwwKBX4Tw@mail.gmail.com> <1329801192.2127.2296.camel@iti27.informatik.htw-dresden.de> <CA+yPOVgXg39LbKaDtW6PPkb37-g2nmWgR+-k-_OZtNX6oXDgkg@mail.gmail.com>
[Sorry for the previous message, I should have been more careful with Gmail's shortcuts] 2012/2/21 Boris Hollas <hollas at informatik.htw-dresden.de>: > > I add preconditions based on the formals, so I better work with vfunc. > Well, you can use Kernel_function.get_formals in vspec for that, but there is indeed the issue of discriminating between a function's contract and a statement's contract (self#current_stmt will be None in the former case and Some stmt in the latter). That said, it should also be fine to do it in vfunc. In fact, it's possible to tell vglob not to visit the spec by using a ChangeTo in vglob_aux: method vglob_aux g = match g with | GFun(f,l) -> let new_f = Visitor.visitFramacFunction self f in ChangeTo (GFun(new_f,l)) | _ -> DoChildren > Anyway, really good documentation is needed to understand all this. But > why not convert set_spec to a method, so set_spec can extract the right > kf by itself and properly handle the action, based on self#behavior? > Because set_spec is a generic function that can be used in many other contexts. Basically, what you suggest is what is done by vglob in Visitor.frama_c_generic_visitor, when the spec has been visited by vspec. >> > For an inplace visitor, what should be used instead of >> > File.create_project_from_visitor? >> > >>> >>> Visitor.visitFramacFile or Visitor.visitFramacFileSameGlobals >> > This brings up another problem: how do I get the Cil_types.file? It > doesn't work with Cil.dummyFile. Ast.get Best regards, -- E tutto per oggi, a la prossima volta Virgile
- References:
- [Frama-c-discuss] Kernel functions
- From: hollas at informatik.htw-dresden.de (Boris Hollas)
- [Frama-c-discuss] Kernel functions
- From: virgile.prevosto at m4x.org (Virgile Prevosto)
- [Frama-c-discuss] Kernel functions
- From: hollas at informatik.htw-dresden.de (Boris Hollas)
- [Frama-c-discuss] Kernel functions
- From: virgile.prevosto at m4x.org (Virgile Prevosto)
- [Frama-c-discuss] Kernel functions
- From: hollas at informatik.htw-dresden.de (Boris Hollas)
- [Frama-c-discuss] Kernel functions
- From: virgile.prevosto at m4x.org (Virgile Prevosto)
- [Frama-c-discuss] Kernel functions
- From: hollas at informatik.htw-dresden.de (Boris Hollas)
- [Frama-c-discuss] Kernel functions
- From: virgile.prevosto at m4x.org (Virgile Prevosto)
- [Frama-c-discuss] Kernel functions
- From: hollas at informatik.htw-dresden.de (Boris Hollas)
- [Frama-c-discuss] Kernel functions
- From: virgile.prevosto at m4x.org (Virgile Prevosto)
- [Frama-c-discuss] Kernel functions
- Prev by Date: [Frama-c-discuss] Kernel functions
- Next by Date: [Frama-c-discuss] Frama-c_stdlib error
- Previous by thread: [Frama-c-discuss] Kernel functions
- Next by thread: [Frama-c-discuss] Support of (shift) operations?
- Index(es):