Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / src / plugins.ml @ 2b476ad8

History | View | Annotate | Download (622 Bytes)

1
open LustreSpec
2

    
3
module type PluginType =
4
sig
5

    
6
end
7

    
8

    
9

    
10
let inline_annots rename_var_fun annot_list =
11
  List.map (
12
    fun ann -> 
13
      { ann with 
14
	annots = List.fold_left (
15
	  fun accu (sl, eexpr) -> 
16
	    let items = 
17
	      match sl with 
18
	      | plugin_name::args -> 
19
		if plugin_name = "salsa" then
20
		  match args with
21
		  | ["ranges";varname] -> 
22
		    [["salsa";"ranges";(rename_var_fun varname)], eexpr]
23
		  | _ -> [(sl, eexpr)]
24
		else
25
		  [(sl, eexpr)]
26
	    | _ -> assert false
27
	    in
28
	    items@accu
29
	) [] ann.annots
30
      }
31
  ) annot_list
32

    
33
(* Local Variables: *)
34
(* compile-command:"make -C .." *)
35
(* End: *)