Skip to content
Snippets Groups Projects
Commit c10e0175 authored by Basile Desloges's avatar Basile Desloges
Browse files

[eacsl] Do not reverse lscope list in Lscope.get_all

parent cdc6c3c0
No related branches found
No related tags found
No related merge requests found
...@@ -33,7 +33,7 @@ let is_empty = function [] -> true | _ :: _ -> false ...@@ -33,7 +33,7 @@ let is_empty = function [] -> true | _ :: _ -> false
let add lscope_var t = lscope_var :: t let add lscope_var t = lscope_var :: t
let get_all t = List.rev t let get_all t = t
let exists lv t = let exists lv t =
let is_lv = function let is_lv = function
......
...@@ -41,8 +41,9 @@ val add: lscope_var -> t -> t ...@@ -41,8 +41,9 @@ val add: lscope_var -> t -> t
val get_all: t -> lscope_var list val get_all: t -> lscope_var list
(* Return the list of [lscope_var] of the given logic scope. (* Return the list of [lscope_var] of the given logic scope.
The first element is the first [lscope_var] that was added to [t], the The first element is the last [lscope_var] that was added to [t], the
second element is the second [lscope_var] that was added to [t], an so on. *) second element is the second to last [lscope_var] that was added to [t], and
so on. *)
val is_used: t -> pred_or_term -> bool val is_used: t -> pred_or_term -> bool
(* [is_used lscope pot] returns [true] iff [pot] uses a variable from (* [is_used lscope pot] returns [true] iff [pot] uses a variable from
......
...@@ -236,6 +236,7 @@ let put_block_at_label env kf block label = ...@@ -236,6 +236,7 @@ let put_block_at_label env kf block label =
let to_exp ~loc kf env pot label = let to_exp ~loc kf env pot label =
let term_to_exp = !term_to_exp_ref in let term_to_exp = !term_to_exp_ref in
let lscope_vars = Lscope.get_all (Env.Logic_scope.get env) in let lscope_vars = Lscope.get_all (Env.Logic_scope.get env) in
let lscope_vars = List.rev lscope_vars in
let sizes_and_shifts = let sizes_and_shifts =
sizes_and_shifts_from_quantifs ~loc kf lscope_vars [] sizes_and_shifts_from_quantifs ~loc kf lscope_vars []
in in
...@@ -349,6 +350,7 @@ let to_exp ~loc kf env pot label = ...@@ -349,6 +350,7 @@ let to_exp ~loc kf env pot label =
in in
(* Storing loops *) (* Storing loops *)
let lscope_vars = Lscope.get_all (Env.Logic_scope.get env) in let lscope_vars = Lscope.get_all (Env.Logic_scope.get env) in
let lscope_vars = List.rev lscope_vars in
let env = Env.push env in let env = Env.push env in
let storing_loops_stmts, env = let storing_loops_stmts, env =
Loops.mk_nested_loops ~loc mk_innermost_block kf env lscope_vars Loops.mk_nested_loops ~loc mk_innermost_block kf env lscope_vars
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment