Revision 7d640c88
src/causality.ml  

330  330 
let rec filter_static_inputs inputs args = 
331  331 
match inputs, args with 
332  332 
 [] , [] > [] 
333 
 v::vq, a::aq > if v.var_dec_const then (dimension_of_expr a) :: filter_static_inputs vq aq else filter_static_inputs vq aq 

333 
 v::vq, a::aq > if v.var_dec_const && Types.is_dimension_type v.var_type then (dimension_of_expr a) :: filter_static_inputs vq aq else filter_static_inputs vq aq


334  334 
 _ > assert false 
335  335  
336  336 
let compute_generic_calls prog = 
src/corelang.ml  

11  11  
12  12 
open Format 
13  13 
open LustreSpec 
14 
open Dimension


14 
(*open Dimension*)


15  15  
16  16  
17  17 
exception Error of Location.t * error 
...  ...  
441  441 
 Expr_appl (f, args, r) > (f, expr_list_of_expr args, r) 
442  442 
 _ > assert false 
443  443  
444 


444  445 
(* Conversion from dimension expr to standard expr, for the purpose of printing, typing, etc... *) 
445  446 
let rec expr_of_dimension dim = 
446 
match dim.dim_desc with 

447 
let open Dimension in 

448 
match dim.dim_desc with 

447  449 
 Dbool b > 
448  450 
mkexpr dim.dim_loc (Expr_const (const_of_bool b)) 
449  451 
 Dint i > 
...  ...  
460  462 
assert false) 
461  463  
462  464 
let dimension_of_const loc const = 
465 
let open Dimension in 

463  466 
match const with 
464  467 
 Const_int i > mkdim_int loc i 
465  468 
 Const_tag t when t = tag_true  t = tag_false > mkdim_bool loc (t = tag_true) 
...  ...  
468  471 
(* Conversion from standard expr to dimension expr, for the purpose of injecting static call arguments 
469  472 
into dimension expressions *) 
470  473 
let rec dimension_of_expr expr = 
474 
let open Dimension in 

471  475 
match expr.expr_desc with 
472  476 
 Expr_const c > dimension_of_const expr.expr_loc c 
473  477 
 Expr_ident id > mkdim_ident expr.expr_loc id 
Also available in: Unified diff