Commit | Line | Data |
---|---|---|
34e49164 C |
1 | -*- org -*- |
2 | ||
55d38388 C |
3 | * upcoming/planned/todo |
4 | ** Language: | |
5 | - Semantic patch for other languages | |
6 | - Support metavariables, virtual rules and virtual identifiers | |
7 | in initialize and finalize rules | |
ca417fcf | 8 | - Support for matching #ifdef, etc. |
190f1acf | 9 | - function-typed metavariables |
55d38388 C |
10 | |
11 | ** Features: | |
12 | - New scripting languages | |
13 | ||
14 | ** Bugfix: | |
15 | - Add more information in documentation, man pages and wiki | |
16 | ||
8f657093 C |
17 | * 1.0.0 |
18 | ** Language: | |
19 | - Addition of initializer list metavariables. Thanks to Michael Stefaniuc | |
20 | for noticing the need for them. | |
21 | - Allow multiple position variables per token | |
8babbc8f C |
22 | - ++ can now be associated with - code |
23 | - Allow /* */ comments as smpl comments, not only as + code | |
24 | - Add support for && (label addresses) | |
25 | - local idexpression metavariable no longer matches static local x | |
5427db06 | 26 | - Consider using to be a comment in C++ code. Patch submitted by Jani Monoses. |
8f657093 C |
27 | |
28 | ** Features: | |
29 | - Preserve spacing before // comments when not at the beginning of a line | |
8babbc8f C |
30 | - Adjusted parsing of endif to put it after jump code |
31 | - Improve warning message when using -use_cache | |
8babbc8f C |
32 | - More helpful initial value for exported variables in python |
33 | - Support - on expression nests | |
65038c61 C |
34 | - Better handling of the case of a matched declaration that should only |
35 | be replaced by other top level things. | |
5427db06 C |
36 | - Allow a semantic patch beginning and ending with braces to match the |
37 | complete body of a function if the braces are not removed and if nothing | |
38 | is added before the first brace or after the last one. | |
39 | - Add -cache_prefix option, to specify where to put cached files. | |
40 | - Allow module_init(foo); to match module_init(foo) (or likewise for any | |
41 | declarer), when no transformation is specified on the semicolon. | |
42 | - Add Coccilib.exit() for ocaml code and cocci.exit() for python code, | |
43 | to abort the treatment of the current file. | |
8f657093 C |
44 | |
45 | ** Bugfix: | |
46 | - Corrected parsing of script strings delimited by a single quote. Thanks | |
47 | to Eugeniy Meshcheryakov for reporting the problem. | |
48 | - Improved indentation of added ifdefs. | |
49 | - Allow added comments and #ifdefs to precede other added code. Thanks to | |
50 | Jani Monoses for noticing the problem. | |
8babbc8f C |
51 | - Corrected failure to due missing ocamlfind. Thanks to Derek M. Jones for |
52 | reporting the problem. | |
53 | - Allow fake nodes to be - in the allminus case, to drop tokens related to | |
54 | a function definition or forward declaration but before the first code | |
55 | mentioned in the semantic patch. | |
56 | - Drop __init etc when deleting a whole function. | |
57 | - Cause appropriate newlines to be preserved when multiple matches (trees) | |
58 | contain adjacent modifications derived from the same SmPL code. | |
59 | - check_meta takes into account fresh identifier seed information. | |
60 | - Types for worth-trying optimization should not be followed by space | |
65038c61 C |
61 | - Improved filtering of result of matching atomic patterns |
62 | - Drop positions before creating function prototype rules | |
63 | - Adjust position of { introduced by adding multiple statements in a | |
64 | single-statement position | |
65 | - Drop newline after function call ( when all arguments on that line are | |
66 | eliminated | |
67 | - Accept removal of a single declaration, replaced by arbitrary, | |
68 | non-declaration code | |
69 | - smpl_spacing takes into account newlines, indentation | |
5427db06 C |
70 | - Improved prevention of transformations on toplevel { ... } from causing |
71 | changes outside function boundaries; also outside ifs, whiles, etc. | |
72 | Changes are still allowed on { ... } present for other reasons. | |
73 | - Fix bug in include_match that caused everything to halt when all matches | |
74 | were discarded | |
8f657093 | 75 | |
690d68d1 C |
76 | * 0.2.5 |
77 | ** Language: | |
3a314143 C |
78 | - Make a very small attempt to parse C++ code, amounting to accepting |
79 | identifiers containing ::, tilde, and template invocations. Use the | |
80 | option -c++. This is not likely to be very useful in practice. | |
b23ff9c7 | 81 | - Added metavariable metavariable type. |
d3f655c6 | 82 | - Add disjunctions on identifiers in some contexts |
f59c9fb7 | 83 | - Pretend that & indicates a pointer in -c++ mode |
190f1acf C |
84 | - Support for new and delete |
85 | - Allow arrays in smpl parameter declarations. Thanks to Jesper Louis | |
86 | Andersen for pointing out the problem. | |
87 | - Field list metavariables | |
88 | - Add the ability to add __attributes__ (NB, no matching on attributes) | |
89 | - Slightly improved the error message for transformation on multiple | |
90 | variable declaration. Thanks to Jonathan Nieder for pointing out the | |
91 | problem. | |
690d68d1 C |
92 | |
93 | ** Features: | |
94 | - support transformations on variables (only) in declarations that declare | |
95 | multiple variables | |
3a314143 C |
96 | - allow #endif XXX in C code |
97 | - relax_include_path now applied to non local includes too, in which case | |
98 | it tries to find a unique file with a suffix of the provided name. | |
99 | this is useful for directories that are intended to be symbolic links. | |
100 | - support matching and removing #undef | |
101 | - support for iteration in ocaml, requires use of -no_show_diff | |
102 | - calls to likely and unlikely propagate test expression status to their | |
103 | arguments | |
ca417fcf C |
104 | - reuse typedefs and macros from complete parsing when reparsing the |
105 | transformed code | |
190f1acf | 106 | - better explanation when presenting glimpse tokens |
d3f655c6 | 107 | - optimization for an if branch that is just { ... } |
4dfbc1c2 | 108 | - spatch -control_flow_to_file file.c generates a file file.dot |
190f1acf | 109 | - include files with names ending in .cpp if -c++ option is given |
6756e19d | 110 | - removed use of the no longer supported sexplib function Conv.hashtbl_of_sexp |
f537ebc4 | 111 | - add information about which Fedora packages are needed |
690d68d1 C |
112 | |
113 | ** Bugfix: | |
3a314143 C |
114 | - improved parsing of expressions to allow ... to the right of operators in |
115 | more places | |
ca417fcf C |
116 | - Fix check_config for Python 2.7 on Fedora 14 (Reported-by: Michael Stefaniuc) |
117 | - Check for ocamlfind in configure (Reported-by: Paul E. McKenney) | |
118 | - Postpone use of ocamlfind at runtime to report fewer errors | |
b23ff9c7 | 119 | - Add support for Python 2.4 binding with the provided pycaml library |
190f1acf C |
120 | - Allow '@' in script code. Thanks to Laurent Reveillere for noticing the |
121 | problem. | |
122 | - Remove an optimization of x or true to true in asttoctl2 for the case | |
123 | where x may make a modification, eg the case of -thing ?-thing | |
124 | - Allow adding comments before a function. | |
f537ebc4 C |
125 | - Introduction of newlines in function arguments needs to take into account |
126 | that the code added by SmPL can include newlines. Thanks to Thomas | |
127 | Gleixner for finding the problem. | |
690d68d1 | 128 | |
413ffc02 C |
129 | * 0.2.4 |
130 | ** Language: | |
131 | - scripts now have names and can declare metavariables that are seen by | |
132 | SmPL as identifier metavariables, see demos/{python,ocaml}tococci.cocci | |
133 | - declaration (match variable declarations) and field (match structure | |
134 | field declarations) metavariables | |
c491d8ee | 135 | - matching of array initializations and of enum declarations |
413ffc02 C |
136 | |
137 | ** Features: | |
138 | - compatability with Python 2.7. Thanks to Richard W.M. Jones for pointing | |
139 | out the problem | |
140 | - python and ocaml string representations of parameter lists and expression | |
141 | lists | |
142 | - try simpler patterns on glimpse failure | |
785a3008 C |
143 | - graceful and immediate failure when a virtual rule is defined on the |
144 | command line, but not in the rule | |
c491d8ee C |
145 | - spatch returns -1 when a virtual rule is requested that is not supported |
146 | - no transformation when using * with the option -no_show_diff | |
e6509c05 C |
147 | - expanded +++ file name for match output |
148 | - struct *^* and enum *^* metavariable types | |
5626f154 C |
149 | - allow an assignment to match a variable initialization, even if multiple |
150 | variables are declared at the same time. | |
1eddfd50 | 151 | - add the option -recursive_includes |
9bc82bae C |
152 | - added the option -use_idutils. The requires the previous use of the |
153 | script idutils_index.sh | |
413ffc02 C |
154 | |
155 | ** Bugfix: | |
156 | - detect used after metavariables in simple statement metavariable match | |
785a3008 C |
157 | - allow inheriting position variables over rules that make transformations |
158 | but depend on virtual rules that are not defined on the command line | |
159 | - treat top-level tokens in decl visitor. Thanks to Peter Tummeltshammer | |
160 | for noticing a resulting problem. | |
c491d8ee | 161 | - improve typing of the result of an assignment expression |
e6509c05 | 162 | - eliminate some recursive calls in C code parsing to avoid stack overflows |
c491d8ee C |
163 | - better pretty printing of #define when the whole line is removed |
164 | - better pretty printing of asm code containing | |
165 | "::[input]"r"(&coherence_data[i])" | |
166 | - allow pretty printing of C code with nameless bit fields | |
e6509c05 C |
167 | - avoid adding an error message to standard output if ocamlfind is not |
168 | found | |
169 | - struct/union/enum-typed metavariables with a metavariable type name | |
5626f154 C |
170 | - better management of whitespace between deleted lines. Thanks to |
171 | Andriy Gapon for noticing the problem. | |
172 | - improved parsing recovery for badly parsed struct/enum typedefs | |
173 | - drop expanded tokens in sgrep output. Thanks to Andriy Gapon for | |
174 | noticing the problem. | |
175 | - constant strings have array type, not pointer type. Thanks to Vasiliy | |
176 | Kulikov for noticing the problem. | |
1eddfd50 C |
177 | - improve indentation when adding code after a function call with indented |
178 | arguments. | |
179 | - return type of sizeof converted to unsigned long. Thanks to Vasiliy | |
180 | Kulikov for noticing the problem. | |
181 | - improve spacing when adding structure initializers. Thanks to Vasiliy | |
182 | Kulikov for noticing the problem. | |
413ffc02 | 183 | |
5636bb2c C |
184 | * 0.2.3 |
185 | ** Language: | |
186 | - <= constraints relating an expression metavariable to one or more | |
187 | inherited expression metavariables that it should be a subexpression of | |
188 | - the -inplace and -outplace options have been renamed -in_place and | |
189 | -out_place. -in_place no longer makes a backup. A backup can be | |
190 | requested using the option -backup_suffix, eg -backup_suffix .bk | |
191 | - identifiers can be constrained to be different from an inherited | |
192 | identifier metavariable, or from a set containing both concrete | |
193 | identifiers and inherited identifier metavariables. | |
174d1640 | 194 | - support for ocaml scripting |
aba5c457 | 195 | - ast available in ocaml scripts |
5636bb2c C |
196 | |
197 | ** Features: | |
198 | - drop inconsistent paths check when only one node was matched | |
199 | - allow #define id with no definition | |
200 | - attempt to add newlines in the generated code when function calls in the | |
201 | smpl cause passing column 80 | |
202 | - allow - in front of statement level nests, if everything inside the nest | |
203 | is also - | |
90aeb998 C |
204 | - 'configure' looks for some system libraries: menhirLib, sexplib, pycaml. |
205 | Not available libraries are replaced by a copy provided with the sources. | |
206 | - added static for a function goes just before what is specified in the | |
207 | semantic patch, not before any comments etc. | |
208 | - Add a new option, -ignore_unknown_options, to ease the integration | |
209 | of Coccinelle as a checker in a toolchain. | |
210 | - error in python code causes immediate abort of spatch | |
174d1640 | 211 | - use the same algorithm for collecting grep tokens as for collecting |
90aeb998 | 212 | glimpse tokens |
174d1640 C |
213 | - Add scripts/spatch.bash_completion for automatic completion of common |
214 | options under the bash shell. | |
aba5c457 | 215 | - Print rule name when a script rule crashes |
88e71198 C |
216 | - Allow the declaration of an expression list or parameter list |
217 | metavariable to specify the number of expressions or parameters, | |
218 | respectively. | |
5636bb2c C |
219 | |
220 | ** Bugfix: | |
221 | - drop inconsistent paths check when only one node was matched | |
222 | - better take into account virtual rules when selecting glimpse tokens | |
223 | - print diff when only a comment is added | |
224 | - the type of the C code !x should be int regardless of the type of x | |
225 | - allow python code at the beginning of an included file | |
226 | - better adjustment of whitespace when deleting adjacent lines. Thanks to | |
227 | Wolfram Sang for pointing out the problem. | |
228 | - allow metavariables to be inherited from included files | |
229 | - allow ? on goto | |
230 | - more graceful failure on finding a strange character in a macro parameter | |
231 | list | |
232 | - support Parameter metavariables | |
233 | - add space after the last comma in an added portion of an argument list | |
90aeb998 C |
234 | - SmPL nameless struct should only match a nameless struct, not a nameless |
235 | union. Thanks to Peter Tummeltshammer for pointing out the problem. | |
236 | - adjustments to storage don't modify inline as well | |
237 | - matching and transformation allowed on inline | |
238 | - allow removed field between two ... in structure initialization | |
239 | - allow removing an entire structure initialization | |
174d1640 C |
240 | - manage labels within do while 0 macros |
241 | - added space after : in printing a conditional expression. Thanks to Josh | |
242 | Triplett for noticing the problem. | |
aba5c457 C |
243 | - dropped trailing whitespace when code at the end of a line is deleted. |
244 | Thanks to Josh Triplett for noticing the problem. | |
88e71198 C |
245 | - Fixed environment management when script rule uses cache. Thanks to |
246 | Bissyande for finding the problem. | |
247 | - when false matches if with no else | |
18b1275a C |
248 | - ensure { ... } with whencode checks to the end of the function. Thanks to |
249 | Rene Rydhof Hansen for finding the problem. | |
5636bb2c | 250 | |
c3e37e97 C |
251 | * 0.2.2 |
252 | ** Language: | |
253 | - Added ToTestExpression to iso language, see standard.iso for an | |
254 | explanation | |
255 | - Added depends on to initialize and finalize script code | |
256 | ||
257 | ** Features: | |
258 | - Update Emacs mode (cocci.el) to support 'virtual' rules and fix other | |
259 | keywords sush as 'depends on', 'using', 'disable' | |
260 | - better treatment of != 0 in isos, communtativity for ==/!= for all | |
261 | constants | |
aa721442 | 262 | - allow adding // comments and blank lines (even after cocci + code) |
c3e37e97 C |
263 | - Add support for multiple -I options |
264 | ||
265 | ** Bugfix: | |
266 | - correct interaction between virtual rules and included .cocci files | |
267 | - improvement in treatment of ! in isos, to avoid duplicating + code | |
aa721442 | 268 | - improvement in treatment of metavars as isos, to avoid duplicating + code |
c3e37e97 C |
269 | between toplevel and variable instantiation |
270 | - test expression of smpl conditional, etc no longer assumed to have type | |
271 | int | |
272 | - correct + line numbers in the patch produced when using * | |
273 | - iso constant metavariable matches an identifier whose name is all capital | |
274 | letters, eg NULL | |
275 | - allow / at the end of the name of a directory (-dir) or patch prefix | |
276 | (-patch) | |
277 | - dropped space in + code after the binding of a type metavariable that is | |
278 | a pointer type | |
279 | - better handling of . or .. in -dir name | |
280 | - allow keywords and metavariable names in identifier constraints (not sure | |
281 | keywords is very useful, though) | |
aa721442 C |
282 | - no lubtype on arguments of && and || in SmPL |
283 | - allow unknown as type for array indices in SmPL | |
284 | - support matching of static annotation on functions that are both static | |
285 | and inline | |
286 | - support ENOTDIR error in Common.lfile_exists, to allow for the case where | |
287 | an include file is in a subdirectory that exists but is an ordinary file, | |
288 | not a directory. | |
289 | - better management of unbound position variables that appear in | |
290 | constraints | |
291 | - cause python parser to skip over // comments, hoping that // is not | |
292 | meaningful inside python | |
293 | - require + on every line of a multiline comment | |
d6a55602 C |
294 | - correct calculation of line numbers when there is script code |
295 | - always annotate arguments of && || and ! as test expressions in C code. | |
c3e37e97 | 296 | |
ae4735db C |
297 | * 0.2.1 |
298 | ** Language: | |
299 | - Add virtual identifiers | |
300 | - Add coccilib.report and coccilib.trac Python modules | |
301 | - coccilib.org and coccilib.report are imported by default but not loaded | |
302 | in the current scope. | |
303 | ||
304 | ** Features: | |
305 | - Parse_error_msg now more helpful. New option -verbose_parsing for even | |
306 | more information. | |
307 | - Improve Python import handling. They are imported once during script | |
308 | initialization. | |
309 | ||
310 | ** Bugfix: | |
311 | - correct treatment of depends on with || for virtual rules | |
312 | ||
7f004419 C |
313 | * 0.2.0 |
314 | ** Language: | |
315 | ||
316 | ** Features: | |
317 | - Remove duplicated code in disjunctions | |
318 | - Better error message when grep finds nothing relevant. Thanks to Joe | |
319 | Perches for the suggestion. | |
320 | - added -keep_comments option for the unparsing of the transformed code | |
321 | - Option "-version" now also gives information about built-in | |
322 | Python binding support. | |
9f8e26f4 C |
323 | - slightly faster environment manipulation in pathological cases |
324 | - hack added to accept well-formed #define after function header | |
7f004419 C |
325 | |
326 | ** Bugfix: | |
9f8e26f4 | 327 | - Proper consideration of #define macro arguments in checking for the use |
7f004419 | 328 | of metavariables and in computing the line numbers of complex terms |
9f8e26f4 C |
329 | - Better parsing of included .cocci files |
330 | - Put included .cocci files in the right order | |
331 | - Bind position variables only once for #include | |
332 | - Fix bug in include_match that caused everything to halt when all matches | |
7f004419 | 333 | were discarded |
9f8e26f4 C |
334 | - Merge unlikely/likely iso rules under a iso rule named unlikely |
335 | - Some fixes to coccicheck rules, thanks to Andrew Lunn | |
336 | - Support groups in regular expression, thanks to Michael Stefaniuc | |
7f004419 | 337 | |
951c7801 C |
338 | * 0.1.11 |
339 | ||
340 | ** Language: | |
341 | - Meta-identifier/function and constant could be filtered from SmPL by | |
342 | regular expressions using the "~=" and "!~=" operators followed by | |
343 | an OCaml regular expression (see man Str) in double quote. | |
7f004419 C |
344 | - Virtual rules, which can be referenced in depends, and set and unset |
345 | using the command-line options -D | |
346 | - ++ for multiple additions | |
951c7801 C |
347 | |
348 | ** Features: | |
951c7801 C |
349 | - coccicheck: a framework to check a series of SmPL files on a project |
350 | see scripts/coccicheck for more information | |
351 | ||
352 | ** Bugfix: | |
353 | - bind position variables to the correct starting position in the case of a | |
354 | complex statement such as an if or while. Thanks to Derek Jones for | |
355 | pointing out the problem. | |
356 | - checking for non mentioned case lines in switch should be unchecked. | |
357 | - space should be printed after sizeof when there are no parentheses around | |
358 | the argument. Thanks to Daniel Walker for pointing out the problem. | |
359 | - avoid introducing sharing in propagating ! over () in treatment of isos | |
360 | - save_excursion has to handle and rethrow exceptions | |
361 | - eliminate unnecessary consideration of CVS strings. Thanks to David | |
362 | Young for pointing out the problem. | |
363 | - completely new treatment of statement metavariables | |
951c7801 C |
364 | - better type checking for macro definitions |
365 | - drop regression testing in -parse_c | |
366 | ||
fc1ad971 C |
367 | * 0.1.10 |
368 | ||
369 | ** Language: | |
370 | - declarations allowed in switch, suggested by Derek M. Jones | |
371 | ||
372 | ** Features: | |
373 | - use interval timer for timeouts. Thanks to Derek M. Jones for the | |
374 | implementation. | |
375 | - more flexible env.sh, thanks to Derek Jones. | |
376 | - faster Python invocation | |
377 | - simplify unparsing in the sgrep case | |
378 | ||
379 | ** Bugfix: | |
380 | - for glimpse there is no point to create a pattern containing a numeric | |
381 | constant because glimpse doesn't index them | |
382 | - add spaces after commas in function calls and function headers | |
383 | - made python integration more like the ubuntu version | |
384 | http://patches.ubuntu.com/by-release/extracted/debian/c/coccinelle/0.1.5dbs-2/01-system-pycaml | |
385 | this fixes some memory management problems with None, True, and False | |
386 | - correct labels associated with a switch in the CFG so that a statement | |
387 | metavariable can match a switch. Thanks to Derek Jones for pointing out | |
388 | the problem. | |
389 | - keep switch pattern within switch body. Thanks to Derek Jones for | |
390 | pointing out the problem. | |
391 | - Allow expanded tokens to be stored in metavariables, as long as they are | |
392 | not removed. But this does currently allow them in + code, which will | |
393 | produce the expansion. Thanks to Ali-Erdem Ozcan for pointing out the | |
394 | problem. | |
395 | - improved adjustment of spacing when code removed at the beginning of a line | |
396 | ||
978fd7e5 C |
397 | * 0.1.9 |
398 | ||
399 | ** Language: | |
400 | - allow fresh identifiers to be declared using ## such that the value mixes | |
401 | both strings and previously declared metavariables | |
402 | ||
403 | ** Features: | |
404 | - better handling of expanded code containing ##. Now compute the | |
405 | result. | |
406 | - more precise warning message for the "'\' outside define". | |
407 | Thanks to Nicholas Mc Guire for pointing out the problem. | |
408 | - more precise warning message related to ifdefization. | |
409 | Thanks to Derek Jones for pointing out the problem. | |
410 | - we don't create any more certain files in /tmp (they may be a cause | |
411 | of security problems). | |
412 | Thanks to Eugeniy Meshcheryakov for pointing out the problem. | |
413 | - More optimization for the case of just deleting a complete function. | |
414 | Allows this to happen without tracing through all the control-flow | |
415 | paths. Thanks to Francois Bissyande for pointing out the problem. | |
416 | - prevent code from being added to the beginning or end of a disjunction | |
417 | - more information about why a script is not applied when using -debug option | |
418 | - added -no_safe_expressions option | |
419 | - added -no_loops option. Ignores back edges derived from looping | |
420 | constructs. This is unsafe, but perhaps useful for bug finding, as it can | |
421 | be more efficient. | |
422 | - for semantic matches, allow "minus" on same code with multiple | |
423 | environments | |
424 | - better error message for mismatch of parenthesis in column 0 with normal | |
425 | parenthesis. Thanks to Derek Jones for pointing out the problem. | |
426 | - allow disjunctions on function return types. Thanks to Pierre Habouzit | |
427 | for pointing this out. | |
428 | ||
429 | ** Bugfix: | |
430 | - keep disjunction in the proper order for structure initialization fields | |
431 | - variables declared in different places should not seem to match each | |
432 | other | |
433 | - drop complaints about label metavariables not being used | |
434 | - drop test information from the type of an expression when the expression | |
435 | is bound to a metavariable | |
436 | - nests should not extend beyond the before and after code, even if the | |
437 | before and after code matches the nest code | |
438 | - nests should extend into conditionals that end in error exit | |
439 | - take into account metavariables on "else". Thanks to Derek Jones for | |
440 | pointing out the problem. | |
441 | - print single quotes on generated character constants | |
442 | - better typedef handling in the initialisation/affectation builtin | |
443 | isomorphism, cf -test init_affect_typedef | |
444 | - support disjunction of types on variable declaration | |
002099fc C |
445 | - allow @ within strings in script code. ignore // comment lines in script |
446 | code. | |
447 | - don't drop + code placed after the transformed code | |
448 | - drop spaces produced by removing code before semicolons | |
449 | - adjusted spacing within generated code | |
450 | - less verbose -sp. Thanks to Derek Jones for pointing out the problem. | |
451 | - accept multiple type names in a SmPL typedef declaration. | |
978fd7e5 | 452 | |
708f4980 C |
453 | * 0.1.8 |
454 | ||
455 | ** Language: | |
456 | ||
457 | ** Features: | |
458 | - Metavariables now capture the cpp code contained within their definitions | |
459 | - When - fragments are separated by ... or nest boundaries in the semantic | |
460 | patch, but end up matching adjacent source code, the comments, cpp code | |
461 | and whitespace that are between them are not deleted. | |
462 | - better parsing of C: do expansion of macros only when needed when | |
463 | have actually a parse error and also leverage the definition of macros | |
464 | in the parsed file (or in a optional_standard.h file passed as a parameter). | |
465 | This should reduce the need for many hardcoded definitions in standard.h | |
466 | - new semantics for the -macro_file option, by default now expand macros | |
467 | only when necessary. To force use the -macro_file_builtins option instead. | |
468 | - a new -extract_macros command line action to help the parser. Works with | |
469 | the -macro_file option. e.g. | |
470 | $ ./spatch -extract_macros ~/linux > /tmp/alldefs.h | |
471 | $ ./spatch -macro_file /tmp/alldefs.h -sp_file foo.cocci -dir ~/linux | |
472 | - removed -D macro_file option, not consistent with what -D usually means | |
473 | - reattempt to be more efficient for statement metavariables that are just | |
474 | placeholders (ie, no modification, no reuse) | |
475 | - triples now returned from ctl in sorted order. The main key is the | |
476 | state. On the other hand, the state order does not always agree with the | |
477 | order of appearance in the code. | |
478 | - spatch is now less verbose on the things it does yet handle. Less confusing | |
479 | for new users. | |
480 | - slightly better error report. Thanks to Derek Jones for the suggestion. | |
481 | - added the options -linux_spacing and -smpl_spacing. -linux_spacing | |
482 | causes spatch to follow the spacing conventions of Linux, while | |
483 | -smpl_spacing causes spatch to follow the spacing in the semantic patch. | |
484 | -linux_spacing is the default. | |
485 | - more informative error reporting for the already tagged token case. | |
486 | Thanks to Erik Hovland for the suggestion. | |
487 | ||
488 | ** Bugfix: | |
489 | - better parsing of declare macro at toplevel and in structure. | |
490 | cf -text xfield | |
491 | - allowing back typedef names for fieldname | |
492 | - better printing of else in generated code | |
493 | - slightly better type inference for binary operators. | |
494 | - clear out declarer names and iterator names between SmPL files (for | |
495 | -testall) | |
496 | - better parsing and type checking of macro type aliases. Cf -test macro_int16. | |
497 | Thanks to Li Yingtong for pointing out the problem. | |
498 | - make insert_virtual_positions tail rec, avoid stack overflow pb. | |
499 | Thanks to Diego Liziero <diegoliz@gmail.com> for pointing out the | |
500 | problem. | |
501 | - Better type inference for arithmetic binary operators | |
502 | Thanks to Li Yingtong for pointing out the problem. | |
503 | - Better type inference for constants | |
504 | Thanks to Li Yingtong for pointing out the problem. | |
505 | - move computing of adjacency information for semantic patches to after | |
506 | application of isomorphisms, because isomorphisms can introduce "..." | |
507 | - compute adjacency information for negated ... | |
508 | - record with each transformation site the set of indices of the witness | |
509 | trees that caused the transformation site to come about. Whitespace and | |
510 | comments between remove tokens associated with disjoint witness trees is | |
511 | not removed. | |
512 | - correct treatment of function pointer typed parameters in the SmPL ast0 | |
513 | visitor. | |
514 | - better parsing error message and error recovery when comments are not ended, | |
515 | when some macros have a weird body, and when some switch have a weird | |
516 | Body. | |
517 | Thanks to Derek Jones for pointing out the problem. | |
518 | - better detection and passing of "dangerous" ifdefs, cf -test | |
519 | double_switch. | |
520 | - dropped the separation of decls and body in Seq. This gives better | |
521 | positioning of the bindings of metavariables shared between them. | |
522 | Thanks to Erik Hovland for an example that shows the problem. | |
523 | ||
524 | ** Internals: | |
525 | - supress warning in compiling ocamlsexp (warning caused by a new behavior | |
526 | of cpp used internally in processing files in ocamlsexp/) | |
527 | ||
b1b2de81 C |
528 | * 0.1.7 |
529 | ||
530 | ** Language: | |
531 | - initialize and finalize script code, cf demos/initial_final.cocci | |
532 | ||
533 | ** Features: | |
534 | - -iso_limit option to limit the depth of isomorphism application | |
535 | - with the dir option, the include path is implicitly set to the "include" | |
536 | subdirectory of the specified directory, if the option -I is not used. | |
537 | - give a seed for the name of a fresh identifier | |
538 | - better handling of cpp "constructed" identifiers as in a##b, that in | |
539 | the futur will make it easier to match over those idents. | |
540 | cf tests/pb_parsing_macro.c. Thanks to Ali-Erdem Ozcan for pointing | |
541 | out the problem. A new "parsing hack hint" is also available: | |
542 | YACFE_IDENT_BUILDER, cf standard.h. | |
543 | ||
544 | ** Bugfix: | |
545 | - drop excessive "optimization" in ctl generation for while and for loops | |
546 | - allow . as the name of the directory | |
547 | - for type inference for an assignment, take the type of the right-hand | |
548 | side expression, not the type of the assigned variable | |
549 | - allow for with a declartion in the first header element, as in C++ | |
550 | (partial support) | |
551 | - allow for matching against variable declarations that include only | |
552 | storage, eg static, but no type at all. | |
553 | - allow for matching against types that contain both short/long and int | |
554 | - allow the type metavariable in the SmPL code "unsigned T" to match a T | |
555 | that is a type consisting of more than one word, eg long int. | |
556 | - -ifdef_to_if option made to process nested ifdefs | |
557 | (partial support) | |
558 | ||
559 | ** Internals: | |
560 | - improve and fix installation process (usable on BSD) | |
561 | - improve and fix testing process | |
562 | - apply patches from Eugeniy Meshcheryakov | |
563 | - reorganize the way we parse C identifiers, especially concatenated cpp | |
564 | identifiers as in a##b. This may lead to some regressions as we may | |
565 | not parse as much code as before. | |
566 | - removed popl/ and popl09/ and popl related stuff from official distrib. | |
567 | ||
0708f913 | 568 | * 0.1.6 |
113803cf | 569 | |
b1b2de81 C |
570 | ** Language: |
571 | - the ability to add comments | |
572 | ||
113803cf | 573 | ** Features: |
0708f913 C |
574 | - grouping of generated rules with -hrule option |
575 | - handling of special coccinelle comments | |
576 | /* {{coccinelle:skip_start}} */ and | |
577 | /* {{coccinelle:skip_end}} */ | |
578 | allowing to give more hints to the C parser. | |
579 | Thanks to Flavien@lebarbe.net for the idea. | |
0708f913 C |
580 | - the ability to print the values of more (but not all) kinds of |
581 | metavariables from python | |
582 | - new vim SmPL mode. | |
583 | Thanks to Alexander Faroy. | |
584 | ||
585 | ** Bugfix: | |
586 | - consider the ident tokens also in the 2 lines before the error line for the | |
587 | 10-most-problematic-parsing-errors diagnostic. | |
588 | - SmPL parser allows cast as the argument of a pointer | |
589 | - SmPL type checker allows enum as an array index | |
590 | - Better generation of fresh metavariables names in hrule | |
591 | - no more warnings about things that should be metavariables when there is | |
592 | a disjunction in a function position | |
593 | - bugfix in parser, better error message. | |
594 | Thanks to Ali-Erdem OZCAN <ali-erdem.ozcan@st.com> for the bug report. | |
595 | ||
596 | ** Internals: | |
597 | ||
598 | * 0.1.5 | |
599 | ||
600 | ** Language: | |
113803cf C |
601 | - added initialiser metavariable |
602 | - added sequences of designators in structures | |
0708f913 C |
603 | |
604 | ** Features: | |
113803cf C |
605 | - improved printing of the C code corresponding to metavariables |
606 | - improved printing when code (eg declarations) is removed at the beginning | |
607 | of a block, and then is followed by a blank line | |
608 | - slightly less verbose error reporting in parsing_hacks | |
609 | ||
610 | ** Bugfix: | |
611 | - fixed some problems with parsing SmPL code where a nest appears after a | | |
612 | - better treatment of { }, form in macros wrt unparse_c | |
613 | - less quiet for -parse_c | |
614 | - improve parsing heuristics regarding macro statement | |
615 | ||
616 | ** Internals: | |
617 | ||
faf9a90c C |
618 | * 0.1.4 |
619 | ||
0708f913 C |
620 | ** Language: |
621 | - long long added to SmPL | |
622 | ||
708f4980 C |
623 | ** Documentation: |
624 | - add grammar reference and spatch command line options reference | |
625 | ||
faf9a90c C |
626 | ** Features: |
627 | - can match patterns of the form unsigned T or signed T, where T is a | |
628 | metavariable | |
629 | - dropped the sizeof_parens isomorphism, which was made redundant by the | |
630 | paren isomorphism | |
631 | - simple rule generation | |
faf9a90c C |
632 | |
633 | ** Bugfix: | |
634 | - trailing , ; and ) no longer left on a line by themselves | |
635 | - better treatment of error exit when the searched for code matches the | |
636 | error exit condition. | |
637 | - fix incorrect treatment of parentheses in test_exps that could allow + | |
638 | code to be added twice | |
639 | - don't ask whether iterator names and declarer names should be declared as | |
640 | metavariables. | |
641 | - slightly better support for expression list metavariables. | |
642 | - short and long allowed for array index types in SmPL | |
643 | - more restrictions on type inference for pointer arithmetic in SmPL | |
644 | - allow isomorphisms to apply when + code is anywhere within all - terms | |
645 | - changed order of printing const and volatile | |
646 | - allow eg ... <... in plus code | |
647 | - better formatting of generated if/while/etc. code | |
648 | - better parse error reporting when the problem is at the end of the file | |
649 | ||
650 | ** Internals: | |
651 | - isomorphisms don't apply under signed/unsigned, to prevent the creation | |
652 | of things like unsigned signed int. Need a better solution for this. | |
653 | ||
91eba41f C |
654 | * 0.1.3 |
655 | ||
656 | ** Features: | |
657 | - help in building the configuration macro file. The -parse_c action | |
658 | now returns the 10 most frequent parsing errors. This give useful | |
659 | hints to extend standard.h. | |
660 | ||
661 | ** Bugfix: | |
662 | - positions no longer allowed on \(, \|, and \) | |
663 | - improved propagation of negation for isos in the presence of parens | |
664 | - convert Todos in flow graph construction to recoverable errors | |
665 | - fixed bug in treatment of when != true and when != false, to allow more | |
666 | than one of them per ... | |
667 | - improve parsing of typedef of function pointer. | |
668 | - improve typing. | |
669 | - parsing and typing support for old style C function declaration. | |
670 | - consider position variables as modifications when optimizing the | |
671 | translation into CTL of function definitions | |
672 | ||
673 | ** Internals: | |
674 | ||
485bce71 C |
675 | * 0.1.2 |
676 | ||
677 | ** Bugfix: | |
678 | - better handling of ifdef on statements in control flow graph. | |
679 | - transform files even if they do not end in .c (thanks to Vegard Nossum) | |
680 | ||
681 | ** Internals: | |
682 | - merge code of yacfe | |
683 | ||
1be43e12 C |
684 | * 0.1.1 |
685 | ||
0708f913 | 686 | ** Language: |
485bce71 | 687 | - support for initializer at toplevel, cf -test substruct |
1be43e12 | 688 | |
34e49164 C |
689 | * 0.1 |
690 | ||
691 | ** first public release of the source code: | |
692 | ||
0708f913 | 693 | ** Language: |
34e49164 C |
694 | - embeded python scripting |
695 | - position | |
696 | ||
0708f913 C |
697 | ** Features |
698 | ||
34e49164 C |
699 | * beta |
700 | ||
701 | ** first public release of the binary | |
702 | ||
703 | * alpha | |
704 | ||
705 | ** Features | |
706 | - lots of features ... look at coccinelle research papers and tutorials. |