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] How to use the frama-c builtins programmatically?


  • Subject: [Frama-c-discuss] How to use the frama-c builtins programmatically?
  • From: abiao.yang at gmail.com (David Yang)
  • Date: Tue, 3 Sep 2013 00:42:46 +0800

> Yes, then it's the best way to achieve what you want. For portability,
> if you use your script on different machines where Frama-C might not
> always be installed on /usr/local, you can use something like
> (Config.datadir ^ "/libc/fc_runtime.c"), but it really depends on your
> configuration.


Right. So I used the Ocaml module named Unix to add the kernel file.
"
    let in_channel = Unix.open_process_in "frama-c -print-share-path" in
    let frama_c_share_path = Pervasives.input_line in_channel in
    let filename = frama_c_share_path ^ "/libc/fc_runtime.c" in
    Kernel.Files.add filename;
"

Thank you so much for your help.

Kind regards

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/frama-c-discuss/attachments/20130903/be429e14/attachment.html>