package frama-c
Platform dedicated to the analysis of source code written in C
Install
Dune Dependency
Authors
-
MMichele Alberti
-
TThibaud Antignac
-
GGergö Barany
-
PPatrick Baudin
-
NNicolas Bellec
-
TThibaut Benjamin
-
AAllan Blanchard
-
LLionel Blatter
-
FFrançois Bobot
-
RRichard Bonichon
-
VVincent Botbol
-
QQuentin Bouillaguet
-
DDavid Bühler
-
ZZakaria Chihani
-
SSylvain Chiron
-
LLoïc Correnson
-
JJulien Crétin
-
PPascal Cuoq
-
ZZaynah Dargaye
-
BBasile Desloges
-
JJean-Christophe Filliâtre
-
PPhilippe Herrmann
-
MMaxime Jacquemin
-
BBenjamin Jorge
-
FFlorent Kirchner
-
AAlexander Kogtenkov
-
RRemi Lazarini
-
TTristan Le Gall
-
KKilyan Le Gallic
-
JJean-Christophe Léchenet
-
MMatthieu Lemerre
-
DDara Ly
-
DDavid Maison
-
CClaude Marché
-
AAndré Maroneze
-
TThibault Martin
-
FFonenantsoa Maurica
-
MMelody Méaulle
-
BBenjamin Monate
-
YYannick Moy
-
PPierre Nigron
-
AAnne Pacalet
-
VValentin Perrelle
-
GGuillaume Petiot
-
DDario Pinto
-
VVirgile Prevosto
-
AArmand Puccetti
-
FFélix Ridoux
-
VVirgile Robles
-
JJan Rochel
-
MMuriel Roger
-
CCécile Ruet-Cros
-
JJulien Signoles
-
NNicolas Stouls
-
KKostyantyn Vorobyov
-
BBoris Yakobowski
Maintainers
Sources
frama-c-31.0-Gallium.tar.gz
sha256=a94384f00d53791cbb4b4d83ab41607bc71962d42461f02d71116c4ff6dca567
doc/src/mthread/mt_mutexes_types.ml.html
Source file mt_mutexes_types.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
(**************************************************************************) (* *) (* This file is part of Frama-C. *) (* *) (* Copyright (C) 2007-2025 *) (* CEA (Commissariat à l'énergie atomique et aux énergies *) (* alternatives) *) (* *) (* you can redistribute it and/or modify it under the terms of the GNU *) (* Lesser General Public License as published by the Free Software *) (* Foundation, version 2.1. *) (* *) (* It is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU Lesser General Public License for more details. *) (* *) (* See the GNU Lesser General Public License version 2.1 *) (* for more details (enclosed in the file licenses/LGPLv2.1). *) (* *) (**************************************************************************) open Mt_types type access_or_protection = Unaccessed | Mutexes of MutexPresence.t module UnaccessedOrProtection = struct let pretty fmt = function | Unaccessed -> Format.fprintf fmt "unaccessed" | Mutexes p -> if MutexPresence.is_empty p then Format.fprintf fmt "unprotected" else Format.fprintf fmt "protected by %a" MutexPresence.pretty p let equal v1 v2 = match v1, v2 with | Unaccessed, Unaccessed -> true | Mutexes p1, Mutexes p2 -> MutexPresence.equal p1 p2 | _ -> false let compare v1 v2 = match v1, v2 with | Unaccessed, Unaccessed -> 0 | Mutexes p1, Mutexes p2 -> MutexPresence.compare p1 p2 | (Unaccessed | Mutexes _), _ -> Mt_lib.compare_tag v1 v2 let hash = function | Unaccessed -> 3 | Mutexes p -> 3 + MutexPresence.hash p let join v1 v2 = match v1, v2 with | Unaccessed, Unaccessed -> Unaccessed | Unaccessed, Mutexes p | Mutexes p, Unaccessed -> Mutexes p | Mutexes p1, Mutexes p2 -> Mutexes (MutexPresence.combine p1 p2) let meet _ _ = assert false end type mutexes_by_access = { mutexes_for_read: access_or_protection; mutexes_for_write: access_or_protection; } module MutexesByAccess = struct type t = mutexes_by_access let same_read_write { mutexes_for_read = r; mutexes_for_write = w } = UnaccessedOrProtection.equal r w let pretty fmt ({ mutexes_for_read = r; mutexes_for_write = w } as v) = if same_read_write v then UnaccessedOrProtection.pretty fmt r else Format.fprintf fmt "write %a,@ read %a" UnaccessedOrProtection.pretty w UnaccessedOrProtection.pretty r let hash { mutexes_for_read = r; mutexes_for_write = w } = UnaccessedOrProtection.hash r + UnaccessedOrProtection.hash w let equal v1 v2 = UnaccessedOrProtection.equal v1.mutexes_for_read v2.mutexes_for_read && UnaccessedOrProtection.equal v1.mutexes_for_write v2.mutexes_for_write let compare v1 v2 = Mt_lib.comp UnaccessedOrProtection.compare v1.mutexes_for_read v2.mutexes_for_read UnaccessedOrProtection.compare v1.mutexes_for_write v2.mutexes_for_write let join v1 v2 = { mutexes_for_read = UnaccessedOrProtection.join v1.mutexes_for_read v2.mutexes_for_read; mutexes_for_write = UnaccessedOrProtection.join v1.mutexes_for_write v2.mutexes_for_write; } let meet v1 v2 = { mutexes_for_read = UnaccessedOrProtection.meet v1.mutexes_for_read v2.mutexes_for_read; mutexes_for_write = UnaccessedOrProtection.meet v1.mutexes_for_write v2.mutexes_for_write; } let unaccessed = { mutexes_for_read = Unaccessed; mutexes_for_write = Unaccessed } end module LatticeMutexes = struct include Datatype.Make( struct include Datatype.Undefined include MutexesByAccess let structural_descr = Structural_descr.t_abstract let reprs = [{ mutexes_for_read = Mutexes MutexPresence.empty; mutexes_for_write = Mutexes MutexPresence.empty }] let name = "Mt_shared_vars_types.LatticeMutexes.t" let rehash x = x end) let bottom = { mutexes_for_read = Unaccessed; mutexes_for_write = Unaccessed } let top = { mutexes_for_read = Mutexes MutexPresence.empty; mutexes_for_write = Mutexes MutexPresence.empty } let join = MutexesByAccess.join let _meet = MutexesByAccess.meet (* ZZZ improve complexity *) let is_included v1 v2 = (join v1 v2) = v2 let default = bottom let default_is_bottom = true end module MutexesByZone = struct include Lmap_bitwise.Make_bitwise(LatticeMutexes) let pretty = pretty_generic_printer ~pretty_v:LatticeMutexes.pretty ~skip_v:(fun v -> LatticeMutexes.(equal v bottom)) ~sep:"" () end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>