Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / src / annotations.ml @ master

History | View | Annotate | Download (1.16 KB)

1 566dbf49 ploc
(********************************************************************)
2
(*                                                                  *)
3
(*  The LustreC compiler toolset   /  The LustreC Development Team  *)
4
(*  Copyright 2012 -    --   ONERA - CNRS - INPT                    *)
5
(*                                                                  *)
6
(*  LustreC is free software, distributed WITHOUT ANY WARRANTY      *)
7
(*  under the terms of the GNU Lesser General Public License        *)
8
(*  version 2.1.                                                    *)
9
(*                                                                  *)
10
(********************************************************************)
11
12 8446bf03 ploc
open Lustre_types
13 566dbf49 ploc
14
15
(* Associate to each annotation key the pair (node, expr tag) *)
16
let expr_annotations : (string list, ident * tag) Hashtbl.t=  Hashtbl.create 13
17
let node_annotations : (string list, ident) Hashtbl.t=  Hashtbl.create 13
18
19
let add_expr_ann node_id expr_tag key = Hashtbl.add expr_annotations key (node_id, expr_tag)
20
let add_node_ann node_id key = Hashtbl.add node_annotations key node_id
21
22
let get_expr_annotations key = Hashtbl.find_all expr_annotations key