Merge pull request #7708 from vbgl/framac-sodium

frama-c: update from Neon to Sodium

+3 -262
-254
pkgs/development/tools/analysis/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 - --
+3 -8
pkgs/development/tools/analysis/frama-c/default.nix
··· 3 3 4 4 stdenv.mkDerivation rec { 5 5 name = "frama-c-${version}"; 6 - version = "20140301"; 7 - slang = "Neon"; 6 + version = "20150201"; 7 + slang = "Sodium"; 8 8 9 9 src = fetchurl { 10 10 url = "http://frama-c.com/download/frama-c-${slang}-${version}.tar.gz"; 11 - sha256 = "0ca7ky7vs34did1j64v6d8gcp2irzw3rr5qgv47jhmidbipn1865"; 11 + sha256 = "0wackacnnpxnh3612ld68bal8b1dm9cdsi180lw42bsyks03h5mn"; 12 12 }; 13 13 14 14 why2 = fetchurl { ··· 23 23 24 24 25 25 enableParallelBuilding = true; 26 - configureFlags = [ "--disable-local-ocamlgraph" ]; 27 26 28 27 unpackPhase = '' 29 28 tar xf $src ··· 41 40 make install 42 41 ''; 43 42 44 - 45 - # Taken from Debian Sid 46 - # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746091 47 - patches = ./0004-Port-to-OCamlgraph-1.8.5.patch; 48 43 49 44 # Enter frama-c directory before patching 50 45 prePatch = ''cd frama*'';