[CIL users] Ptranal.resolve_funptr [was: how to include indirect function calls into the call-graph]

2013-12-16 Thread Christoph Spiel
First, non-html is enough in this mailing list. Used correctly, Ptranal.resolve_funptr does what you say your are looking for. BTW, small alias sets are your friends and this holds true for function pointers in particular. /Chris

Re: [CIL users] Dead code elimination

2013-09-20 Thread Christoph Spiel
Alex, On Fri, Sep 20, 2013 at 09:12:50AM +0300, Alex Susu wrote: > The partial modules is very interesting. Was it used for a publication? > If so, could > you please tell me some reference(s). The partial feature was written by the original CIL crew Necula, McPeak, Weimer. It look

Re: [CIL users] Dead code elimination

2013-09-18 Thread Christoph Spiel
Gabriel - On Wed, Sep 18, 2013 at 08:41:04AM +0100, Gabriel Kerneis wrote: > Do you know why Golf is not enabled by default? No, I don't. Could be the dreaded backwards-compatability whatever, though. I don't see any reason not to hard-code `Golf'. It never produced any false positives

Re: [CIL users] Dead code elimination

2013-09-18 Thread Christoph Spiel
Alex - On Tue, Sep 17, 2013 at 04:21:43PM +0300, Alex Susu wrote: > Did anybody use Dead code elimination (DCE)? We used it, but that dates back almost a decade, when we analyzed several large projects in embedded environments. Let me summarize the problems I still remember. (1) CI

[CIL users] Portability issues when folding floating-point constants [was: Global Initializers]

2013-08-07 Thread Christoph Spiel
On Wed, Aug 07, 2013 at 07:13:18AM +0100, Gabriel Kerneis wrote: > No, the conversion basically calls Cil.constFold which fails on anything but > ints and enums. Once upon a long ago (~10y) we already had this discussion with respect to the `Partial' module. Back then someone (probably mo

[CIL users] Change Makefile.in [was: ptranal.ml link error]

2012-05-21 Thread Christoph Spiel
On Mon, May 21, 2012 at 05:56:01PM +0530, srikanth vaindam wrote: > When I changed the line "module A = Olf" to "module A = Golf" in ptranal.ml I > get link error saying > > Linking bytecode obj/x86_LINUX/cilly.byte.exe > Error while linking obj/x86_LINUX/ptranal.cmo: > Reference to undefined globa

Re: [CIL users] cil array init. problem

2012-04-12 Thread Christoph Spiel
Hi - It looks like we are exactly at a border here. ;-) My super-simplified code based on Dany's snipped is struct foo {int bar;}; typedef struct foo foo_t; foo_t foos[] = {{-1}, {0}, {1}}; foo_t more_foos[] = {{0}, {8}, {15}, {}}; Now, gcc(1) shrieks $ gcc --version

Re: [CIL users] Different CFG for similar test cases

2011-05-04 Thread Christoph Spiel
Hello! On Wed, May 04, 2011 at 02:29:32PM +0800, haihao shen wrote: > I found CIL treats the following two functions differently. > void loop_test1() > while((get_a()<1) && (get_b()<1)) > void loop_test2() > while(!(get_a()<1) && !(get_b()<1)) Your conditions that control the `w

Re: [CIL users] Subtyping kinds in golf.ml

2011-04-27 Thread Christoph Spiel
On Tue, Apr 26, 2011 at 07:46:16PM -0400, Feng Zhu wrote: > I am a new user of CIL and I try to use the pointer-analysis module. I hope you're aware that you must change the module A = Olf line in "ptranal.ml" to module A = Golf and recompile CIL to actually use the generalized

Re: [CIL users] Need help with CIL constant propagation

2011-03-29 Thread Christoph Spiel
Hi Vijayaraghavan, On Tue, Mar 29, 2011 at 08:31:55PM +0800, Vijayaraghavan Murali wrote: > I'm using CIL's dopartial to play with constant propagation. It's very > painful to look through manually in the output program to see if > constant propagation has been applied somewhere, and where.

Re: [CIL users] vglob does not catch static variable?

2011-02-06 Thread Christoph Spiel
On Sat, Feb 05, 2011 at 06:59:06PM -0500, Dazhi Zhang wrote: > the declaration of "static int a; " is not matched by any case. It can be > caught if there is not "static" ahead. I cannot confirm your finding. My Cil matches static int n; in the Cil.GVar (variable, initialization,

Re: [CIL users] points-to analysis performance

2010-07-20 Thread Christoph Spiel
Hello Olivier - On Fri, Jul 16, 2010 at 05:50:17PM +0200, Olivier Crameri wrote: > is there any documentation or paper somewhere that describes in more details > the points-to analysis module of CIL ? I'm afraid there is none; at least none I'm aware of. However, you can refer to the off

Re: [CIL users] Preprocessor directives

2010-07-12 Thread Christoph Spiel
Hi! On Mon, Jul 12, 2010 at 08:12:08PM +0300, Zakkak Foivos wrote: > i need some help inserting some preprocessor directives between some > generated (with Cil) stmts. Some time ago, I used #pragma directives to communicate extra information to and from a cil run. Of course your cil-exte

Re: [CIL users] argument promotions in calls to variadic functions

2010-05-21 Thread Christoph Spiel
Chuck - I can reproduce your findings and I too think Cil does not follow the C-standard here, though IMHO the relevant part is not 7.15.1.1:2, but 6.5.2.2:7. Also see: Harbison/Steele Sec. 6.3.5. On Thu, May 20, 2010 at 12:10:49PM -0500, Chucky Ellison wrote: > The work that I am doing

Re: [CIL users] "0xffffffffffffffffULL" problem

2010-04-27 Thread Christoph Spiel
On Tue, Apr 27, 2010 at 11:15:14AM +0200, Dany Vereertbrugghen wrote: > Maybe it's because we're still on 1.3.6? Maybe, it is because I'm running a 64-bit system? Sorry, but I forgot to mention that in my initial post. /Chris -

Re: [CIL users] "0xffffffffffffffffULL" problem

2010-04-27 Thread Christoph Spiel
Hi Dany! On Tue, Apr 27, 2010 at 08:42:05AM +0200, Dany Vereertbrugghen wrote: > We're currently running into a problem where CIL seems to transform > > (mainValue < (0xULL)/1000) > to > (mainValue < 0ULL) Excuse me, but I cannot reproduce your problem here. My "cil-c

Re: [CIL users] Ptranal Heap Model

2010-04-03 Thread Christoph Spiel
Hello Cole - > I am trying to use the Ptranal points-to analysis (with Golf) in CIL > 1.3.7 to compute points-to sets containing dynamically allocated memory > locations, but the points-to analysis seems to consider all pointers to > any malloc'd memory as pointing to the same location (specifical

Re: [CIL users] GPragma attributes ?

2010-03-04 Thread Christoph Spiel
Steven - On Thu, Mar 04, 2010 at 08:45:05PM +0100, Steven Van Acker wrote: > I would like to use #pragma directives to let my cilly extension skip > certain functions like so: > #pragma myskip somefunc > The problem I'm running in to, is that pragma attributes need to be > formatted in a s

[CIL users] Olf vs. Golf [was: optimizations with pointers]

2009-09-09 Thread Christoph Spiel
On Wed, Sep 09, 2009 at 10:38:14AM -0400, Stephen Magill wrote: > 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. The default pointer analysis module is Olf, because "ptra

Re: [CIL users] CIL performs invalid tranformations

2009-08-28 Thread Christoph Spiel
John - On Thu, Aug 27, 2009 at 04:59:45PM -0600, John Regehr wrote: > >unsigned long a; > >unsigned long *p; > >p = (unsigned long *)&p; > >a = ++(*p); > > Gabriel, since p refers to itself this code looks to me like an > occurrence of the second clause of this type of undefined be

Re: [CIL users] Operands to && and || are incorrectly cast to int

2009-08-13 Thread Christoph Spiel
Hi Elnatan! > CIL mistakenly casts the operands of && and || to intType, when in > fact they are only required to have scalar type. This can lead to a > bug if the operands have type larger than int and have values which > truncate to 0 when cast to an int (and if useLogicalOperators is set > to t

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

2009-07-08 Thread Christoph Spiel
Hi Vu, On Wed, Jul 08, 2009 at 12:39:22AM -0600, ThanhVu (Vu) Nguyen wrote: > Hi, can I find out what kind of statement (e.g., a single statement, a > block of statements, etc) from a given Cil.stmtkind? To distinguish between the kinds of statments (Instr, Return, Goto, etc.) you can j

Re: [CIL users] CIL perfomance issues

2009-05-28 Thread Christoph Spiel
On Tue, May 26, 2009 at 10:45:30PM +0200, Gabriel Kerneis wrote: > I consider switching to Tailor the day I get fed up to manually tracking it. I have been using the following Tailor configuration to mirror the CIL repository for quite a while now. It has been working flawlessly so far.

Re: [CIL users] CIL perfomance issues

2009-05-28 Thread Christoph Spiel
Gabriel - On Tue, May 26, 2009 at 07:02:16PM +0200, Gabriel Kerneis wrote: > I've been suffering performance issues with CIL recently. 30% of the > time was spent in garbage collection. A while ago a faced similar problems. That time, I tried three different approaches to speed up the ana

Re: [CIL users] creating variable of volatile type

2009-04-21 Thread Christoph Spiel
On Tue, Apr 21, 2009 at 12:57:07PM -0400, Divya Krishnan wrote: > Basically if my input is: > int c[10]; > I want my output to be > volatile int c[10]; We may not like it, but for a C-compiler the order of the type modifier and the type identifier does not matter. You want an array of vol

Re: [CIL users] CPU Time limit

2009-03-26 Thread Christoph Spiel
Benjamin - On Wed, Mar 25, 2009 at 01:50:58PM -0700, Benjamin Ylvisaker wrote: > 2) In C or bash or whatever, implement basically the same thing, but > externally at the process level. > > Has anyone else dealt with this issue? Any ideas about what would be > best? There are several load

Re: [CIL users] CIL-users Digest, Vol 35, Issue 6

2009-03-11 Thread Christoph Spiel
On Wed, Mar 11, 2009 at 01:30:45PM +, Samin Ishtiaq wrote: > I run this function after cpp, and before I call Frontc.parse, > to remove these annotations: > > --- snip --- If you go for the "find-replace" approach the freaky directives could be translated into gcc attributes ("__attribute__((.