Coccinelle release-1.0.0-rc11
authorCoccinelle <cocci@diku.dk>
Mon, 12 Mar 2012 12:19:05 +0000 (13:19 +0100)
committerRene Rydhof Hansen <rrh@cs.aau.dk>
Mon, 12 Mar 2012 12:19:05 +0000 (13:19 +0100)
commit17ba07880e1838028b4516ba7a2db2147b3aa1c9
tree850006c7e49f09f81410448578945b8f2b85491c
parent97111a47d707638a835d7498276ac6768a052ee8
Coccinelle release-1.0.0-rc11

** 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.
- Multicharacter command-line options now begin with -- and contain -
  rather than _.
- Allow multiple types of hidden metavariables, each preceded by @.
  Position variables can be attached to these.
- Python code now receives a structure containing a list of matched
  elements for list metavariables.  Thanks to Michael Stefaniuc for
  suggesting this features.
- Python code now receives expressions and identifiers as ordinary strings,
  not as elements of specific structures.

** 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.
- Slightly more efficient handling of lists.
- Slightly better error message in the case of inconsistent paths
- Improve limited size caching

** 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.
- Fixed length bug in the treatment of structures.
- Allow inheriting declaration/field metavariables.
- Don't drop spaces after parentheses in when no minus code present.
  Thanks to Terry Wilson for reporting the problem.
- Keep inherited metavariables in asttomember (preprocessing for matching)
- allminus for types, to allow removing const, not just matching it
- improved pretty printing when something is added before a closed brace
- Allow matching on nameless structs.  Thanks to Ron Minnich for reporting
  the problem.
- Pretty printing of const/volatile arrays in smpl code.
261 files changed:
Makefile
Makefile.release
changes.txt
cocci.ml
cocci.mli
commons/common.ml
configure
ctl/Makefile
ctl/ast_ctl.ml
ctl/ctl_engine.ml
ctl/ctl_engine.mli
ctl/flag_ctl.ml
ctl/pretty_print_ctl.ml
ctl/pretty_print_ctl.mli
ctl/test_ctl.ml
ctl/wrapper_ctl.ml
ctl/wrapper_ctl.mli
docs/manual/cocci_syntax.tex
docs/manual/main_grammar.pdf
docs/manual/manual.pdf
docs/manual/options.pdf
docs/manual/spatch_options.tex
engine/Makefile
engine/asttoctl.ml
engine/asttoctl.mli
engine/asttoctl2.ml
engine/asttoctl2.mli
engine/asttomember.ml
engine/asttomember.mli
engine/c_vs_c.ml
engine/c_vs_c.mli
engine/check_exhaustive_pattern.ml
engine/check_reachability.ml
engine/check_reachability.mli
engine/cocci_vs_c.ml
engine/cocci_vs_c.mli
engine/ctlcocci_integration.ml
engine/ctlcocci_integration.mli
engine/ctltotex.ml
engine/ctltotex.mli
engine/flag_engine.ml
engine/flag_matcher.ml
engine/isomorphisms_c_c.ml
engine/lib_engine.ml
engine/lib_matcher_c.ml
engine/lib_matcher_c.mli
engine/main.ml
engine/pattern_c.ml
engine/pattern_c.mli
engine/postprocess_transinfo.ml
engine/postprocess_transinfo.mli
engine/pretty_print_engine.ml
engine/pretty_print_engine.mli
engine/sgrep.ml
engine/transformation_c.ml
engine/transformation_c.mli
flag_cocci.ml
globals/Makefile
globals/config.ml.in
globals/flag.ml
globals/iteration.ml
globals/iteration.mli
globals/regexp.ml [changed from symlink to file mode: 0644]
globals/regexp.ml.in [new file with mode: 0644]
globals/regexp_pcre.ml
globals/regexp_str.ml
main.ml
ocaml/Makefile
ocaml/prepare_ocamlcocci.ml [changed from symlink to file mode: 0644]
ocaml/prepare_ocamlcocci.ml.in [new file with mode: 0644]
parsing_c/ast_c.ml
parsing_c/flag_parsing_c.ml
parsing_c/parse_c.ml
parsing_c/parser_c.mly
parsing_c/parsing_hacks.ml
parsing_c/pretty_print_c.ml
parsing_c/pretty_print_c.mli
parsing_c/test_parsing_c.ml
parsing_c/type_annoter_c.ml
parsing_c/type_c.ml
parsing_c/unparse_c.ml
parsing_c/unparse_cocci.ml
parsing_c/visitor_c.ml
parsing_cocci/Makefile
parsing_cocci/adjacency.ml
parsing_cocci/adjacency.mli
parsing_cocci/adjust_pragmas.ml
parsing_cocci/adjust_pragmas.mli
parsing_cocci/arity.ml
parsing_cocci/arity.mli
parsing_cocci/ast0_cocci.ml
parsing_cocci/ast0_cocci.mli
parsing_cocci/ast0toast.ml
parsing_cocci/ast0toast.mli
parsing_cocci/ast_cocci.ml
parsing_cocci/ast_cocci.mli
parsing_cocci/check_meta.ml
parsing_cocci/check_meta.mli
parsing_cocci/comm_assoc.ml
parsing_cocci/comm_assoc.mli
parsing_cocci/command_line.ml
parsing_cocci/command_line.mli
parsing_cocci/compute_lines.ml
parsing_cocci/compute_lines.mli
parsing_cocci/context_neg.ml
parsing_cocci/context_neg.mli
parsing_cocci/data.ml
parsing_cocci/data.mli
parsing_cocci/disjdistr.ml
parsing_cocci/disjdistr.mli
parsing_cocci/flag_parsing_cocci.ml
parsing_cocci/free_vars.ml
parsing_cocci/free_vars.mli
parsing_cocci/function_prototypes.ml
parsing_cocci/function_prototypes.mli
parsing_cocci/get_constants.ml
parsing_cocci/get_constants.mli
parsing_cocci/get_constants2.ml
parsing_cocci/get_constants2.mli
parsing_cocci/get_metas.ml [new file with mode: 0644]
parsing_cocci/get_metas.mli [new file with mode: 0644]
parsing_cocci/id_utils.ml
parsing_cocci/id_utils.mli
parsing_cocci/index.ml
parsing_cocci/index.mli
parsing_cocci/insert_plus.ml
parsing_cocci/insert_plus.mli
parsing_cocci/iso_compile.ml
parsing_cocci/iso_compile.mli
parsing_cocci/iso_pattern.ml
parsing_cocci/iso_pattern.mli
parsing_cocci/lexer_cli.mll
parsing_cocci/lexer_cocci.mll
parsing_cocci/lexer_script.mll
parsing_cocci/main.ml
parsing_cocci/merge.ml
parsing_cocci/merge.mli
parsing_cocci/parse_aux.ml
parsing_cocci/parse_cocci.ml
parsing_cocci/parse_cocci.mli
parsing_cocci/parser_cocci.mly
parsing_cocci/parser_cocci_menhir.ml
parsing_cocci/parser_cocci_menhir.mli
parsing_cocci/parser_cocci_menhir.mly
parsing_cocci/plus.ml
parsing_cocci/plus.mli
parsing_cocci/pretty_print_cocci.ml
parsing_cocci/pretty_print_cocci.mli
parsing_cocci/safe_for_multi_decls.ml
parsing_cocci/safe_for_multi_decls.mli
parsing_cocci/semantic_cocci.ml
parsing_cocci/simple_assignments.ml
parsing_cocci/simple_assignments.mli
parsing_cocci/single_statement.ml
parsing_cocci/single_statement.mli
parsing_cocci/test.cocci
parsing_cocci/test2.cocci
parsing_cocci/test_exps.ml
parsing_cocci/test_exps.mli
parsing_cocci/top_level.ml
parsing_cocci/top_level.mli
parsing_cocci/type_cocci.ml
parsing_cocci/type_cocci.mli
parsing_cocci/type_infer.ml
parsing_cocci/type_infer.mli
parsing_cocci/unify_ast.ml
parsing_cocci/unify_ast.mli
parsing_cocci/unitary_ast0.ml
parsing_cocci/unitary_ast0.mli
parsing_cocci/unparse_ast0.ml
parsing_cocci/unparse_ast0.mli
parsing_cocci/visitor_ast.ml
parsing_cocci/visitor_ast.mli
parsing_cocci/visitor_ast0.ml
parsing_cocci/visitor_ast0.mli
parsing_cocci/visitor_ast0_types.ml
popl/Makefile
popl/ast_popl.ml
popl/asttopopl.ml
popl/asttopopl.mli
popl/insert_befaft.ml
popl/insert_befaft.mli
popl/insert_quantifiers.ml
popl/insert_quantifiers.mli
popl/popl.ml
popl/popl.mli
popl/popltoctl.ml
popl/popltoctl.mli
popl/pretty_print_popl.ml
popl/pretty_print_popl.mli
popl09/Makefile
popl09/ast_popl.ml
popl09/asttopopl.ml
popl09/asttopopl.mli
popl09/flag_popl.ml
popl09/insert_quantifiers.ml
popl09/insert_quantifiers.mli
popl09/popl.ml
popl09/popl.mli
popl09/popltoctl.ml
popl09/popltoctl.mli
popl09/pretty_print_popl.ml
popl09/pretty_print_popl.mli
python/Makefile
python/coccilib/elems.py
python/no_pycocci.ml
python/pycocci.ml.in [new file with mode: 0644]
python/pycocci.mli
python/pycocci_aux.ml
python/pycocci_aux.mli
python/yes_pycocci.ml
release.nix [new file with mode: 0644]
scripts/extract_c_and_res.pl
scripts/extract_examples.pl
scripts/extractor_README.pl
scripts/gather_failed.pl
scripts/readme.pl
scripts/stat_directories.pl
scripts/stat_directories_complete.pl
scripts/stat_directory_complete.pl
testing.ml
testing.mli
tests/SCORE_expected.sexp
tests/SCORE_expected.sexp.save [deleted file]
tests/SCORE_expected_orig.sexp
tests/const1bis.cocci
tests/constrem.c [new file with mode: 0644]
tests/constrem.cocci [new file with mode: 0644]
tests/constrem.res [new file with mode: 0644]
tests/ifadd.c [new file with mode: 0644]
tests/ifadd.cocci [new file with mode: 0644]
tests/ifadd.res [new file with mode: 0644]
tests/indecl.c [new file with mode: 0644]
tests/indecl.cocci [new file with mode: 0644]
tests/kr.c [new file with mode: 0644]
tests/kr.cocci [new file with mode: 0644]
tests/kr.res [new file with mode: 0644]
tests/metaline.c [new file with mode: 0644]
tests/metaline.cocci [new file with mode: 0644]
tests/metaline.res [new file with mode: 0644]
tests/tdnl.c [new file with mode: 0644]
tests/tdnl.cocci [new file with mode: 0644]
tests/tdnl.res [new file with mode: 0644]
tests/twomatch.c [new file with mode: 0644]
tests/twomatch.cocci [new file with mode: 0644]
tests/twomatch.res [new file with mode: 0644]
tools/Makefile
tools/alloc_free.ml
tools/bridge.ml
tools/dir_stats.ml
tools/dumper.ml
tools/dumper.mli
tools/extract_c_and_res.ml
tools/generate_dependencies.ml
tools/gitgrep.ml
tools/gitsort.ml
tools/licensify.ml
tools/process_isoprofile.ml
tools/splitpatch.ml
tools/spp.ml
version [new file with mode: 0644]