2 * Copyright 2005-2010, Ecole des Mines de Nantes, University of Copenhagen
3 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix
4 * This file is part of Coccinelle.
6 * Coccinelle is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, according to version 2 of the License.
10 * Coccinelle is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with Coccinelle. If not, see <http://www.gnu.org/licenses/>.
18 * The authors reserve the right to distribute this or future versions of
19 * Coccinelle under other licenses.
24 * Copyright 2005-2010, Ecole des Mines de Nantes, University of Copenhagen
25 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix
26 * This file is part of Coccinelle.
28 * Coccinelle is free software: you can redistribute it and/or modify
29 * it under the terms of the GNU General Public License as published by
30 * the Free Software Foundation, according to version 2 of the License.
32 * Coccinelle is distributed in the hope that it will be useful,
33 * but WITHOUT ANY WARRANTY; without even the implied warranty of
34 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35 * GNU General Public License for more details.
37 * You should have received a copy of the GNU General Public License
38 * along with Coccinelle. If not, see <http://www.gnu.org/licenses/>.
40 * The authors reserve the right to distribute this or future versions of
41 * Coccinelle under other licenses.
47 (*****************************************************************************)
48 (* work with tests/ *)
49 (*****************************************************************************)
50 val testone
: string (*prefix*) -> string (*test*) -> bool (*compare_expected*) -> unit
51 val testall
: ?expected_score_file
:string -> unit -> unit
53 (*****************************************************************************)
54 (* works with tests-big/. The .res, .ok, .spatch_ok, .failed, .var *)
55 (*****************************************************************************)
56 val test_okfailed
: filename
(*cocci*) -> filename
(*c*) list
-> unit
57 val test_regression_okfailed
: unit -> unit
61 (*****************************************************************************)
62 (* the parameter is the result of Cocci.full_engine *)
63 (*****************************************************************************)
64 val compare_with_expected
: (filename
* filename
option) list
-> unit
67 (*****************************************************************************)
68 (* to test/debug the coccinelle subsystems *)
69 (*****************************************************************************)
72 * I moved the parsing_c/ subsystem testing in parsing_c/test_parsing_c.ml
73 * as I need it for other projects too.
76 val test_parse_cocci
: filename
-> unit
78 (*****************************************************************************)
79 (* to be called by ocaml toplevel, to test. *)
80 (*****************************************************************************)
83 filename
(* coccifile *) -> filename
option (* isofile *) ->
84 Ast_cocci.metavar list list
* Ast_cocci.rule list
*
85 Ast_cocci.meta_name list list list
*
86 Ast_cocci.meta_name list list list
*
87 (Ast_cocci.meta_name list list list
(*used after list*) *
88 (*fresh used after list*)
89 Ast_cocci.meta_name list list list
*
90 (*fresh used after list seeds*)
91 Ast_cocci.meta_name list list list
) *
92 Ast_cocci.meta_name list list list
*
97 val rule_elem_of_string : string -> filename option -> Ast_cocci.rule_elem
101 val flows_of_ast : Ast_c.program -> Control_flow_c.cflow list
102 val print_flow : Control_flow_c.cflow -> unit
105 Ast_cocci.rule list ->
106 Ast_cocci.meta_name list list list ->
107 (Lib_engine.ctlcocci *
108 ((Lib_engine.predicate * Ast_cocci.meta_name Ast_ctl.modif)
113 val one_flow : Control_flow_c.cflow list -> Control_flow_c.cflow
114 val one_ctl : Lib_engine.ctlcocci list list -> Lib_engine.ctlcocci