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