[CIL users] Keep typedefs in casts

2011-01-20 Thread Elnatan Reisner
CIL sometimes unrolls the type in a cast. This seems to be somewhat inconsistent, though, and keeping the typedefs seems slightly preferable, I think. For example, given this program: typedef int myint; int main() { long l = 0; myint a = l; return a; } CIL will cast

Re: [CIL users] doepicenter option not working

2011-01-20 Thread Vijayaraghavan Murali
Thank you for the help Elnatan. I managed to get around it by appending to the file #pragma cilnoremove("func") for every function in the program, and then running CIL with the option --sliceGlobal. This will remove all functions except func which is what I wanted. I guess epicenter as a featu

Re: [CIL users] ?: with no side-effects

2011-01-20 Thread Elnatan Reisner
On Jan 20, 2011, at 5:19 PM, Wei Hu wrote: Did you forget to attach the patch? Yep, sorry. I attached the wrong file. Here it is. Elnatan empty_question.patch Description: Binary data On Thu, Jan 20, 2011 at 4:41 PM, Elnatan Reisner wrote: A '?:' expression, when occurring as a stand

Re: [CIL users] ?: with no side-effects

2011-01-20 Thread Wei Hu
Did you forget to attach the patch? On Thu, Jan 20, 2011 at 4:41 PM, Elnatan Reisner wrote: > A '?:' expression, when occurring as a standalone statement, gets expanded > into an 'if' statement, even if there are no side-effects in either branch. > This patch fixes that by simply eliminating the

[CIL users] ?: with no side-effects

2011-01-20 Thread Elnatan Reisner
A '?:' expression, when occurring as a standalone statement, gets expanded into an 'if' statement, even if there are no side-effects in either branch. This patch fixes that by simply eliminating the statement altogether, or keeping the condition's side-effects if there were any. For examp

Re: [CIL users] doepicenter option not working

2011-01-20 Thread Elnatan Reisner
Vijayaraghavan Murali nus.edu.sg> writes: > I'm new to this list and I just obtained CIL. For our research which > uses compositional reasoning, we need a tool to extract out each > function individually from a C program (including global declarations > like variables, structs and typedefs) and a