Release coccinelle-0.1.8
authorCoccinelle <cocci@diku.dk>
Sun, 3 Oct 2010 11:57:53 +0000 (13:57 +0200)
committerRene Rydhof Hansen <rrh@cs.aau.dk>
Sun, 3 Oct 2010 11:57:53 +0000 (13:57 +0200)
commit708f4980a90e2a254d7863f875888e9f5c6db0b3
treefa5415ba53343492d94841a9a4f8c421a638e78f
parentb1b2de814d2c59af2526bc19d41bb22a0c1fd16d
Release coccinelle-0.1.8

** Features:
   - Metavariables now capture the cpp code contained within their definitions
   - When - fragments are separated by ... or nest boundaries in the semantic
     patch, but end up matching adjacent source code, the comments, cpp code
     and whitespace that are between them are not deleted.
   - better parsing of C: do expansion of macros only when needed when
     have actually a parse error and also leverage the definition of macros
     in the parsed file (or in a optional_standard.h file passed as a parameter).
     This should reduce the need for many hardcoded definitions in standard.h
   - new semantics for the -macro_file option, by default now expand macros
     only when necessary. To force use the -macro_file_builtins option instead.
   - a new -extract_macros command line action to help the parser. Works with
     the -macro_file option. e.g.
       $ ./spatch -extract_macros ~/linux > /tmp/alldefs.h
       $ ./spatch -macro_file /tmp/alldefs.h -sp_file foo.cocci -dir ~/linux
   - removed -D macro_file option, not consistent with what -D usually means
   - reattempt to be more efficient for statement metavariables that are just
     placeholders (ie, no modification, no reuse)
   - triples now returned from ctl in sorted order.  The main key is the
     state.  On the other hand, the state order does not always agree with the
     order of appearance in the code.
   - spatch is now less verbose on the things it does yet handle. Less confusing
     for new users.
   - slightly better error report. Thanks to Derek Jones for the suggestion.
   - added the options -linux_spacing and -smpl_spacing.  -linux_spacing
     causes spatch to follow the spacing conventions of Linux, while
     -smpl_spacing causes spatch to follow the spacing in the semantic patch.
     -linux_spacing is the default.
   - more informative error reporting for the already tagged token case.
     Thanks to Erik Hovland for the suggestion.

** Bugfix:
   - better parsing of declare macro at toplevel and in structure.
     cf -text xfield
   - allowing back typedef names for fieldname
   - better printing of else in generated code
   - slightly better type inference for binary operators.
   - clear out declarer names and iterator names between SmPL files (for
     -testall)
   - better parsing and type checking of macro type aliases. Cf -test macro_int16.
     Thanks to Li Yingtong for pointing out the problem.
   - make insert_virtual_positions tail rec, avoid stack overflow pb.
     Thanks to Diego Liziero <diegoliz@gmail.com> for pointing out the
     problem.
   - Better type inference for arithmetic binary operators
     Thanks to Li Yingtong for pointing out the problem.
   - Better type inference for constants
     Thanks to Li Yingtong for pointing out the problem.
   - move computing of adjacency information for semantic patches to after
     application of isomorphisms, because isomorphisms can introduce "..."
   - compute adjacency information for negated ...
   - record with each transformation site the set of indices of the witness
     trees that caused the transformation site to come about.  Whitespace and
     comments between remove tokens associated with disjoint witness trees is
     not removed.
   - correct treatment of function pointer typed parameters in the SmPL ast0
     visitor.
   - better parsing error message and error recovery when comments are not ended,
     when some macros have a weird body, and when some switch have a weird
     Body.
     Thanks to Derek Jones for pointing out the problem.
   - better detection and passing of "dangerous" ifdefs, cf -test
     double_switch.
   - dropped the separation of decls and body in Seq.  This gives better
     positioning of the bindings of metavariables shared between them.
     Thanks to Erik Hovland for an example that shows the problem.

** Internals:
   - supress warning in compiling ocamlsexp (warning caused by a new behavior
     of cpp used internally in processing files in ocamlsexp/)
223 files changed:
Makefile
authors.txt
changes.txt
cocci.ml
commitmsg
commons/Makefile
commons/common.ml
commons/common.mli
commons/glimpse.ml
configure
ctl/ctl_engine.ml
demos/python_regexp.c [new file with mode: 0644]
demos/python_regexp.cocci [new file with mode: 0644]
docs/Makefile
docs/grammar/Makefile [deleted file]
docs/manual.tex [deleted file]
docs/manual/Makefile [new file with mode: 0644]
docs/manual/advanced.tex [new file with mode: 0644]
docs/manual/cocci-python.txt [moved from docs/cocci-python.txt with 100% similarity]
docs/manual/cocci_syntax.pdf [moved from docs/grammar/cocci_syntax.pdf with 92% similarity]
docs/manual/cocci_syntax.tex [moved from docs/grammar/cocci_syntax.tex with 90% similarity]
docs/manual/copyright.txt [new file with mode: 0644]
docs/manual/examples.tex [moved from docs/grammar/examples.tex with 100% similarity]
docs/manual/installing.tex [new file with mode: 0644]
docs/manual/introduction.tex [new file with mode: 0644]
docs/manual/isomorphisms.tex [new file with mode: 0644]
docs/manual/license.txt [new file with mode: 0644]
docs/manual/macros.tex [new file with mode: 0644]
docs/manual/macros_common.tex [new file with mode: 0644]
docs/manual/macros_grammar.tex [moved from docs/grammar/grammar.tex with 100% similarity]
docs/manual/macros_listing_cocci.tex [new file with mode: 0644]
docs/manual/macros_options.tex [new file with mode: 0644]
docs/manual/main.tex [new file with mode: 0644]
docs/manual/main_grammar.tex [new file with mode: 0644]
docs/manual/main_options.tex [new file with mode: 0644]
docs/manual/manual.pdf [new file with mode: 0644]
docs/manual/options.pdf [new file with mode: 0644]
docs/manual/parsing.tex [new file with mode: 0644]
docs/manual/spatch_options.tex [moved from docs/options.tex with 87% similarity]
docs/manual/tips.tex [moved from docs/grammar/tips.tex with 100% similarity]
docs/manual/tutorial.tex [new file with mode: 0644]
docs/manual/workflow.tex [new file with mode: 0644]
docs/options.pdf [deleted file]
docs/spatch.1
engine/asttoctl2.ml
engine/asttomember.ml
engine/c_vs_c.ml
engine/cocci_vs_c.ml
engine/ctlcocci_integration.ml
engine/ctlcocci_integration.mli
engine/flag_matcher.ml
engine/lib_engine.ml
engine/pattern_c.ml
engine/postprocess_transinfo.ml
engine/postprocess_transinfo.mli
engine/sgrep.ml
engine/transformation_c.ml
engine/transformation_c.mli
flag_cocci.ml
globals/config.ml.in
install.txt
main.ml
menhirlib/Makefile
ocamlsexp/Makefile
parsing_c/Makefile
parsing_c/ast_c.ml
parsing_c/comment_annotater_c.ml
parsing_c/compare_c.ml
parsing_c/control_flow_c.ml
parsing_c/control_flow_c_build.ml [moved from parsing_c/ast_to_flow.ml with 91% similarity]
parsing_c/control_flow_c_build.mli [moved from parsing_c/ast_to_flow.mli with 94% similarity]
parsing_c/cpp_ast_c.ml
parsing_c/cpp_token_c.ml [new file with mode: 0644]
parsing_c/cpp_token_c.mli [new file with mode: 0644]
parsing_c/flag_parsing_c.ml
parsing_c/lexer_c.mll
parsing_c/lexer_parser.ml
parsing_c/lib_parsing_c.ml
parsing_c/parse_c.ml
parsing_c/parse_c.mli
parsing_c/parser_c.mly
parsing_c/parsing_hacks.ml
parsing_c/parsing_hacks.mli
parsing_c/pretty_print_c.ml
parsing_c/pretty_print_c.mli
parsing_c/test_parsing_c.ml
parsing_c/token_c.ml
parsing_c/token_helpers.ml
parsing_c/token_helpers.mli
parsing_c/token_views_c.ml [new file with mode: 0644]
parsing_c/token_views_c.mli [new file with mode: 0644]
parsing_c/type_annoter_c.ml
parsing_c/type_c.ml
parsing_c/type_c.mli
parsing_c/unparse_c.ml
parsing_c/unparse_cocci.ml
parsing_c/unparse_cocci.mli
parsing_c/unparse_hrule.ml
parsing_c/visitor_c.ml
parsing_cocci/.depend
parsing_cocci/Makefile
parsing_cocci/adjacency.ml [new file with mode: 0644]
parsing_cocci/adjacency.mli [new file with mode: 0644]
parsing_cocci/adjust_pragmas.ml
parsing_cocci/arity.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/context_neg.ml
parsing_cocci/free_vars.ml
parsing_cocci/function_prototypes.ml
parsing_cocci/get_constants.ml
parsing_cocci/get_constants2.ml
parsing_cocci/insert_plus.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.ml
parsing_cocci/single_statement.ml
parsing_cocci/unify_ast.ml
parsing_cocci/unitary_ast0.ml
parsing_cocci/unparse_ast0.ml
parsing_cocci/visitor_ast.ml
parsing_cocci/visitor_ast0.ml
python/no_pycocci_aux.ml
readme.txt
standard.h
standard.iso
testing.ml
testing.mli
tests/SCORE_expected.sexp
tests/SCORE_expected.sexp.save [new file with mode: 0644]
tests/SCORE_expected_orig.sexp [new file with mode: 0644]
tests/a_and_e.cocci
tests/addif.cocci
tests/addif2.cocci
tests/anon.cocci
tests/argument.cocci
tests/array_init.cocci
tests/badzero.c [new file with mode: 0644]
tests/badzero.cocci [new file with mode: 0644]
tests/badzero.res [new file with mode: 0644]
tests/ben.cocci
tests/cards.cocci
tests/cast_iso.cocci
tests/check_order1.c [new file with mode: 0644]
tests/check_order1.cocci [new file with mode: 0644]
tests/check_order2.c [new file with mode: 0644]
tests/check_order2.cocci [new file with mode: 0644]
tests/constx.cocci
tests/cs_check.cocci
tests/dropf.cocci
tests/find_long.c [new file with mode: 0644]
tests/find_long.cocci [new file with mode: 0644]
tests/find_long.res [new file with mode: 0644]
tests/fun.cocci
tests/hd.cocci
tests/headers.cocci
tests/ifdef4.cocci
tests/ifdef5.cocci
tests/ifdefmeta.c [new file with mode: 0644]
tests/ifdefmeta.cocci [new file with mode: 0644]
tests/ifdefmeta.res [new file with mode: 0644]
tests/ifdefmeta1.c [new file with mode: 0644]
tests/ifdefmeta1.cocci [new file with mode: 0644]
tests/ifdefmeta1.res [new file with mode: 0644]
tests/ifdefmeta2.c [new file with mode: 0644]
tests/ifdefmeta2.cocci [new file with mode: 0644]
tests/ifdefmeta2.res [new file with mode: 0644]
tests/ifdefmeta3.c [new file with mode: 0644]
tests/ifdefmeta3.cocci [new file with mode: 0644]
tests/ifdefmeta3.res [new file with mode: 0644]
tests/ifdefmeta4.res [new file with mode: 0644]
tests/ifelse.c [new file with mode: 0644]
tests/ifelse.cocci [new file with mode: 0644]
tests/km.cocci
tests/km.res
tests/kmalloc.cocci
tests/ktype.cocci
tests/ldecl.c [new file with mode: 0644]
tests/ldecl.cocci [new file with mode: 0644]
tests/longconst.c [new file with mode: 0644]
tests/longconst.cocci [new file with mode: 0644]
tests/longconst.res [new file with mode: 0644]
tests/macro_int16.c [new file with mode: 0644]
tests/macro_int16.cocci [new file with mode: 0644]
tests/macro_int16.res [new file with mode: 0644]
tests/metaruleelem.cocci
tests/multitype.cocci
tests/neststruct.cocci
tests/oddifdef.c [new file with mode: 0644]
tests/oddifdef.cocci [new file with mode: 0644]
tests/oddifdef.res [new file with mode: 0644]
tests/parse_field.c [new file with mode: 0644]
tests/parsing_pad.c [new file with mode: 0644]
tests/parsing_pad.cocci [new file with mode: 0644]
tests/protoassert.cocci
tests/rcu3.cocci
tests/slow.c [new file with mode: 0644]
tests/stm8.cocci
tests/struct_typedef.cocci
tests/test1.cocci
tests/test10.cocci
tests/test11.cocci
tests/test12.cocci
tests/test3.cocci
tests/test6.cocci
tests/test7.cocci
tests/test9.cocci
tests/top.cocci
tests/toplevel_macrostmt.cocci
tests/whitespace.cocci
tests/xfield.c [new file with mode: 0644]
tests/xfield.cocci [new file with mode: 0644]
tests/xfield.res [new file with mode: 0644]