ocamlgraph: upgrade to 1.8.5

Signed-off-by: Austin Seipp <aseipp@pobox.com>

+257 -67
+3 -3
pkgs/development/ocaml-modules/ocamlgraph/default.nix
··· 2 3 let 4 ocaml_version = (builtins.parseDrvName ocaml.name).version; 5 - version = "1.8.2"; 6 in 7 8 stdenv.mkDerivation { ··· 10 11 src = fetchurl { 12 url = "http://ocamlgraph.lri.fr/download/ocamlgraph-${version}.tar.gz"; 13 - sha256 = "e54ae60cd977a032854166dad56348d0fb76c6cd8e03e960af455268f0c8b5a6"; 14 }; 15 16 buildInputs = [ ocaml findlib ocamlPackages.lablgtk ]; ··· 24 postPatch = '' 25 sed -i 's@$(DESTDIR)$(OCAMLLIB)/ocamlgraph@$(DESTDIR)/lib/ocaml/${ocaml_version}/site-lib/ocamlgraph@' Makefile.in 26 sed -i 's@$OCAMLLIB/lablgtk2@${ocamlPackages.lablgtk}/lib/ocaml/${ocaml_version}/site-lib/lablgtk2@' configure Makefile.in 27 - sed -i 's@-I +lablgtk2@-I ${ocamlPackages.lablgtk}/lib/ocaml/${ocaml_version}/site-lib/lablgtk2 -I ${ocamlPackages.lablgtk}/lib/ocaml/${ocaml_version}/site-lib/stublibs@' configure Makefile.in editor/Makefile 28 ''; 29 30 createFindlibDestdir = true;
··· 2 3 let 4 ocaml_version = (builtins.parseDrvName ocaml.name).version; 5 + version = "1.8.5"; 6 in 7 8 stdenv.mkDerivation { ··· 10 11 src = fetchurl { 12 url = "http://ocamlgraph.lri.fr/download/ocamlgraph-${version}.tar.gz"; 13 + sha256 = "0bxqxzd5sd7siz57vhzb8bmiz1ddhgdv49gcsmwwfmd16mj4cryi"; 14 }; 15 16 buildInputs = [ ocaml findlib ocamlPackages.lablgtk ]; ··· 24 postPatch = '' 25 sed -i 's@$(DESTDIR)$(OCAMLLIB)/ocamlgraph@$(DESTDIR)/lib/ocaml/${ocaml_version}/site-lib/ocamlgraph@' Makefile.in 26 sed -i 's@$OCAMLLIB/lablgtk2@${ocamlPackages.lablgtk}/lib/ocaml/${ocaml_version}/site-lib/lablgtk2@' configure Makefile.in 27 + sed -i 's@+lablgtk2@${ocamlPackages.lablgtk}/lib/ocaml/${ocaml_version}/site-lib/lablgtk2 -I ${ocamlPackages.lablgtk}/lib/ocaml/${ocaml_version}/site-lib/stublibs@' configure Makefile.in editor/Makefile 28 ''; 29 30 createFindlibDestdir = true;
+254
pkgs/development/tools/misc/frama-c/0004-Port-to-OCamlgraph-1.8.5.patch
···
··· 1 + From: Mehdi Dogguy <mehdi@debian.org> 2 + Date: Sun, 27 Apr 2014 13:46:16 +0200 3 + Subject: Port to OCamlgraph 1.8.5 4 + 5 + --- 6 + src/impact/reason_graph.ml | 2 +- 7 + src/kernel/stmts_graph.ml | 10 +++++----- 8 + src/logic/property_status.ml | 8 ++++---- 9 + src/misc/service_graph.ml | 4 ++-- 10 + src/pdg_types/pdgTypes.ml | 6 +++--- 11 + src/postdominators/print.ml | 2 +- 12 + src/semantic_callgraph/register.ml | 4 ++-- 13 + src/slicing/printSlice.ml | 10 +++++----- 14 + src/syntactic_callgraph/register.ml | 4 ++-- 15 + src/wp/cil2cfg.ml | 12 ++++++------ 16 + 10 files changed, 31 insertions(+), 31 deletions(-) 17 + 18 + diff --git a/src/impact/reason_graph.ml b/src/impact/reason_graph.ml 19 + index eabacb0..ce19b4a 100644 20 + --- a/src/impact/reason_graph.ml 21 + +++ b/src/impact/reason_graph.ml 22 + @@ -139,7 +139,7 @@ module Printer (X: AdditionalInfo) = struct 23 + 24 + let graph_attributes _ = [`Label "Impact graph"] 25 + 26 + - let default_vertex_attributes _g = [`Style [`Filled]; `Shape `Box] 27 + + let default_vertex_attributes _g = [`Style `Filled; `Shape `Box] 28 + let default_edge_attributes _g = [] 29 + 30 + let vertex_attributes v = 31 + diff --git a/src/kernel/stmts_graph.ml b/src/kernel/stmts_graph.ml 32 + index a8fe121..16059c3 100644 33 + --- a/src/kernel/stmts_graph.ml 34 + +++ b/src/kernel/stmts_graph.ml 35 + @@ -157,12 +157,12 @@ module TP = struct 36 + 37 + let vertex_attributes s = 38 + match s.skind with 39 + - | Loop _ -> [`Color 0xFF0000; `Style [`Filled]] 40 + - | If _ -> [`Color 0x00FF00; `Style [`Filled]; `Shape `Diamond] 41 + - | Return _ -> [`Color 0x0000FF; `Style [`Filled]] 42 + + | Loop _ -> [`Color 0xFF0000; `Style `Filled] 43 + + | If _ -> [`Color 0x00FF00; `Style `Filled; `Shape `Diamond] 44 + + | Return _ -> [`Color 0x0000FF; `Style `Filled] 45 + | Block _ -> [`Shape `Box; `Fontsize 8] 46 + - | Goto _ -> [`Shape `Diamond; `Color 0x00FFFF ; `Style [`Filled]] 47 + - | Instr (Skip _) -> [`Color 0x00FFFF ; `Style [`Filled]] 48 + + | Goto _ -> [`Shape `Diamond; `Color 0x00FFFF ; `Style `Filled] 49 + + | Instr (Skip _) -> [`Color 0x00FFFF ; `Style `Filled] 50 + | _ -> [] 51 + let default_vertex_attributes _ = [] 52 + 53 + diff --git a/src/logic/property_status.ml b/src/logic/property_status.ml 54 + index f7c278d..47485f6 100644 55 + --- a/src/logic/property_status.ml 56 + +++ b/src/logic/property_status.ml 57 + @@ -1481,12 +1481,12 @@ module Consolidation_graph = struct 58 + let s = get_status p in 59 + let color = status_color p s in 60 + let style = match s with 61 + - | Never_tried -> [`Style [`Bold]; `Width 0.8 ] 62 + - | _ -> [`Style [`Filled]] 63 + + | Never_tried -> [`Style `Bold; `Width 0.8 ] 64 + + | _ -> [`Style `Filled] 65 + in 66 + style @ [ label v; `Color color; `Shape `Box ] 67 + | Emitter _ as v -> 68 + - [ label v; `Shape `Diamond; `Color 0xb0c4de; `Style [`Filled] ] 69 + + [ label v; `Shape `Diamond; `Color 0xb0c4de; `Style `Filled ] 70 + | Tuning_parameter _ as v -> 71 + [ label v; (*`Style `Dotted;*) `Color 0xb0c4de; ] 72 + (*| Correctness_parameter _ (*as v*) -> assert false (*[ label v; `Color 0xb0c4de ]*)*) 73 + @@ -1495,7 +1495,7 @@ module Consolidation_graph = struct 74 + | None -> [] 75 + | Some s -> 76 + let c = emitted_status_color s in 77 + - [ `Color c; `Fontcolor c; `Style [`Bold] ] 78 + + [ `Color c; `Fontcolor c; `Style `Bold ] 79 + 80 + let default_vertex_attributes _ = [] 81 + let default_edge_attributes _ = [] 82 + diff --git a/src/misc/service_graph.ml b/src/misc/service_graph.ml 83 + index 4f866c5..d158028 100644 84 + --- a/src/misc/service_graph.ml 85 + +++ b/src/misc/service_graph.ml 86 + @@ -289,7 +289,7 @@ Src root:%s in %s (is_root:%b) Dst:%s in %s (is_root:%b) [2d case]" 87 + color e 88 + else 89 + match CallG.E.label e with 90 + - | Inter_services -> [ `Style [`Invis] ] 91 + + | Inter_services -> [ `Style `Invis ] 92 + | Inter_functions | Both -> color e 93 + 94 + let default_edge_attributes _ = [] 95 + @@ -303,7 +303,7 @@ Src root:%s in %s (is_root:%b) Dst:%s in %s (is_root:%b) [2d case]" 96 + sg_attributes = 97 + [ `Label ("S " ^ cs); 98 + `Color (Extlib.number_to_color id); 99 + - `Style [`Bold] ] } 100 + + `Style `Bold ] } 101 + 102 + end 103 + 104 + diff --git a/src/pdg_types/pdgTypes.ml b/src/pdg_types/pdgTypes.ml 105 + index 05754e4..74cdebf 100644 106 + --- a/src/pdg_types/pdgTypes.ml 107 + +++ b/src/pdg_types/pdgTypes.ml 108 + @@ -626,7 +626,7 @@ module Pdg = struct 109 + 110 + let graph_attributes _ = [`Rankdir `TopToBottom ] 111 + 112 + - let default_vertex_attributes _ = [`Style [`Filled]] 113 + + let default_vertex_attributes _ = [`Style `Filled] 114 + let vertex_name v = string_of_int (Node.id v) 115 + 116 + let vertex_attributes v = 117 + @@ -711,13 +711,13 @@ module Pdg = struct 118 + if Dpd.is_ctrl d then (`Arrowtail `Odot)::attrib else attrib 119 + in 120 + let attrib = 121 + - if Dpd.is_addr d then (`Style [`Dotted])::attrib else attrib 122 + + if Dpd.is_addr d then (`Style `Dotted)::attrib else attrib 123 + in 124 + attrib 125 + 126 + let get_subgraph v = 127 + let mk_subgraph name attrib = 128 + - let attrib = (`Style [`Filled]) :: attrib in 129 + + let attrib = (`Style `Filled) :: attrib in 130 + Some { Graph.Graphviz.DotAttributes.sg_name= name; 131 + sg_parent = None; 132 + sg_attributes = attrib } 133 + diff --git a/src/postdominators/print.ml b/src/postdominators/print.ml 134 + index f2e3a25..15f4ff2 100644 135 + --- a/src/postdominators/print.ml 136 + +++ b/src/postdominators/print.ml 137 + @@ -63,7 +63,7 @@ module Printer = struct 138 + 139 + let graph_attributes (title, _) = [`Label title] 140 + 141 + - let default_vertex_attributes _g = [`Style [`Filled]] 142 + + let default_vertex_attributes _g = [`Style `Filled] 143 + let default_edge_attributes _g = [] 144 + 145 + let vertex_attributes (s, has_postdom) = 146 + diff --git a/src/semantic_callgraph/register.ml b/src/semantic_callgraph/register.ml 147 + index 1c79dcc..071f061 100644 148 + --- a/src/semantic_callgraph/register.ml 149 + +++ b/src/semantic_callgraph/register.ml 150 + @@ -102,8 +102,8 @@ module Service = 151 + let name = Kernel_function.get_name 152 + let attributes v = 153 + [ `Style 154 + - [if Kernel_function.is_definition v then `Bold 155 + - else `Dotted] ] 156 + + (if Kernel_function.is_definition v then `Bold 157 + + else `Dotted) ] 158 + let entry_point () = 159 + try Some (fst (Globals.entry_point ())) 160 + with Globals.No_such_entry_point _ -> None 161 + diff --git a/src/slicing/printSlice.ml b/src/slicing/printSlice.ml 162 + index c5363f9..211e0bb 100644 163 + --- a/src/slicing/printSlice.ml 164 + +++ b/src/slicing/printSlice.ml 165 + @@ -227,7 +227,7 @@ module PrintProject = struct 166 + 167 + let graph_attributes (name, _) = [`Label name] 168 + 169 + - let default_vertex_attributes _ = [`Style [`Filled]] 170 + + let default_vertex_attributes _ = [`Style `Filled] 171 + 172 + let vertex_name v = match v with 173 + | Src fi -> SlicingMacros.fi_name fi 174 + @@ -280,16 +280,16 @@ module PrintProject = struct 175 + 176 + let edge_attributes (e, call) = 177 + let attrib = match e with 178 + - | (Src _, Src _) -> [`Style [`Invis]] 179 + - | (OptSliceCallers _, _) -> [`Style [`Invis]] 180 + - | (_, OptSliceCallers _) -> [`Style [`Invis]] 181 + + | (Src _, Src _) -> [`Style `Invis] 182 + + | (OptSliceCallers _, _) -> [`Style `Invis] 183 + + | (_, OptSliceCallers _) -> [`Style `Invis] 184 + | _ -> [] 185 + in match call with None -> attrib 186 + | Some call -> (`Label (string_of_int call.sid)):: attrib 187 + 188 + let get_subgraph v = 189 + let mk_subgraph name attrib = 190 + - let attrib = (*(`Label name) ::*) (`Style [`Filled]) :: attrib in 191 + + let attrib = (*(`Label name) ::*) (`Style `Filled) :: attrib in 192 + Some { Graph.Graphviz.DotAttributes.sg_name= name; 193 + sg_parent = None; 194 + sg_attributes = attrib } 195 + diff --git a/src/syntactic_callgraph/register.ml b/src/syntactic_callgraph/register.ml 196 + index d4669c4..d41980e 100644 197 + --- a/src/syntactic_callgraph/register.ml 198 + +++ b/src/syntactic_callgraph/register.ml 199 + @@ -37,8 +37,8 @@ module Service = 200 + let name v = nodeName v.cnInfo 201 + let attributes v = 202 + [ match v.cnInfo with 203 + - | NIVar (_,b) when not !b -> `Style [`Dotted] 204 + - | _ -> `Style [`Bold] ] 205 + + | NIVar (_,b) when not !b -> `Style `Dotted 206 + + | _ -> `Style `Bold ] 207 + let equal v1 v2 = id v1 = id v2 208 + let compare v1 v2 = 209 + let i1 = id v1 in 210 + diff --git a/src/wp/cil2cfg.ml b/src/wp/cil2cfg.ml 211 + index 6d8cf09..ba5f410 100644 212 + --- a/src/wp/cil2cfg.ml 213 + +++ b/src/wp/cil2cfg.ml 214 + @@ -1278,9 +1278,9 @@ module Printer (PE : sig val edge_txt : edge -> string end) = struct 215 + | Vstart | Vend | Vexit -> [`Color 0x0000FF; `Shape `Doublecircle] 216 + | VfctIn | VfctOut -> [`Color 0x0000FF; `Shape `Box] 217 + | VblkIn _ | VblkOut _ -> [`Shape `Box] 218 + - | Vloop _ | Vloop2 _ -> [`Color 0xFF0000; `Style [`Filled]] 219 + + | Vloop _ | Vloop2 _ -> [`Color 0xFF0000; `Style `Filled] 220 + | Vtest _ | Vswitch _ -> 221 + - [`Color 0x00FF00; `Style [`Filled]; `Shape `Diamond] 222 + + [`Color 0x00FF00; `Style `Filled; `Shape `Diamond] 223 + | Vcall _ | Vstmt _ -> [] 224 + in (`Label (String.escaped label))::attr 225 + 226 + @@ -1290,15 +1290,15 @@ module Printer (PE : sig val edge_txt : edge -> string end) = struct 227 + let attr = [] in 228 + let attr = (`Label (String.escaped (PE.edge_txt e)))::attr in 229 + let attr = 230 + - if is_back_edge e then (`Constraint false)::(`Style [`Bold])::attr 231 + + if is_back_edge e then (`Constraint false)::(`Style `Bold)::attr 232 + else attr 233 + in 234 + let attr = match (edge_type e) with 235 + | Ethen | EbackThen -> (`Color 0x00FF00)::attr 236 + | Eelse | EbackElse -> (`Color 0xFF0000)::attr 237 + - | Ecase [] -> (`Color 0x0000FF)::(`Style [`Dashed])::attr 238 + + | Ecase [] -> (`Color 0x0000FF)::(`Style `Dashed)::attr 239 + | Ecase _ -> (`Color 0x0000FF)::attr 240 + - | Enext -> (`Style [`Dotted])::attr 241 + + | Enext -> (`Style `Dotted)::attr 242 + | Eback -> attr (* see is_back_edge above *) 243 + | Enone -> attr 244 + in 245 + @@ -1308,7 +1308,7 @@ module Printer (PE : sig val edge_txt : edge -> string end) = struct 246 + 247 + let get_subgraph v = 248 + let mk_subgraph name attrib = 249 + - let attrib = (`Style [`Filled]) :: attrib in 250 + + let attrib = (`Style `Filled) :: attrib in 251 + Some { Graph.Graphviz.DotAttributes.sg_name= name; 252 + sg_parent = None; 253 + sg_attributes = attrib } 254 + --
-64
pkgs/development/tools/misc/frama-c/0007-Port-to-OCamlgraph-1.8.2.patch
··· 1 - From: Mehdi Dogguy <mehdi@debian.org> 2 - Date: Wed, 16 May 2012 14:48:40 +0200 3 - Subject: Port to OCamlgraph 1.8.2 4 - 5 - o Graph.Topological: as of OCamlgraph 1.8.2, the input graph must 6 - implement Sig.COMPARABLE instead of Sig.HASHABLE 7 - --- 8 - src/misc/service_graph.ml | 2 +- 9 - src/misc/service_graph.mli | 2 +- 10 - src/semantic_callgraph/register.ml | 1 + 11 - src/syntactic_callgraph/register.ml | 1 + 12 - 4 files changed, 4 insertions(+), 2 deletions(-) 13 - 14 - diff --git a/src/misc/service_graph.ml b/src/misc/service_graph.ml 15 - index f30a1be..567698f 100644 16 - --- a/src/misc/service_graph.ml 17 - +++ b/src/misc/service_graph.ml 18 - @@ -24,7 +24,7 @@ module Make 19 - (G: sig 20 - type t 21 - module V: sig 22 - - include Graph.Sig.HASHABLE 23 - + include Graph.Sig.COMPARABLE 24 - val id: t -> int 25 - val name: t -> string 26 - val attributes: t -> Graph.Graphviz.DotAttributes.vertex list 27 - diff --git a/src/misc/service_graph.mli b/src/misc/service_graph.mli 28 - index 5ebb570..8006977 100644 29 - --- a/src/misc/service_graph.mli 30 - +++ b/src/misc/service_graph.mli 31 - @@ -28,7 +28,7 @@ module Make 32 - (G: sig 33 - type t 34 - module V: sig 35 - - include Graph.Sig.HASHABLE 36 - + include Graph.Sig.COMPARABLE 37 - val id: t -> int 38 - (** assume is >= 0 and unique for each vertices of the graph *) 39 - val name: t -> string 40 - diff --git a/src/semantic_callgraph/register.ml b/src/semantic_callgraph/register.ml 41 - index 0b3b4df..064dca8 100644 42 - --- a/src/semantic_callgraph/register.ml 43 - +++ b/src/semantic_callgraph/register.ml 44 - @@ -107,6 +107,7 @@ module Service = 45 - (if Kernel_function.is_definition v then `Bold 46 - else `Dotted) ] 47 - let equal = Kernel_function.equal 48 - + let compare v1 v2 = Datatype.Int.compare (id v1) (id v2) 49 - let hash = Kernel_function.hash 50 - let entry_point () = 51 - try Some (fst (Globals.entry_point ())) 52 - diff --git a/src/syntactic_callgraph/register.ml b/src/syntactic_callgraph/register.ml 53 - index 4efb594..d9d78b9 100644 54 - --- a/src/syntactic_callgraph/register.ml 55 - +++ b/src/syntactic_callgraph/register.ml 56 - @@ -41,6 +41,7 @@ module Service = 57 - | NIVar (_,b) when not !b -> `Style `Dotted 58 - | _ -> `Style `Bold ] 59 - let equal v1 v2 = id v1 = id v2 60 - + let compare v1 v2 = Datatype.Int.compare (id v1) (id v2) 61 - let hash = id 62 - let entry_point () = !entry_point_ref 63 - end 64 - --
···