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] Executing a visitor



On Thu, 2012-02-09 at 09:59 +0100, Julien Signoles wrote:

> let main () =
>    let prj =
>      File.create_project_from_visitor
>        "non zero divisor"
>        (new non_zero_divisor)
>    in
>    ... (* do eventually something with prj *)
> 
> let () = Db.Main.extend main


yes, this works.

I see my debug message "Expression processed" 4 times when I run it on

int foo(int k) {
	return 1/k;
}

How many expression does this code contain? It should have only one
expression (1/k), but the translated code

int foo(int k)
{
  int __retres;
  __retres = 1 / k;
  return (__retres);
}

has a new lvalue, so there are 2 expressions in total. Does Frama-c run
on this code? Is each expression traversed twice?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/frama-c-discuss/attachments/20120209/cfe62ae2/attachment.htm>