Release coccinelle-0.1.9-rc1
[bpt/coccinelle.git] / changes.txt
1 -*- org -*-
2
3 * 0.1.9
4
5 ** Language:
6 - allow fresh identifiers to be declared using ## such that the value mixes
7 both strings and previously declared metavariables
8
9 ** Features:
10 - better handling of expanded code containing ##. Now compute the
11 result.
12 - more precise warning message for the "'\' outside define".
13 Thanks to Nicholas Mc Guire for pointing out the problem.
14 - more precise warning message related to ifdefization.
15 Thanks to Derek Jones for pointing out the problem.
16 - we don't create any more certain files in /tmp (they may be a cause
17 of security problems).
18 Thanks to Eugeniy Meshcheryakov for pointing out the problem.
19 - More optimization for the case of just deleting a complete function.
20 Allows this to happen without tracing through all the control-flow
21 paths. Thanks to Francois Bissyande for pointing out the problem.
22 - prevent code from being added to the beginning or end of a disjunction
23 - more information about why a script is not applied when using -debug option
24 - added -no_safe_expressions option
25 - added -no_loops option. Ignores back edges derived from looping
26 constructs. This is unsafe, but perhaps useful for bug finding, as it can
27 be more efficient.
28 - for semantic matches, allow "minus" on same code with multiple
29 environments
30 - better error message for mismatch of parenthesis in column 0 with normal
31 parenthesis. Thanks to Derek Jones for pointing out the problem.
32 - allow disjunctions on function return types. Thanks to Pierre Habouzit
33 for pointing this out.
34
35 ** Bugfix:
36 - keep disjunction in the proper order for structure initialization fields
37 - variables declared in different places should not seem to match each
38 other
39 - drop complaints about label metavariables not being used
40 - drop test information from the type of an expression when the expression
41 is bound to a metavariable
42 - nests should not extend beyond the before and after code, even if the
43 before and after code matches the nest code
44 - nests should extend into conditionals that end in error exit
45 - take into account metavariables on "else". Thanks to Derek Jones for
46 pointing out the problem.
47 - print single quotes on generated character constants
48 - better typedef handling in the initialisation/affectation builtin
49 isomorphism, cf -test init_affect_typedef
50 - support disjunction of types on variable declaration
51
52
53 * 0.1.8
54
55 ** Language:
56
57 ** Features:
58 - Metavariables now capture the cpp code contained within their definitions
59 - When - fragments are separated by ... or nest boundaries in the semantic
60 patch, but end up matching adjacent source code, the comments, cpp code
61 and whitespace that are between them are not deleted.
62 - better parsing of C: do expansion of macros only when needed when
63 have actually a parse error and also leverage the definition of macros
64 in the parsed file (or in a optional_standard.h file passed as a parameter).
65 This should reduce the need for many hardcoded definitions in standard.h
66 - new semantics for the -macro_file option, by default now expand macros
67 only when necessary. To force use the -macro_file_builtins option instead.
68 - a new -extract_macros command line action to help the parser. Works with
69 the -macro_file option. e.g.
70 $ ./spatch -extract_macros ~/linux > /tmp/alldefs.h
71 $ ./spatch -macro_file /tmp/alldefs.h -sp_file foo.cocci -dir ~/linux
72 - removed -D macro_file option, not consistent with what -D usually means
73 - reattempt to be more efficient for statement metavariables that are just
74 placeholders (ie, no modification, no reuse)
75 - triples now returned from ctl in sorted order. The main key is the
76 state. On the other hand, the state order does not always agree with the
77 order of appearance in the code.
78 - spatch is now less verbose on the things it does yet handle. Less confusing
79 for new users.
80 - slightly better error report. Thanks to Derek Jones for the suggestion.
81 - added the options -linux_spacing and -smpl_spacing. -linux_spacing
82 causes spatch to follow the spacing conventions of Linux, while
83 -smpl_spacing causes spatch to follow the spacing in the semantic patch.
84 -linux_spacing is the default.
85 - more informative error reporting for the already tagged token case.
86 Thanks to Erik Hovland for the suggestion.
87
88 ** Bugfix:
89 - better parsing of declare macro at toplevel and in structure.
90 cf -text xfield
91 - allowing back typedef names for fieldname
92 - better printing of else in generated code
93 - slightly better type inference for binary operators.
94 - clear out declarer names and iterator names between SmPL files (for
95 -testall)
96 - better parsing and type checking of macro type aliases. Cf -test macro_int16.
97 Thanks to Li Yingtong for pointing out the problem.
98 - make insert_virtual_positions tail rec, avoid stack overflow pb.
99 Thanks to Diego Liziero <diegoliz@gmail.com> for pointing out the
100 problem.
101 - Better type inference for arithmetic binary operators
102 Thanks to Li Yingtong for pointing out the problem.
103 - Better type inference for constants
104 Thanks to Li Yingtong for pointing out the problem.
105 - move computing of adjacency information for semantic patches to after
106 application of isomorphisms, because isomorphisms can introduce "..."
107 - compute adjacency information for negated ...
108 - record with each transformation site the set of indices of the witness
109 trees that caused the transformation site to come about. Whitespace and
110 comments between remove tokens associated with disjoint witness trees is
111 not removed.
112 - correct treatment of function pointer typed parameters in the SmPL ast0
113 visitor.
114 - better parsing error message and error recovery when comments are not ended,
115 when some macros have a weird body, and when some switch have a weird
116 Body.
117 Thanks to Derek Jones for pointing out the problem.
118 - better detection and passing of "dangerous" ifdefs, cf -test
119 double_switch.
120 - dropped the separation of decls and body in Seq. This gives better
121 positioning of the bindings of metavariables shared between them.
122 Thanks to Erik Hovland for an example that shows the problem.
123
124 ** Internals:
125 - supress warning in compiling ocamlsexp (warning caused by a new behavior
126 of cpp used internally in processing files in ocamlsexp/)
127
128 * 0.1.7
129
130 ** Language:
131 - initialize and finalize script code, cf demos/initial_final.cocci
132
133 ** Features:
134 - -iso_limit option to limit the depth of isomorphism application
135 - with the dir option, the include path is implicitly set to the "include"
136 subdirectory of the specified directory, if the option -I is not used.
137 - give a seed for the name of a fresh identifier
138 - better handling of cpp "constructed" identifiers as in a##b, that in
139 the futur will make it easier to match over those idents.
140 cf tests/pb_parsing_macro.c. Thanks to Ali-Erdem Ozcan for pointing
141 out the problem. A new "parsing hack hint" is also available:
142 YACFE_IDENT_BUILDER, cf standard.h.
143
144 ** Bugfix:
145 - drop excessive "optimization" in ctl generation for while and for loops
146 - allow . as the name of the directory
147 - for type inference for an assignment, take the type of the right-hand
148 side expression, not the type of the assigned variable
149 - allow for with a declartion in the first header element, as in C++
150 (partial support)
151 - allow for matching against variable declarations that include only
152 storage, eg static, but no type at all.
153 - allow for matching against types that contain both short/long and int
154 - allow the type metavariable in the SmPL code "unsigned T" to match a T
155 that is a type consisting of more than one word, eg long int.
156 - -ifdef_to_if option made to process nested ifdefs
157 (partial support)
158
159 ** Internals:
160 - improve and fix installation process (usable on BSD)
161 - improve and fix testing process
162 - apply patches from Eugeniy Meshcheryakov
163 - reorganize the way we parse C identifiers, especially concatenated cpp
164 identifiers as in a##b. This may lead to some regressions as we may
165 not parse as much code as before.
166 - removed popl/ and popl09/ and popl related stuff from official distrib.
167
168 * 0.1.6
169
170 ** Language:
171 - the ability to add comments
172
173 ** Features:
174 - grouping of generated rules with -hrule option
175 - handling of special coccinelle comments
176 /* {{coccinelle:skip_start}} */ and
177 /* {{coccinelle:skip_end}} */
178 allowing to give more hints to the C parser.
179 Thanks to Flavien@lebarbe.net for the idea.
180 - the ability to print the values of more (but not all) kinds of
181 metavariables from python
182 - new vim SmPL mode.
183 Thanks to Alexander Faroy.
184
185 ** Bugfix:
186 - consider the ident tokens also in the 2 lines before the error line for the
187 10-most-problematic-parsing-errors diagnostic.
188 - SmPL parser allows cast as the argument of a pointer
189 - SmPL type checker allows enum as an array index
190 - Better generation of fresh metavariables names in hrule
191 - no more warnings about things that should be metavariables when there is
192 a disjunction in a function position
193 - bugfix in parser, better error message.
194 Thanks to Ali-Erdem OZCAN <ali-erdem.ozcan@st.com> for the bug report.
195
196 ** Internals:
197
198 * 0.1.5
199
200 ** Language:
201 - added initialiser metavariable
202 - added sequences of designators in structures
203
204 ** Features:
205 - improved printing of the C code corresponding to metavariables
206 - improved printing when code (eg declarations) is removed at the beginning
207 of a block, and then is followed by a blank line
208 - slightly less verbose error reporting in parsing_hacks
209
210 ** Bugfix:
211 - fixed some problems with parsing SmPL code where a nest appears after a |
212 - better treatment of { }, form in macros wrt unparse_c
213 - less quiet for -parse_c
214 - improve parsing heuristics regarding macro statement
215
216 ** Internals:
217
218 * 0.1.4
219
220 ** Language:
221 - long long added to SmPL
222
223 ** Documentation:
224 - add grammar reference and spatch command line options reference
225
226 ** Features:
227 - can match patterns of the form unsigned T or signed T, where T is a
228 metavariable
229 - dropped the sizeof_parens isomorphism, which was made redundant by the
230 paren isomorphism
231 - simple rule generation
232
233 ** Bugfix:
234 - trailing , ; and ) no longer left on a line by themselves
235 - better treatment of error exit when the searched for code matches the
236 error exit condition.
237 - fix incorrect treatment of parentheses in test_exps that could allow +
238 code to be added twice
239 - don't ask whether iterator names and declarer names should be declared as
240 metavariables.
241 - slightly better support for expression list metavariables.
242 - short and long allowed for array index types in SmPL
243 - more restrictions on type inference for pointer arithmetic in SmPL
244 - allow isomorphisms to apply when + code is anywhere within all - terms
245 - changed order of printing const and volatile
246 - allow eg ... <... in plus code
247 - better formatting of generated if/while/etc. code
248 - better parse error reporting when the problem is at the end of the file
249
250 ** Internals:
251 - isomorphisms don't apply under signed/unsigned, to prevent the creation
252 of things like unsigned signed int. Need a better solution for this.
253
254
255 * 0.1.3
256
257 ** Features:
258 - help in building the configuration macro file. The -parse_c action
259 now returns the 10 most frequent parsing errors. This give useful
260 hints to extend standard.h.
261
262 ** Bugfix:
263 - positions no longer allowed on \(, \|, and \)
264 - improved propagation of negation for isos in the presence of parens
265 - convert Todos in flow graph construction to recoverable errors
266 - fixed bug in treatment of when != true and when != false, to allow more
267 than one of them per ...
268 - improve parsing of typedef of function pointer.
269 - improve typing.
270 - parsing and typing support for old style C function declaration.
271 - consider position variables as modifications when optimizing the
272 translation into CTL of function definitions
273
274 ** Internals:
275
276 * 0.1.2
277
278 ** Bugfix:
279 - better handling of ifdef on statements in control flow graph.
280 - transform files even if they do not end in .c (thanks to Vegard Nossum)
281
282 ** Internals:
283 - merge code of yacfe
284
285 * 0.1.1
286
287 ** Language:
288 - support for initializer at toplevel, cf -test substruct
289
290 * 0.1
291
292 ** first public release of the source code:
293
294 ** Language:
295 - embeded python scripting
296 - position
297
298 ** Features
299
300 * beta
301
302 ** first public release of the binary
303
304 * alpha
305
306 ** Features
307 - lots of features ... look at coccinelle research papers and tutorials.