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] add variable name for formal variables of a kernel function


  • Subject: [Frama-c-discuss] add variable name for formal variables of a kernel function
  • From: cs.yang.yibiao at gmail.com (Yibiao Yang)
  • Date: Wed, 9 Apr 2014 09:17:23 +0800

Hi,

In pre-processed code, some functions prototype missing formal variables names.

Infer_annotation module generate contract for the kernel function
without definition, but need the formal variable names to be not
missing.

How to add variable name for those formal variables of a kernel function.

I try to add variable name for those kernel functions, but it can't work.

let vi = Kernel_function.get_vi kf in
let formals = Cil.getFormalsDecl vi in

List.iter (fun f -> if(f.vname = "") f.vname <-
"__my_plugin_formal_name" ^ (string_of_int f.vid) ) formals;

Thank you very much.


-david