Commit | Line | Data |
---|---|---|
f537ebc4 C |
1 | (* |
2 | * Copyright 2010, INRIA, University of Copenhagen | |
3 | * Julia Lawall, Rene Rydhof Hansen, Gilles Muller, Nicolas Palix | |
4 | * Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen | |
5 | * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix | |
6 | * This file is part of Coccinelle. | |
7 | * | |
8 | * Coccinelle is free software: you can redistribute it and/or modify | |
9 | * it under the terms of the GNU General Public License as published by | |
10 | * the Free Software Foundation, according to version 2 of the License. | |
11 | * | |
12 | * Coccinelle is distributed in the hope that it will be useful, | |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | * GNU General Public License for more details. | |
16 | * | |
17 | * You should have received a copy of the GNU General Public License | |
18 | * along with Coccinelle. If not, see <http://www.gnu.org/licenses/>. | |
19 | * | |
20 | * The authors reserve the right to distribute this or future versions of | |
21 | * Coccinelle under other licenses. | |
22 | *) | |
23 | ||
24 | ||
34e49164 C |
25 | open Ast_ctl |
26 | ||
27 | module type SUBST = | |
28 | sig | |
29 | type value | |
30 | type mvar | |
31 | val eq_mvar : mvar -> mvar -> bool | |
32 | val eq_val : value -> value -> bool | |
33 | val merge_val : value -> value -> value | |
34 | val print_mvar : mvar -> unit | |
35 | val print_value : value -> unit | |
36 | end | |
37 | ||
38 | module type GRAPH = | |
ae4735db C |
39 | sig |
40 | type node | |
41 | type cfg | |
34e49164 C |
42 | val predecessors: cfg -> node -> node list |
43 | val successors: cfg -> node -> node list | |
44 | val extract_is_loop : cfg -> node -> bool | |
45 | val print_node : node -> unit | |
46 | val size : cfg -> int | |
485bce71 C |
47 | val print_graph : cfg -> string option -> |
48 | (node * string) list -> (node * string) list -> string -> unit | |
34e49164 C |
49 | end |
50 | ||
51 | module OGRAPHEXT_GRAPH : | |
52 | sig | |
53 | type node = int | |
54 | type cfg = (string, unit) Ograph_extended.ograph_mutable | |
55 | val predecessors : | |
56 | < predecessors : 'a -> < tolist : ('b * 'c) list; .. >; .. > -> | |
57 | 'a -> 'b list | |
58 | val print_node : node -> unit | |
59 | end | |
60 | ||
61 | module type PREDICATE = | |
62 | sig | |
63 | type t | |
64 | val print_predicate : t -> unit | |
65 | end | |
66 | ||
67 | module CTL_ENGINE : | |
68 | functor (SUB : SUBST) -> | |
69 | functor (G : GRAPH) -> | |
70 | functor (P : PREDICATE) -> | |
71 | sig | |
72 | ||
73 | type substitution = (SUB.mvar, SUB.value) Ast_ctl.generic_subst list | |
74 | ||
75 | type ('pred,'anno) witness = | |
76 | (G.node, substitution, | |
77 | ('pred, SUB.mvar, 'anno) Ast_ctl.generic_ctl list) | |
78 | Ast_ctl.generic_witnesstree | |
79 | ||
80 | type ('pred,'anno) triples = | |
81 | (G.node * substitution * ('pred,'anno) witness list) list | |
82 | ||
83 | val sat : | |
84 | G.cfg * (P.t -> (P.t,'anno) triples) * G.node list -> | |
85 | (P.t, SUB.mvar, 'c) Ast_ctl.generic_ctl -> | |
86 | (P.t list list (* optional and required things *)) -> | |
87 | (P.t,'anno) triples | |
88 | ||
89 | val print_bench : unit -> unit | |
90 | end | |
485bce71 C |
91 | |
92 | val get_graph_files : unit -> string list | |
93 | val get_graph_comp_files : string -> string list | |
ae4735db | 94 |