Release of coccinelle 1.0.0-rc9
authorCoccinelle <cocci@diku.dk>
Sun, 22 Jan 2012 18:56:03 +0000 (19:56 +0100)
committerRene Rydhof Hansen <rrh@cs.aau.dk>
Sun, 22 Jan 2012 18:56:03 +0000 (19:56 +0100)
commit97111a47d707638a835d7498276ac6768a052ee8
tree612f9cfd9cfad707e8afdd45175b410ca7063617
parent7fe62b653dbe13c8fc74c58c3ca4b8af523c1637
Release of coccinelle 1.0.0-rc9

** Language:
- Addition of initializer list metavariables.  Thanks to Michael Stefaniuc
  for noticing the need for them.
- Allow multiple position variables per token
- ++ can now be associated with - code
- Allow /* */ comments as smpl comments, not only as + code
- Add support for && (label addresses)
- local idexpression metavariable no longer matches static local x
- Consider using to be a comment in C++ code.  Patch submitted by Jani Monoses.
- Command line cocci
- print_main etc for ocaml Coccilib
- =~ not ~= is used to indicate a regular expression constraint on an
  identifier.  And !~ for a nonmatch.
- allow long double, short int, long int, and long long int in SmPL code.
- gcc constructors allowed in SmPL.  Thanks to Uwe Kleine-Koenig for
  pointing out the problem.
- Allow ! to appear before () in depends.  Thanks to SF Markus Elfring for
  noticing the problem.
- Can add code containing #pragma or #line.

** Features:
- Preserve spacing before // comments when not at the beginning of a line
- Adjusted parsing of endif to put it after jump code
- Improve warning message when using -use_cache
- More helpful initial value for exported variables in python
- Support - on expression nests
- Better handling of the case of a matched declaration that should only
  be replaced by other top level things.
- Allow a semantic patch beginning and ending with braces to match the
  complete body of a function if the braces are not removed and if nothing
  is added before the first brace or after the last one.
- Add -cache_prefix option, to specify where to put cached files.
- Allow module_init(foo); to match module_init(foo) (or likewise for any
  declarer), when no transformation is specified on the semicolon.
- Add Coccilib.exit() for ocaml code and cocci.exit() for python code,
  to abort the treatment of the current file.
- Don't multiply print the same patch for the same file
- Drop date in diff
- Don't repeat smpl type warnings
- -sp_file/-cocci_file are now optional.  If not present an argument that
  ends in .cocci is assumed to be the name of the file containing the
  semantic patch.
- Allow limiting the size of a named cache using -cache_limit
- Cache name specified with -cache_prefix is extended according to the
  index (parallelism), if any.
- Allow multi-character constants in C code and SmPL code.  Thanks to Kamil
  Pilch for pointing out the problem.
- Better parsing of K&R C functions.  No longer convert all parameters to
  typedefs.
- Implement newes as a hash table, for more efficiency on big sets of
  environments.
- A local variable that is declared without a type is not considered to be
  a local variable.  Actually, such a variable is probably really a macro
  that expends to a declaration, and this macro is not the variable name.
- Allow iteration to make modifications when the modifications are done
  inplace.
- -debug gives information about defined virtual rules and about virtual
  identifier bindings.
- no more crashing on c++-like code without the c++ argument.
- dependencies can have ! on ()
- Give ocaml code access to Flag and thus the current file name.

** Bugfix:
- Corrected parsing of script strings delimited by a single quote.  Thanks
  to Eugeniy Meshcheryakov for reporting the problem.
- Improved indentation of added ifdefs.
- Allow added comments and #ifdefs to precede other added code.  Thanks to
  Jani Monoses for noticing the problem.
- Corrected failure to due missing ocamlfind. Thanks to Derek M. Jones for
  reporting the problem.
- Allow fake nodes to be - in the allminus case, to drop tokens related to
  a function definition or forward declaration but before the first code
  mentioned in the semantic patch.
- Drop __init etc when deleting a whole function.
- Cause appropriate newlines to be preserved when multiple matches (trees)
  contain adjacent modifications derived from the same SmPL code.
- check_meta takes into account fresh identifier seed information.
- Types for worth-trying optimization should not be followed by space
- Improved filtering of result of matching atomic patterns
- Drop positions before creating function prototype rules
- Adjust position of { introduced by adding multiple statements in a
  single-statement position
- Drop newline after function call ( when all arguments on that line are
  eliminated
- Accept removal of a single declaration, replaced by arbitrary,
  non-declaration code
- smpl_spacing takes into account newlines, indentation
- Improved prevention of transformations on toplevel { ... } from causing
  changes outside function boundaries; also outside ifs, whiles, etc.
  Changes are still allowed on { ... } present for other reasons.
- Fix bug in include_match that caused everything to halt when all matches
  were discarded
- Don't call Insert_plus on rules that cannot be evaluated due to failed
  dependencies.
- Allow variable declaration right after a case in switch.
- The top of a loop is also after the body of a loop, for ... in loop body
- Do not anchor Str regexp at the beginning of the string to check
- Type annotation for C code uses most recent env for typedefs when
  possible.  Thanks to Andrea Canciani for pointing out the problem.
- Pretty print pointer types without a trailing space.  Thanks to Michael
  Stefaniuc for pointing out the problem.
- Propagate dependencies further in get_constants2
- Make lexer more dos friendly
- slightly better handling of long long
- Strip constraints from metavariables in function prototype treatment
  before comparison, due to incomparability of pcre regexps.
- Fixed obsolete regexp doc, thanks to Dmitry Osmakov
- Improved x || ... || y to avoid double modification
- Transparently allow \( \| and \) to be on lines beginning with -.  The -
  has no effect.
- Remove memory leak related to pr2_once management.  Thanks to Robert
  Gomulka for helping to solve the problem.  Don't use once hashtable if
  messages won't be printed anyway.
- Change the type of subtraction mixing pointer and array to have int result.
  Thanks to Robert Gomulka for noticing the problem.
- Fix interpretation of dependencies in the presence of virtual rules.
  Ignore constraints on inherited position metavariables in a rule that
  will be ignored.
- Better support meta iterator and meta declarer tokens, and symid tokens.
- Better indentation after added noindent.
75 files changed:
Makefile
Makefile.dev
Makefile.libs [new file with mode: 0644]
Makefile.release
changes.txt
cocci.ml
commons/common.ml
commons/ocamlextra/dynArray.ml
commons/ocamlextra/dynArray.mli
commons/ocamlextra/enum.ml
commons/ocamlextra/enum.mli
commons/sexp_common.ml
configure
ctl/wrapper_ctl.ml
demos/assignment_matching.c [new file with mode: 0644]
demos/assignment_matching.cocci [new file with mode: 0644]
demos/assignment_matching.res [new file with mode: 0644]
demos/demo_rule9/g_NCR5380.c
demos/demo_rule9/g_NCR5380.res
demos/demo_rule9/nsp_cs.c
demos/depend.c [new file with mode: 0644]
demos/depend.cocci [new file with mode: 0644]
demos/pcre.cocci
demos/regexp.cocci
docs/Coccilib.3cocci
docs/manual/cocci_syntax.tex
docs/manual/examples.tex
docs/manual/macros.tex
docs/manual/main_grammar.pdf
docs/manual/manual.pdf
docs/manual/options.pdf
engine/cocci_vs_c.ml
engine/transformation_c.ml
flag_cocci.ml
globals/config.ml.in
globals/iteration.ml
main.ml
menhirlib/infiniteArray.ml
ocaml/yes_prepare_ocamlcocci.ml
ocamlsexp/license-tywith.txt
parsing_c/ast_c.ml
parsing_c/lexer_c.mll
parsing_c/parser_c.mly
parsing_c/parsing_hacks.ml
parsing_c/pretty_print_c.ml
parsing_c/token_helpers.ml
parsing_c/type_annoter_c.ml
parsing_c/type_c.ml
parsing_c/unparse_c.ml
parsing_cocci/ast0_cocci.ml
parsing_cocci/ast0_cocci.mli
parsing_cocci/ast0toast.ml
parsing_cocci/ast_cocci.ml
parsing_cocci/ast_cocci.mli
parsing_cocci/check_meta.ml
parsing_cocci/compute_lines.ml
parsing_cocci/data.ml
parsing_cocci/data.mli
parsing_cocci/function_prototypes.ml
parsing_cocci/iso_pattern.ml
parsing_cocci/lexer_cocci.mll
parsing_cocci/parse_aux.ml
parsing_cocci/parse_cocci.ml
parsing_cocci/parser_cocci_menhir.ml
parsing_cocci/parser_cocci_menhir.mli
parsing_cocci/parser_cocci_menhir.mly
parsing_cocci/pretty_print_cocci.mli
pycaml/getprefix.py
pycaml/getversion.py
tests/SCORE_expected.sexp
tests/SCORE_expected_orig.sexp
tests/symbol.c [new file with mode: 0644]
tests/symbol.cocci [new file with mode: 0644]
tests/symbol.res [new file with mode: 0644]
tools/splitpatch.ml