Project

General

Profile

Revision b616fe7a src/basic_library.ml

View differences:

src/basic_library.ml
118 118
let is_internal_fun x =
119 119
  List.mem x internal_funs
120 120

  
121
(*
122
let imported_node name inputs outputs sl spec =
123
  mktop_decl Location.dummy_loc
124
    (
125
      ImportedNode
126
	{nodei_id = name;
127
	 nodei_type = Types.new_var ();
128
	 nodei_clock = Clocks.new_var true;
129
	 nodei_inputs = inputs;
130
	 nodei_outputs = outputs;
131
	 nodei_stateless = sl;
132
	nodei_spec = spec})
133
    
134
let mk_new_var id =
135
  let loc = Location.dummy_loc in
136
  mkvar_decl loc (id, mktyp loc Tydec_any, mkclock loc Ckdec_any, false)
137

  
138
let _ = 
139
  let binary_fun id = id, [mk_new_var "x"; mk_new_var "y"], [mk_new_var "z"] in
140
  let unary_fun id = id, [mk_new_var "x"], [mk_new_var "y"] in
141
  (* All following functions are stateless *)
142
  let st = true in
143
  List.iter (fun (n,i,o) -> Hashtbl.add node_table n (imported_node n i o st None))
144
    (
145
(*("ite", [mk_new_var "g"; mk_new_var "x"; mk_new_var "y"], [mk_new_var "z"])::*)
146
    (List.map binary_fun
147
	["+";"-";"*";"/";"mod";"&&";"||";"xor";"impl";"<";">";"<=";">=";"!=";"="])
148
     @(List.map unary_fun ["uminus";"not"]))
149
*)  
121

  
150 122
let pp_c i pp_val fmt vl =
151 123
  match i, vl with
152 124
  (*  | "ite", [v1; v2; v3] -> Format.fprintf fmt "(%a?(%a):(%a))" pp_val v1 pp_val v2 pp_val v3 *)

Also available in: Unified diff