Re: [CIL users] optimizations with pointers

2009-09-09 Thread Stephen Magill
I haven't tried this, but I suspect a pointer analysis could help you obtain a more general solution. Take a look at ptranal.ml in the cil src/ext/pta directory. There will still be a lot of cases where this won't work though (due, as Gabriel pointed out, to the undecidability of the problem in g

Re: [CIL users] different kinds of statement from Cil.stmtkind

2009-07-14 Thread Stephen Magill
I believe it would be something like Cil.Instr([Cil.Call(None, Cil.Lval (Var v, NoOffset), [Const Int64.zero], loc)]) -> if v.name = "exit" then ...here we know we have an exit(0) statement... That is, "exit(0)" is treated as a function call. --Stephen On Tue, Jul 14, 2009 at 4:36 AM, Tha