On Tue, Jul 04, 2017 at 06:59:39PM +0200, Julia Lawall wrote:
>>> How about adding a timeout (eg --timeout 120) and then see how much is
>>> left over.
>>
>> I get:
>> timeout (we abort)
>> Fatal error: exception Common.Timeout
>>
>> and no patch is produced, if I wait the 1028 seconds, I get the expected
>> patch. I think that supports your hypothesis about trying to process the
>> continue.
> 
> If you run Coccinelle on the whole directory, it should timeout on some
> files, and then work on the other ones.  Indeed, if there is a timeout at
> one point for a file then you won't get any patch for that file at all.

Ah, OK, I understand the suggestion now. It does speed up the initial
testing of the patch over the codebase.

Looking at some of the code (well, comments rather), coccinelle is
building a CTL formula and a state machine for the C file and tries to
find the states where it matches? Is that correct?

Does it try to compress the state machine based on the predicates
involved? BDDs tend to be rather helpful with CTL model checking. Not
sure how useful that is, depending on the information that needs to be
extracted (and I've not touched model checking in ages).

Sorry if this is completely wrong.

I vaguely remember seeing something like this somewhere, but can't find
it anymore. That might simplify the three-pronged construction I use
into a single patch hunk like the below. Is there a construction like
that available or have I just dreamed that up?

@@
(stuff here also contains format1, format2, args_before and others as
usual)
identifier merged : python merge_formats(format1, format2, args_before);
@@

-snprintf( buf, E, format1, args );
-Debug( L, format2, args_before, buf, args_after );
+Debug( L, merged, args_before, args, args_after );

-- 
Ondřej Kuzník
Senior Software Engineer
Symas Corporation                       http://www.symas.com
Packaged, certified, and supported LDAP solutions powered by OpenLDAP
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to