Release coccinelle-0.1.7
[bpt/coccinelle.git] / cocci.mli
1 open Common
2
3 (* full_engine takes (coccifile, isofile) and cfiles in parameters and
4 * returns a list associating to the input cfiles, and maybe header
5 * files that was also required to be modified, the files containing the
6 * result (in general files in /tmp).
7 * pre_engine does the compilation of the SmPL code and runs any initially
8 * scripts
9 * post_engine runs any finally scripts
10 *
11 * This function uses memoisation internally, which is useful when
12 * using -dir to not redo twice the same work. So take care!
13 *)
14 type cocci_info
15 val pre_engine : (filename * filename) -> cocci_info
16 val full_engine :
17 cocci_info -> filename list -> (filename * filename option) list
18 val post_engine : cocci_info -> unit
19
20 (* because of the #include "toto.c" and also because we may associate the
21 * same C file to multiple drivers because they share code, we can
22 * modify multiple times the same file when use -dir. This check
23 * remove duplicates and check that the modification are consistent
24 * among the different drivers.
25 *)
26 val check_duplicate_modif :
27 (filename * filename option) list -> (filename * filename option) list
28
29 (* provides memoization *)
30 val sp_of_file :
31 filename (* coccifile *) -> filename option (* isofile *) ->
32 Ast_cocci.metavar list list * Ast_cocci.rule list *
33 Ast_cocci.meta_name list list list *
34 Ast_cocci.meta_name list list list *
35 Ast_cocci.meta_name list list list * Ast_cocci.meta_name list list list *
36 string list list *
37 string option
38