[CIL users] post dominator tree

2014-02-03 Thread sonamt
Hello all, I need to construct post dominator tree for that i need to get dominator tree from reverse CFG. I got reverse CFG by exchanging preds and succs. How can i now start my dominator calculation from new start node of reverse CFG? Thanks n Regards Sonam Tiwari ---

[CIL users] control dependency graph

2014-02-01 Thread sonamt
Hi, Is there any inbuilt feature for Control Dependency Graph in CIL. If not can anyone give a brief idea about the same. Thanks n Regards Sonam Tiwari -- WatchGuard Dimension instantly turns raw network data into act

Re: [CIL users] loop unrolling

2013-10-11 Thread sonamt
It worked by creating new statements. True that was an issue of physical location. Thanks a lot > On Fri, Oct 11, 2013 at 06:06:54PM +0530, son...@iitk.ac.in wrote: >> Is there any inbuilt feature for loop unrolling? > > I don't think so. > >> I am trying to implement loop unrolling, if i cop

[CIL users] loop unrolling

2013-10-11 Thread sonamt
Hi Gabriel, Is there any inbuilt feature for loop unrolling? I am trying to implement loop unrolling, if i copy all the statements one by one then the location remains same for the particular statement. And later if i try to visit(using cil visitor) these unrolled statements i m unable to d

[CIL users] type casting

2013-05-16 Thread sonamt
Hi, How can we type cast an expression to String. Eg... i want to store the if condition which is an expression type as a string. any help is appreciated. Thanks n Regards Sonam Tiwari -- AlienVault Unified Security

Re: [CIL users] Regarding inserting printf function

2013-04-07 Thread sonamt
I have attached the code that is working now from the code the statement inserted is of form: printf("value of if count \n", __cil_tmp4); but i want something like printf("value of if count %d\n", __cil_tmp4); Hope question is clear now. Thanks Sonam > Hi Sonam, > > On Sun, Apr 07, 2013 at

[CIL users] Regarding inserting printf function

2013-04-07 Thread sonamt
Hello, I have a simple problem in which i m stuck for a long time. I want to insert a print statement like: printf("Value = %d" , var); my code contains following: (TFun(voidType, Some [("format", charPtrType, [])], true, [])) in following is the statement i a

Re: [CIL users] Instrumenting a program with a call to function in external file

2013-03-31 Thread sonamt
If i have wrapped varinfos in record type as below: type type = { mutable one : varinfo; mutable two : varinfo; } how can i use this varinfo values? Also how can i make use of varinfo returned from findOrCreateFunc? Thanks n Regards Sonam > On Sat, Mar 02, 2013 at 08:40:39PM +0530,

[CIL users] reconstructing existing block

2013-03-29 Thread sonamt
Hello, I want to reconstruct a block by adding one extra statement. I am using following code: (Block (mkBlock [ mkStmtOneInstr s; tb.bstmts ])) where s is a single statement; tb is existing block but if i use tb.bstmts then there is type error saying its of type stmt list but stmt is expected

[CIL users] Initializing fundec type

2013-03-15 Thread sonamt
Hi, M confused regrading how can i intialize a fundec type with some dummy value? Thanks n Regards Sonam -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite fo

Re: [CIL users] Instrumenting a program with a call to function in external file

2013-03-07 Thread sonamt
Thanks for the example. let convert v = Lval (Var v.svar, NoOffset) in mkStmtOneInstr (Call(None, convert foo, [f; 1], loc)); In the above code i am getting following error: Error: This expression has type Cil.varinfo but an expression was expected of type Cil.fundec where "foo

Re: [CIL users] Instrumenting a program with a call to function in external file

2013-03-02 Thread sonamt
Thanks for quick response I am quiet a beginner in CIL. Although i am comfortable with using visitors, finding statements and making changes. But i am not able to create a call statement along with parameters (arguments) any simple example would be helpful. > Hi, > > On SatteFunc, Mar 02, 20

[CIL users] Instrumenting a program with a call to function in external file

2013-03-01 Thread sonamt
Hello, I would like to get a basic idea on how to insert call to a function defined in some other C file to the input file before a particular kind of statement lets say before all "loop" statements in the input file. Also, one simple question how can i convert varinfo to an expression type