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