Correct some typos
This commit is contained in:
parent
609870755c
commit
9a0bfd468c
@ -291,7 +291,7 @@ let rec cp_nodes fmt (nodes, h) =
|
|||||||
(** [dump_var_locations] dumps the internal tables to map the program variable
|
(** [dump_var_locations] dumps the internal tables to map the program variable
|
||||||
* (after all the passes) to their location in the final C program. *)
|
* (after all the passes) to their location in the final C program. *)
|
||||||
let dump_var_locations fmt (st: node_states) =
|
let dump_var_locations fmt (st: node_states) =
|
||||||
Format.fprintf fmt "Tables mapping the AST Variables to the C variables:\n";
|
Format.fprintf fmt "Tables mapping the AST variables to the C variables:\n";
|
||||||
Hashtbl.iter
|
Hashtbl.iter
|
||||||
(fun n st ->
|
(fun n st ->
|
||||||
Format.fprintf fmt " ∗ NODE: %s\n" n;
|
Format.fprintf fmt " ∗ NODE: %s\n" n;
|
||||||
|
@ -35,7 +35,7 @@ let exec_passes ast verbose debug passes f =
|
|||||||
"Current AST (after %s):\n%a\n" n Lustre_pp.pp_ast ast);
|
"Current AST (after %s):\n%a\n" n Lustre_pp.pp_ast ast);
|
||||||
aux ast passes)
|
aux ast passes)
|
||||||
end with
|
end with
|
||||||
| _ -> failwith ("The pass "^n^" should have catched me!")
|
| _ -> failwith ("The pass "^n^" should have caught me!")
|
||||||
in
|
in
|
||||||
aux ast passes
|
aux ast passes
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ open Utils
|
|||||||
*)
|
*)
|
||||||
let pass_if_removal verbose debug =
|
let pass_if_removal verbose debug =
|
||||||
let varcount = ref 0 in (** new variables are called «_ifrem[varcount]» *)
|
let varcount = ref 0 in (** new variables are called «_ifrem[varcount]» *)
|
||||||
(** Males a pattern (t_varlist) of fresh variables matching the type t *)
|
(** Makes a pattern (t_varlist) of fresh variables matching the type t *)
|
||||||
let make_patt t: t_varlist =
|
let make_patt t: t_varlist =
|
||||||
(t, List.fold_right
|
(t, List.fold_right
|
||||||
(fun ty acc ->
|
(fun ty acc ->
|
||||||
@ -153,7 +153,7 @@ let pass_if_removal verbose debug =
|
|||||||
* This is required, since the pre construct is translated into a variable in
|
* This is required, since the pre construct is translated into a variable in
|
||||||
* the final C code. *)
|
* the final C code. *)
|
||||||
let pass_linearization_pre verbose debug =
|
let pass_linearization_pre verbose debug =
|
||||||
(** [node_lin] linearises a single node. *)
|
(** [node_lin] linearizes a single node. *)
|
||||||
let node_lin (node: t_node): t_node option =
|
let node_lin (node: t_node): t_node option =
|
||||||
(** [pre_aux_expression] takes an expression and returns:
|
(** [pre_aux_expression] takes an expression and returns:
|
||||||
* - a list of additional equations
|
* - a list of additional equations
|
||||||
@ -188,7 +188,7 @@ let pass_linearization_pre verbose debug =
|
|||||||
let eqs, vars, e = pre_aux_expression vars e in
|
let eqs, vars, e = pre_aux_expression vars e in
|
||||||
let eqs', vars, e' = pre_aux_expression vars e' in
|
let eqs', vars, e' = pre_aux_expression vars e' in
|
||||||
eqs @ eqs', vars, EBinOp (t, op, e, e')
|
eqs @ eqs', vars, EBinOp (t, op, e, e')
|
||||||
| ETriOp (t, op, e, e', e'') -> (** Do we always want a new var here ? *)
|
| ETriOp (t, op, e, e', e'') -> (** Do we always want a new var here? *)
|
||||||
let eqs, vars, e = pre_aux_expression vars e in
|
let eqs, vars, e = pre_aux_expression vars e in
|
||||||
let nvar: string = fresh_var_name vars 6 in
|
let nvar: string = fresh_var_name vars 6 in
|
||||||
let nvar: t_var = BVar nvar in
|
let nvar: t_var = BVar nvar in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user