fd_doit=  (function  (f:  file)  ->  ignore(doIt10));

Instead of just ignore(doIt10) you can put the code you want, the file 
is in f

example

fd_doit=  (function  (f:  file)  ->  Cfg.computeFileCFG f; ignore(doIt10));

Foivos

On 09/05/12 15:58, srikanth vaindam wrote:
> I have added a new feature to CIL(C Intermediate Language). I am able to
> execute my new module using
>
> |$cilly--dotestmodule--save-temps-D HAPPY_MOOD-o test test.c|
>
> |
>
> Now, in my testmodule, I want to call Cfg.computeFileCFG for test.c
> file. But I don't know how to access test.c file in my module.
>
> I tried using Cil.file. but it says "Unbound value Cil.file".
>
> my code:
>
> |open  Pretty
>
> open  Cfg
>
> open  Cil
>
>
> module  RD=  Reachingdefs
>
>
> let  ()  =  Cfg.computeFileCFG Cil.file
>
>
> let  rec  fact n=  if  n<  2  then  1  else  n*  fact(n-1)
>
> let  doIt n=  fact n
>
>
> let  feature:  featureDescr=
>
>    {  fd_name=  "testmodule";
>
>      fd_enabled=  reffalse;
>
>      fd_description=  "simple test 1240";
>
>      fd_extraopt=  [];
>
>      fd_doit=  (function  (f:  file)  ->  ignore(doIt10));
>
>      fd_post_check=  true;
>
>    }
>
> |
>
> please tell me how to compute the Cfg for test.c file.
>
> |
>
>
> Best Regards,
> Srikanth Vaindam
>
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>
>
>
> _______________________________________________
> CIL-users mailing list
> CIL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cil-users


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users

Reply via email to