package frama-c-metacsl

  1. Overview
  2. Docs
MetAcsl plugin of Frama-C for writing pervasives properties

Install

dune-project
 Dependency

Authors

Maintainers

Sources

meta-0.10.tar.bz2
md5=7efd0ca166d8bd6df1d522ca246fda4b
sha512=24f67db46bf50b04e34da4d7e30d6ed34c1b3ad18e11913f596fb1b227d21a49b12bb8bee52fdc35c79c8363f19cbeed7d9183f19e02a25a2fb09f379ccfd51d

doc/src/frama-c-metacsl.core/meta_utils.ml.html

Source file meta_utils.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
(**************************************************************************)
(*                                                                        *)
(*  SPDX-License-Identifier LGPL-2.1                                      *)
(*  Copyright (C)                                                         *)
(*  CEA (Commissariat à l'énergie atomique et aux énergies alternatives)  *)
(*                                                                        *)
(**************************************************************************)

module StrSet = Datatype.String.Set
module Str_Hashtbl = Datatype.String.Hashtbl
module Stmt_Hashtbl = Cil_datatype.Stmt.Hashtbl
module Fundec_Hashtbl = Cil_datatype.Fundec.Hashtbl
module Fundec_Set = Cil_datatype.Fundec.Set

let find_hash_list find_opt table key =
  match find_opt table key with
    | Some l -> l
    | None -> []

(* In a hashtable mapping key to lists of values, adds v to that list *)
let add_to_hash_list (find_opt, replace) table key v =
  let old_list = find_hash_list find_opt table key in
  replace table key (v :: old_list)