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-beta.tar.bz2
md5=ac22be301cb2feaa8de33af7ceb6e41b
sha512=40d7381924ef486a1d2e66f34729bbb615def46d48d9ff9916bdc39250f920d5134a3af3c0bf856225de910d2bf7f92649e1e4e17615076afa9562c451a53316

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)