File tree Expand file tree Collapse file tree 4 files changed +15
-4
lines changed
Expand file tree Collapse file tree 4 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -34,9 +34,12 @@ module Position = struct
3434 type codepos = (codepos1 * int ) list * codepos1
3535 type codeoffset1 = [`ByOffset of int | `ByPosition of codepos1 ]
3636
37- let shift ~(offset : int ) ((o , p ) : codepos1 ) : codepos1 =
37+ let shift1 ~(offset : int ) ((o , p ) : codepos1 ) : codepos1 =
3838 (o + offset, p)
3939
40+ let shift ~(offset : int ) ((outp , p ) : codepos ) : codepos =
41+ (outp, shift1 ~offset p)
42+
4043 let resolve_offset ~(base : codepos1 ) ~(offset : codeoffset1 ) : codepos1 =
4144 match offset with
4245 | `ByPosition pos -> pos
Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ module Position : sig
3030 type codepos = (codepos1 * int ) list * codepos1
3131 type codeoffset1 = [`ByOffset of int | `ByPosition of codepos1 ]
3232
33- val shift : offset :int -> codepos1 -> codepos1
33+ val shift1 : offset :int -> codepos1 -> codepos1
34+ val shift : offset :int -> codepos -> codepos
35+
3436 val resolve_offset : base :codepos1 -> offset :codeoffset1 -> codepos1
3537end
3638
Original file line number Diff line number Diff line change @@ -317,7 +317,14 @@ let process_unroll_for side cpos tc =
317317 [t_apply_hd h'; t_conseq_nm] ] tc
318318 in
319319
320- let tcenv = t_doit 0 pos zs tc in FApi. t_onalli doi tcenv
320+ let tcenv = t_doit 0 pos zs tc in
321+ let tcenv = FApi. t_onalli doi tcenv in
322+
323+ let cpos = EcMatching.Position. shift ~offset: (- 1 ) cpos in
324+ let clen = blen * (List. length zs - 1 ) in
325+
326+ Format. eprintf " [W]%d %d@." blen (List. length zs);
327+ FApi. t_last (EcPhlCodeTx. t_cfold side cpos (Some clen)) tcenv
321328
322329(* -------------------------------------------------------------------- *)
323330let process_unroll (side , cpos , for_ ) tc =
Original file line number Diff line number Diff line change @@ -108,7 +108,6 @@ theory CfoldWhileUnroll.
108108 proc.
109109 cfold 1 .
110110 unroll for 2 .
111- cfold 1 .
112111 by auto => />.
113112 qed.
114113end CfoldWhileUnroll.
You can’t perform that action at this time.
0 commit comments