Re: [CIL users] Parsing Statement Assignments

2013-03-07 Thread Jonathan Kotker
Ah, I somehow missed this documentation. This looks useful for my purposes. Thanks for the suggestion, Gabriel! :) To be clearer, the assignments are produced by an SMT solver, or rather, by a parser that reads the model produced by an SMT solver and produces output that looks like C lines. Basica

Re: [CIL users] Parsing Statement Assignments

2013-03-07 Thread Gabriel Kerneis
Hi Jonathan, On Sat, Mar 02, 2013 at 08:44:10AM -0800, Jonathan Kotker wrote: > I was looking through the CIL codebase in search of a function that would > convert a statement into an element of the CIL representation. > > The larger context of this problem is as follows: I have a C file, and I >

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

2013-03-07 Thread Gabriel Kerneis
On Thu, Mar 07, 2013 at 11:16:01PM +0530, son...@iitk.ac.in wrote: > 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

Re: [CIL users] Parsing Statement Assignments

2013-03-07 Thread Jonathan Kotker
Bump. :) On 2 March 2013 08:44, Jonathan Kotker wrote: > Hello (CIL) World. > > I was looking through the CIL codebase in search of a function that would > convert a statement into an element of the CIL representation. > > The larger context of this problem is as follows: I have a C file, and I

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