package frama-c
Platform dedicated to the analysis of source code written in C
Install
Dune Dependency
Authors
-
MMichele Alberti
-
TThibaud Antignac
-
GGergö Barany
-
PPatrick Baudin
-
NNicolas Bellec
-
TThibaut Benjamin
-
AAllan Blanchard
-
LLionel Blatter
-
FFrançois Bobot
-
RRichard Bonichon
-
VVincent Botbol
-
QQuentin Bouillaguet
-
DDavid Bühler
-
ZZakaria Chihani
-
LLoïc Correnson
-
JJulien Crétin
-
PPascal Cuoq
-
ZZaynah Dargaye
-
BBasile Desloges
-
JJean-Christophe Filliâtre
-
PPhilippe Herrmann
-
MMaxime Jacquemin
-
FFlorent Kirchner
-
AAlexander Kogtenkov
-
RRemi Lazarini
-
TTristan Le Gall
-
JJean-Christophe Léchenet
-
MMatthieu Lemerre
-
DDara Ly
-
DDavid Maison
-
CClaude Marché
-
AAndré Maroneze
-
TThibault Martin
-
FFonenantsoa Maurica
-
MMelody Méaulle
-
BBenjamin Monate
-
YYannick Moy
-
PPierre Nigron
-
AAnne Pacalet
-
VValentin Perrelle
-
GGuillaume Petiot
-
DDario Pinto
-
VVirgile Prevosto
-
AArmand Puccetti
-
FFélix Ridoux
-
VVirgile Robles
-
JJan Rochel
-
MMuriel Roger
-
JJulien Signoles
-
NNicolas Stouls
-
KKostyantyn Vorobyov
-
BBoris Yakobowski
Maintainers
Sources
frama-c-29.0-Copper.tar.gz
sha256=d2fbb3b8d0ff83945872e9e6fa258e934a706360e698dae3b4d5f971addf7493
doc/src/frama-c-wp.core/ProverScript.ml.html
Source file ProverScript.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675
(**************************************************************************) (* *) (* This file is part of WP plug-in of Frama-C. *) (* *) (* Copyright (C) 2007-2024 *) (* CEA (Commissariat a l'energie atomique et aux energies *) (* alternatives) *) (* *) (* you can redistribute it and/or modify it under the terms of the GNU *) (* Lesser General Public License as published by the Free Software *) (* Foundation, version 2.1. *) (* *) (* It is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU Lesser General Public License for more details. *) (* *) (* See the GNU Lesser General Public License version 2.1 *) (* for more details (enclosed in the file licenses/LGPLv2.1). *) (* *) (**************************************************************************) open Tactical open ProofScript let dkey_pp_allgoals = Wp_parameters.register_category "script:allgoals" (* -------------------------------------------------------------------------- *) (* --- Alternatives Ordering --- *) (* -------------------------------------------------------------------------- *) module Priority = struct open VCS let stage = function | Prover( Qed , { verdict = Valid } ) -> 0 | Prover( Why3 _ , { verdict = Valid } ) -> 1 | Tactic _ -> 2 | Prover _ -> 3 | Error _ -> 4 let time = function | Tactic _ | Error _ -> 0.0 | Prover( _ , r ) -> r.prover_time +. r.solver_time let compare a b = let sa = stage a in let sb = stage b in if sa = sb then Stdlib.compare (time a) (time b) else sa - sb let sort script = List.stable_sort compare script end (* -------------------------------------------------------------------------- *) (* --- Running Json-Tactical --- *) (* -------------------------------------------------------------------------- *) let jconfigure (console : #Tactical.feedback) jtactic goal = let _ , sequent = Wpo.compute goal in match ProofScript.configure jtactic sequent with | None -> None | Some(tactical,selection) -> console#set_title "%s" tactical#title ; let verdict = try Lang.local ~pool:console#pool (tactical#select console) selection with Not_found | Exit -> Not_applicable in begin match verdict with | Applicable process when not console#has_error -> let strategy = jtactic.strategy in let script = ProofScript.jtactic ?strategy tactical selection in Some (script , process) | _ -> None end let jfork tree ?node jtactic = let console = new ProofScript.console ~pool:(ProofEngine.pool tree) ~title:jtactic.header in try let anchor = ProofEngine.anchor tree ?node () in Option.iter (ProofEngine.set_hint anchor) jtactic.strategy ; let goal = ProofEngine.goal anchor in let ctxt = ProofEngine.node_context anchor in match WpContext.on_context ctxt (jconfigure console jtactic) goal with | None -> None | Some (script,process) -> Some (ProofEngine.fork tree ~anchor script process) with | Exit | Not_found | Invalid_argument _ -> console#set_error "Can not configure tactic" ; None | e -> console#set_error "Exception <%s>" (Printexc.to_string e) ; raise e (* -------------------------------------------------------------------------- *) (* --- Running Alternatives --- *) (* -------------------------------------------------------------------------- *) open Task module Env = struct type t = { tree : ProofEngine.tree ; valid : bool ; (* play valid provers *) failed : bool ; (* play failed provers *) provers : VCS.prover list ; progress : Wpo.t -> string -> unit ; result : Wpo.t -> VCS.prover -> VCS.result -> unit ; success : Wpo.t -> VCS.prover option -> unit ; depth : int ; width : int ; auto : Strategy.heuristic list ; (* DEPRECATED *) strategies : bool ; mutable pending : int ; (* pending jobs *) mutable signaled : bool ; backtrack : int ; mutable backtracking : backtracking option ; } and backtracking = { bk_node : ProofEngine.node ; bk_depth : int ; (* depth of search *) mutable bk_best : int ; (* best index, (-1) for none *) mutable bk_pending : int ; (* best pending, max_int when none *) } let tree env = env.tree let play env prv res = List.mem prv env.provers && if VCS.is_valid res then env.valid else env.failed let progress env msg = env.progress (ProofEngine.main env.tree) msg let validate env = ProofEngine.validate env.tree ; if not env.signaled then let wpo = ProofEngine.main env.tree in let proved = Wpo.is_passed wpo in if proved || env.pending = 0 then begin env.signaled <- true ; List.iter (fun (prv,res) -> env.result wpo prv res) (Wpo.get_results wpo) ; env.success wpo (if proved then Some VCS.Tactical else None) end let goal env = function | Some n -> ProofEngine.goal n | None -> ProofEngine.main env.tree let prove env wpo ?config prover = Prover.prove wpo ?config ~mode:VCS.Batch ~progress:env.progress prover let backtracking env = match ProofEngine.status env.tree with | `Unproved | `Invalid | `Proved | `Passed -> 0 | `Pending n | `StillResist n -> n let setup_backtrack env node depth = if env.backtrack > 0 then let is_nearer = match env.backtracking with | None -> true | Some { bk_depth } -> depth < bk_depth in if is_nearer then let _,hs = ProofEngine.get_strategies node in if Array.length hs > 1 then env.backtracking <- Some { bk_node = node ; bk_best = (-1) ; bk_depth = depth ; bk_pending = backtracking env ; } let search env node ~depth = if env.auto <> [] && depth < env.depth && backtracking env < env.width then match ProverSearch.search env.tree ~anchor:node env.auto with | None -> None | Some _ as fork -> setup_backtrack env node depth ; fork else None let backtrack env = if env.backtrack <= 0 then None else match env.backtracking with | None -> None | Some point -> let n = backtracking env in let anchor = point.bk_node in if n < point.bk_pending then begin point.bk_best <- fst (ProofEngine.get_strategies anchor) ; point.bk_pending <- n ; end ; match ProverSearch.backtrack env.tree ~anchor ~loop:false () with | Some fork -> env.backtracking <- None ; Some (point.bk_depth,fork) | None -> (* end of backtrack *) env.backtracking <- None ; match ProverSearch.index env.tree ~anchor ~index:point.bk_best with None -> None | Some fork -> Some (point.bk_depth,fork) let provers env = env.provers let make tree ~valid ~failed ~provers ~strategies ~depth ~width ~backtrack ~auto ~progress ~result ~success = { tree ; valid ; failed ; provers ; pending = 0 ; depth ; width ; backtrack ; auto ; strategies ; progress ; result ; success ; backtracking = None ; signaled = false } end (* -------------------------------------------------------------------------- *) (* --- Choosing Alternatives --- *) (* -------------------------------------------------------------------------- *) let fst_order _ _ = 0 let key_order (a,_) (b,_) = String.compare a b let rec zip order nodes scripts = match nodes , scripts with | _ , [] | [] , _ -> (*TODO: saveback forgiven scripts *) () | node :: o_nodes , script :: o_scripts -> let cmp = order node script in if cmp < 0 then zip order o_nodes scripts else if cmp > 0 then zip order nodes o_scripts else (ProofEngine.bind (snd node) (snd script) ; zip order o_nodes o_scripts) let reconcile nodes scripts = match nodes , scripts with | [] , [] -> () | [_,n] , [_,s] -> ProofEngine.bind n s | _ -> if List.for_all (fun (k,_) -> k = "") scripts then zip fst_order nodes scripts else zip key_order (List.stable_sort key_order nodes) (List.stable_sort key_order scripts) let rec forall phi = function | x::xs -> phi x >>= fun ok -> if ok then forall phi xs else Task.return false | [] -> Task.return true let rec exists phi = function | x::xs -> phi x >>= fun ok -> if ok then Task.return true else exists phi xs | [] -> Task.return false let prove_node env node prv = let wpo = Env.goal env (Some node) in if not (VCS.is_verdict (Wpo.get_result wpo prv)) then Env.prove env wpo prv else Task.return false (* -------------------------------------------------------------------------- *) (* --- Auto & Seach Mode (DEPRECATED) --- *) (* -------------------------------------------------------------------------- *) let rec auto env ?(depth=0) node : bool Task.task = exists (prove_node env node) (Env.provers env) >>= fun ok -> if ok then Task.return true else if depth > 0 then autosearch env ~depth node else begin autosearch env ~depth node >>= fun ok -> if ok then Task.return true else match Env.backtrack env with | Some (depth,fork) -> Env.progress env "Backtracking" ; autofork env ~depth fork | None -> Task.return false end and autosearch env ~depth node : bool Task.task = match Env.search env node ~depth with | None -> Task.return false | Some fork -> autofork env ~depth fork and autofork env ~depth fork = let _,children = ProofEngine.commit fork in let pending = Env.backtracking env in if pending > 0 then begin Env.progress env (Printf.sprintf "Auto %d" pending) ; let depth = succ depth in forall (auto env ~depth) (List.map snd children) end else Task.return true (* -------------------------------------------------------------------------- *) (* --- Proof Strategy Alternatives --- *) (* -------------------------------------------------------------------------- *) let dkey_strategy = Wp_parameters.register_category "strategy" type solver = ProofEngine.node -> bool Task.task let success = Task.return true let failed = Task.return false let unknown : solver = fun _ -> failed let (+>>) (a : solver) (b : solver) : solver = fun node -> a node >>= fun ok -> if ok then success else b node let progress a b = let sa = ProofEngine.goal a |> Wpo.compute |> snd in let sb = ProofEngine.goal b |> Wpo.compute |> snd in not (Conditions.equal sa sb) let rec sequence (f : 'a -> solver) = function | [] -> unknown | x::xs -> f x +>> sequence f xs let pp_node fmt node = Format.pp_print_string fmt (ProofEngine.goal node).Wpo.po_gid let rec explore_strategy env process strategy : solver = fun node -> if ProofEngine.depth node > env.Env.depth then begin Wp_parameters.debug ~dkey:dkey_strategy "[%a] Depth limit reached (%d)" pp_node node (ProofEngine.depth node) ; failed end else begin Wp_parameters.debug ~dkey:dkey_strategy "[%a] Strategy %s: enter@." pp_node node (ProofStrategy.name strategy) ; sequence (explore_alternative env process strategy) (ProofStrategy.alternatives strategy) node >>= fun ok -> Wp_parameters.debug ~dkey:dkey_strategy "[%a] Strategy %s: %s@." pp_node node (ProofStrategy.name strategy) (if ok then "proved" else "failed"); Task.return ok end and explore_alternative env process strategy alternative : solver = explore_provers env alternative +>> explore_tactic env process strategy alternative +>> explore_auto env process alternative +>> explore_fallback env process alternative and explore_provers env alternative : solver = let provers,timeout = ProofStrategy.provers ~default:env.Env.provers alternative in sequence (explore_prover env timeout) provers and explore_prover env timeout prover node = let wpo = ProofEngine.goal node in let result = Cache.promote ~timeout @@ Wpo.get_result wpo prover in if VCS.is_valid result then success else if VCS.is_verdict result then failed else let config = { VCS.default with timeout = Some timeout } in Env.prove env wpo ~config prover and explore_tactic env process strategy alternative node = Wp_parameters.debug ~dkey:dkey_strategy "@[<hov 2>[%a] Trying@ %a@]" pp_node node ProofStrategy.pp_alternative alternative ; match ProofStrategy.tactic env.tree node strategy alternative with | None -> failed | Some [node'] when not (progress node node') -> Wp_parameters.debug ~dkey:dkey_strategy "@[<hov 2>[%a] tactic has made no progress" pp_node node ; failed | Some nodes -> Wp_parameters.debug ~dkey:dkey_strategy "@[<hov 2>[%a] success (%d children) (at depth %d/%d)" pp_node node (List.length nodes) (ProofEngine.depth node) env.depth; List.iter process nodes ; success and explore_auto env process alternative node = match ProofStrategy.auto alternative with | None -> failed | Some h -> match ProverSearch.search env.tree ~anchor:node [h] with | None -> failed | Some fork -> List.iter (fun (_,node) -> process node) @@ snd @@ ProofEngine.commit fork ; success and explore_fallback env process alternative node = match ProofStrategy.fallback alternative with | None -> failed | Some strategy -> explore_strategy env process strategy node let explore_local_hint env process node = match ProofEngine.get_hint node with | None -> failed | Some s -> match ProofStrategy.find s with | None -> failed | Some s -> explore_strategy env process s node let explore_further env process strategy node = let marked = match ProofEngine.get_hint node with | None -> false | Some s -> ProofStrategy.name strategy = s in if marked then failed else explore_strategy env process strategy node let explore_further_hints env process = let wpo = ProofEngine.main env.Env.tree in sequence (explore_further env process) (ProofStrategy.hints wpo) let explore_hints env process = explore_local_hint env process +>> explore_further_hints env process (* -------------------------------------------------------------------------- *) (* --- Automated Solving --- *) (* -------------------------------------------------------------------------- *) let automated env process : solver = auto env +>> if env.Env.strategies then explore_hints env process else unknown (* -------------------------------------------------------------------------- *) (* --- Apply Script Tactic --- *) (* -------------------------------------------------------------------------- *) let apply env node jtactic subscripts = match jfork (Env.tree env) ?node jtactic with | None -> failwith "Selector not found" | Some fork -> let _,children = ProofEngine.commit fork in reconcile children subscripts ; (*TODO: saveback forgiven script ? *) let ok = List.for_all (fun (_,node) -> ProofEngine.locally_proved node) children in if ok then [] else children (* -------------------------------------------------------------------------- *) (* --- Script Crawling --- *) (* -------------------------------------------------------------------------- *) let rec crawl env on_child node = function | [] -> let node = ProofEngine.anchor (Env.tree env) ?node () in automated env on_child node | Error(msg,json) :: alternatives -> Wp_parameters.warning "@[<hov 2>Script Error: on goal %a@\n%S: %a@]@." WpPropId.pretty (Env.goal env node).po_pid msg Json.pp json ; crawl env on_child node alternatives | Prover( prv , res ) :: alternatives -> begin let task = if Env.play env prv res then let wpo = Env.goal env node in let config = VCS.configure res in Env.prove env wpo ~config prv else Task.return false in let continue ok = if ok then success else crawl env on_child node alternatives in task >>= continue end | Tactic( _ , jtactic , subscripts ) :: alternatives -> begin try let residual = apply env node jtactic subscripts in List.iter (fun (_,n) -> on_child n) residual ; Task.return true with exn when Wp_parameters.protect exn -> Wp_parameters.warning "Script Error: on goal %a@\n\ can not apply '%s'@\n\ exception %S@\n\ @[<hov 2>Params: %a@]@\n\ @[<hov 2>Select: %a@]@." WpPropId.pretty (Env.goal env node).po_pid jtactic.tactic (Printexc.to_string exn) Json.pp jtactic.params Json.pp jtactic.select ; crawl env on_child node alternatives end (* -------------------------------------------------------------------------- *) (* --- Main Process --- *) (* -------------------------------------------------------------------------- *) let pp_subgoal env fmt node = let main = Env.goal env None in let wpo = Env.goal env (Some node) in Format.fprintf fmt "%s subgoal:@\n%a" (Wpo.get_gid main) Wpo.pp_goal_flow wpo let schedule job = Task.spawn (ProverTask.server ()) (Task.thread (Task.todo job)) let rec process env node = env.Env.pending <- succ env.Env.pending ; schedule begin fun () -> Wp_parameters.debug ~dkey:dkey_pp_allgoals "%a" (pp_subgoal env) node ; if ProofEngine.locally_proved node then begin env.pending <- pred env.pending ; Env.validate env ; Task.return () ; end else let script = Priority.sort (ProofEngine.bound node) in crawl env (process env) (Some node) script >>= begin fun _ -> env.pending <- pred env.pending ; Env.validate env ; Task.return () end end let task ~valid ~failed ~provers ~depth ~width ~backtrack ~auto ~scratch ~strategies ~start ~progress ~result ~success wpo = begin fun () -> Wp_parameters.debug ~dkey:dkey_pp_allgoals "%a" Wpo.pp_goal_flow wpo ; Prover.simplify ~start ~result wpo >>= fun succeed -> if succeed then ( success wpo (Some VCS.Qed) ; Task.return ()) else let script = if scratch then [] else Priority.sort @@ ProofScript.decode @@ ProofSession.load wpo in let tree = ProofEngine.proof ~main:wpo in let env = Env.make tree ~valid ~failed ~provers ~depth ~width ~backtrack ~auto ~strategies ~progress ~result ~success in crawl env (process env) None script >>= fun _ -> Env.validate env ; ProofEngine.forward tree ; Task.return () end (* -------------------------------------------------------------------------- *) (* --- Main Entry Points --- *) (* -------------------------------------------------------------------------- *) type 'a process = ?valid:bool -> ?failed:bool -> ?scratch:bool -> ?provers:VCS.prover list -> ?depth:int -> ?width:int -> ?backtrack:int -> ?auto:Strategy.heuristic list -> ?strategies:bool -> ?start:(Wpo.t -> unit) -> ?progress:(Wpo.t -> string -> unit) -> ?result:(Wpo.t -> VCS.prover -> VCS.result -> unit) -> ?success:(Wpo.t -> VCS.prover option -> unit) -> Wpo.t -> 'a let skip1 _ = () let skip2 _ _ = () let skip3 _ _ _ = () let prove ?(valid = true) ?(failed = true) ?(scratch = false) ?(provers = []) ?(depth = 0) ?(width = 0) ?(backtrack = 0) ?(auto = []) ?(strategies = false) ?(start = skip1) ?(progress = skip2) ?(result = skip3) ?(success = skip2) wpo = Task.todo (task ~valid ~failed ~provers ~depth ~width ~backtrack ~auto ~scratch ~strategies ~start ~progress ~result ~success wpo) let spawn ?(valid = true) ?(failed = true) ?(scratch = false) ?(provers = []) ?(depth = 0) ?(width = 0) ?(backtrack = 0) ?(auto = []) ?(strategies = false) ?(start = skip1) ?(progress = skip2) ?(result = skip3) ?(success = skip2) wpo = schedule (task ~valid ~failed ~provers ~depth ~width ~backtrack ~auto ~scratch ~strategies ~start ~progress ~result ~success wpo) let search ?(depth = 0) ?(width = 0) ?(backtrack = 0) ?(auto = []) ?(provers = []) ?(progress = skip2) ?(result = skip3) ?(success = skip2) tree node = begin let env = Env.make tree ~valid:false ~failed:false ~provers ~depth ~width ~backtrack ~auto ~strategies:false ~progress ~result ~success in schedule begin fun () -> autosearch env ~depth:0 node >>= fun _ -> Env.validate env ; Task.return () end end let explore ?(depth=0) ?(strategy) ?(progress = skip2) ?(result=skip3) ?(success = skip2) tree node = begin let depth = ProofEngine.depth node + depth in let env : Env.t = Env.make tree ~valid:false ~failed:false ~strategies:(strategy <> None) ~provers:[] ~depth ~width:0 ~backtrack:0 ~auto:[] ~progress ~result ~success in schedule begin fun () -> let solver = match strategy with | None -> explore_hints env (process env) | Some s -> explore_strategy env (fun _ -> ()) s in solver node >>= fun _ -> Env.validate env ; Task.return () end end (* -------------------------------------------------------------------------- *) (* --- Save Session --- *) (* -------------------------------------------------------------------------- *) let proofs = Hashtbl.create 32 let has_proof wpo = let wid = wpo.Wpo.po_gid in try Hashtbl.find proofs wid with Not_found -> if ProofSession.exists wpo then let ok = try let script = ProofScript.decode (ProofSession.load wpo) in ProofScript.has_proof script with _ -> false in (Hashtbl.add proofs wid ok ; ok) else false let get wpo = match ProofEngine.get wpo with | `None -> `None | `Proof -> `Proof | `Saved -> `Saved | `Script -> if has_proof wpo then `Script else `Proof (* -------------------------------------------------------------------------- *)
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>