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