Skip to content

Commit

Permalink
Deploying to gh-pages from @ 388f06d 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
zapashcanon committed Dec 4, 2024
1 parent 5ab79ca commit e0c678f
Show file tree
Hide file tree
Showing 26 changed files with 730 additions and 733 deletions.
6 changes: 3 additions & 3 deletions coverage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,9 @@ <h2>77.17%</h2>
</div>
<div>
<span class="meter">
<span class="covered" style="width: 87%"></span>
<span class="covered" style="width: 88%"></span>
</span>
<span class="percentage">87% <span class="stats">(28 / 32)</span></span>
<span class="percentage">88% <span class="stats">(30 / 34)</span></span>
<a href="src/data_structures/synchronizer.ml.html">
<span class="dirname">src/data_structures/</span>synchronizer.ml
</a>
Expand All @@ -430,7 +430,7 @@ <h2>77.17%</h2>
<span class="meter">
<span class="covered" style="width: 100%"></span>
</span>
<span class="percentage">100% <span class="stats">(16 / 16)</span></span>
<span class="percentage">100% <span class="stats">(14 / 14)</span></span>
<a href="src/data_structures/wq.ml.html">
<span class="dirname">src/data_structures/</span>wq.ml
</a>
Expand Down
16 changes: 8 additions & 8 deletions coverage/src/ast/types.ml.html
Original file line number Diff line number Diff line change
Expand Up @@ -2303,8 +2303,8 @@ <h2>48.51%</h2>
| <span data-count="14">F</span>64 -&gt; pf fmt "f64"

let num_type_eq t1 t2 =
<span data-count="3225336">m</span>atch (t1, t2) with
| <span data-count="2957810">I</span>32, I32 | <span data-count="89290">I</span>64, I64 | <span data-count="88970">F</span>32, F32 | <span data-count="89223">F</span>64, F64 -&gt; true
<span data-count="3225318">m</span>atch (t1, t2) with
| <span data-count="2957791">I</span>32, I32 | <span data-count="89290">I</span>64, I64 | <span data-count="88970">F</span>32, F32 | <span data-count="89223">F</span>64, F64 -&gt; true
| <span data-count="43">_</span>, _ -&gt; false

let compare_num_type t1 t2 =
Expand Down Expand Up @@ -2604,8 +2604,8 @@ <h2>48.51%</h2>
| <span data-count="0">R</span>ef_type t -&gt; pp_ref_type fmt t

let val_type_eq t1 t2 =
<span data-count="3223513">m</span>atch (t1, t2) with
| <span data-count="3223491">N</span>um_type t1, Num_type t2 -&gt; num_type_eq t1 t2
<span data-count="3223495">m</span>atch (t1, t2) with
| <span data-count="3223473">N</span>um_type t1, Num_type t2 -&gt; num_type_eq t1 t2
| <span data-count="22">R</span>ef_type t1, Ref_type t2 -&gt; ref_type_eq t1 t2
| <span data-count="0">_</span>, _ -&gt; false

Expand All @@ -2620,15 +2620,15 @@ <h2>48.51%</h2>

let pp_param fmt (id, vt) = <span data-count="295">p</span>f fmt "(param%a %a)" pp_id_opt id pp_val_type vt

let param_eq (_, t1) (_, t2) = <span data-count="1615845">v</span>al_type_eq t1 t2
let param_eq (_, t1) (_, t2) = <span data-count="1615833">v</span>al_type_eq t1 t2

let compare_param (_, t1) (_, t2) = <span data-count="33487">c</span>ompare_val_type t1 t2

type nonrec 'a param_type = 'a param list

let pp_param_type fmt params = <span data-count="156">l</span>ist ~sep:sp pp_param fmt params

let param_type_eq t1 t2 = <span data-count="1614614">L</span>ist.equal param_eq t1 t2
let param_type_eq t1 t2 = <span data-count="1614607">L</span>ist.equal param_eq t1 t2

let compare_param_type t1 t2 = <span data-count="74149">L</span>ist.compare compare_param t1 t2

Expand All @@ -2638,7 +2638,7 @@ <h2>48.51%</h2>

let pp_result_type fmt results = <span data-count="163">l</span>ist ~sep:sp pp_result_ fmt results

let result_type_eq t1 t2 = <span data-count="1614469">L</span>ist.equal val_type_eq t1 t2
let result_type_eq t1 t2 = <span data-count="1614463">L</span>ist.equal val_type_eq t1 t2

let compare_result_type t1 t2 = <span data-count="40507">L</span>ist.compare compare_val_type t1 t2

Expand Down Expand Up @@ -2677,7 +2677,7 @@ <h2>48.51%</h2>
results

let func_type_eq (pt1, rt1) (pt2, rt2) =
<span data-count="1614614">p</span>aram_type_e<span data-count="1614614">q</span> pt1 pt2 &amp;&amp; <span data-count="1614469">r</span>esult_type_eq rt1 rt2
<span data-count="1614607">p</span>aram_type_e<span data-count="1614608">q</span> pt1 pt2 &amp;&amp; <span data-count="1614463">r</span>esult_type_eq rt1 rt2

let compare_func_type (pt1, rt1) (pt2, rt2) =
<span data-count="74149">l</span>et pt = compare_param_type pt1 pt2 in
Expand Down
6 changes: 3 additions & 3 deletions coverage/src/cmd/cmd_sym.ml.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,10 @@ <h2>90.22%</h2>
<span data-count="369">l</span>et res_queue = Wq.make () in
<span data-count="369">l</span>et path_count = ref 0 in
let callback v =
<span data-count="1808">l</span>et open Symbolic_choice_intf in
<span data-count="1584">l</span>et open Symbolic_choice_intf in
incr path_count;
<span data-count="1809">m</span>atch (fail_mode, v) with
| <span data-count="1617">_</span>, (EVal (Ok ()), _) -&gt; ()
<span data-count="1585">m</span>atch (fail_mode, v) with
| <span data-count="1392">_</span>, (EVal (Ok ()), _) -&gt; ()
| <span data-count="1">_</span>, (EVal (Error e), thread) -&gt; Wq.push (`Error e, thread) res_queue
| <span data-count="160">(</span><span data-count="160">`</span>Both | <span data-count="0">`</span>Trap_only), (ETrap (t, m), thread) -&gt;
Wq.push (`ETrap (t, m), thread) res_queue
Expand Down
4 changes: 2 additions & 2 deletions coverage/src/data_structures/env_id.ml.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ <h2>77.78%</h2>
<span data-count="3332">l</span>et last = succ last in
<span data-count="3332">(</span>{ c; last }, r)

let get i c = <span data-count="12070684">M</span>ap.find i c.c
let get i c = <span data-count="12070672">M</span>ap.find i c.c

let map f c = <span data-count="0">{</span> c with c = Map.ma<span data-count="0">p</span> f c.c }

module Tbl = Hashtbl.Make (struct
include Int

let hash x = <span data-count="1256823">x</span>
let hash x = <span data-count="1255441">x</span>
end)
</code></pre>
</div>
Expand Down
4 changes: 2 additions & 2 deletions coverage/src/data_structures/func_id.ml.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ <h2>100.00%</h2>
<span data-count="9951">(</span>last, { c; last = suc<span data-count="9951">c</span> last })

let get i c =
<span data-count="122353">l</span>et v, _ = IMap.find i c.c in
<span data-count="122350">v</span>
<span data-count="122367">l</span>et v, _ = IMap.find i c.c in
<span data-count="122367">v</span>

let get_typ i c =
<span data-count="4263">l</span>et _, t = IMap.find i c.c in
Expand Down
40 changes: 20 additions & 20 deletions coverage/src/data_structures/stack.ml.html
Original file line number Diff line number Diff line change
Expand Up @@ -525,17 +525,17 @@ <h2>96.00%</h2>

let empty = []

let push s v = <span data-count="88839995">v</span> :: s
let push s v = <span data-count="88836862">v</span> :: s

let push_bool s b = <span data-count="16445555">p</span>ush s (I32 (V.Bool.int3<span data-count="16445597">2</span> b))
let push_bool s b = <span data-count="16445513">p</span>ush s (I32 (V.Bool.int3<span data-count="16445529">2</span> b))

let push_const_i32 s i = <span data-count="7806915">p</span>ush s (I32 (V.const_i3<span data-count="7807422">2</span> i))
let push_const_i32 s i = <span data-count="7806218">p</span>ush s (I32 (V.const_i3<span data-count="7806846">2</span> i))

let push_i32 s i = <span data-count="6486554">p</span>ush s (I32 i)
let push_i32 s i = <span data-count="6486084">p</span>ush s (I32 i)

let push_i32_of_int s i = <span data-count="12">p</span>ush_const_i32 s (Int32.of_in<span data-count="12">t</span> i)

let push_const_i64 s i = <span data-count="10576167">p</span>ush s (I64 (V.const_i6<span data-count="10576217">4</span> i))
let push_const_i64 s i = <span data-count="10576192">p</span>ush s (I64 (V.const_i6<span data-count="10576219">4</span> i))

let push_i64 s i = <span data-count="10139752">p</span>ush s (I64 i)

Expand All @@ -554,22 +554,22 @@ <h2>96.00%</h2>
let pp fmt (s : t) =
<span data-count="584">F</span>mt.list ~sep:(fun fmt () -&gt; <span data-count="420">F</span>mt.string fmt " ; ") V.pp fmt s

let pop = function <span data-count="0">[</span>] -&gt; raise Empty | <span data-count="76513220">h</span>d :: tl -&gt; (hd, tl)
let pop = function <span data-count="0">[</span>] -&gt; raise Empty | <span data-count="76510188">h</span>d :: tl -&gt; (hd, tl)

let drop = function <span data-count="0">[</span>] -&gt; raise Empty | <span data-count="12038">_</span>hd :: tl -&gt; tl
let drop = function <span data-count="0">[</span>] -&gt; raise Empty | <span data-count="11822">_</span>hd :: tl -&gt; tl

let pop_i32 s =
<span data-count="6980708">l</span>et hd, tl = pop s in
<span data-count="6980613">m</span>atch hd with <span data-count="6980608">I</span>32 n -&gt; (n, tl) | _ -&gt; assert false
<span data-count="6980346">l</span>et hd, tl = pop s in
<span data-count="6980380">m</span>atch hd with <span data-count="6980420">I</span>32 n -&gt; (n, tl) | _ -&gt; assert false

let pop2_i32 s =
<span data-count="9201327">l</span>et n2, s = pop s in
<span data-count="9201315">l</span>et n1, tl = pop s in
<span data-count="9201331">m</span>atch (n1, n2) with <span data-count="9201292">I</span>32 n1, I32 n2 -&gt; ((n1, n2), tl) | _ -&gt; assert false
<span data-count="9200708">l</span>et n2, s = pop s in
<span data-count="9200705">l</span>et n1, tl = pop s in
<span data-count="9200782">m</span>atch (n1, n2) with <span data-count="9200793">I</span>32 n1, I32 n2 -&gt; ((n1, n2), tl) | _ -&gt; assert false

let pop_i64 s =
<span data-count="10355619">l</span>et hd, tl = pop s in
<span data-count="10355607">m</span>atch hd with <span data-count="10355600">I</span>64 n -&gt; (n, tl) | _ -&gt; assert false
<span data-count="10355613">l</span>et hd, tl = pop s in
<span data-count="10355608">m</span>atch hd with <span data-count="10355607">I</span>64 n -&gt; (n, tl) | _ -&gt; assert false

let pop2_i64 s =
<span data-count="10227027">l</span>et n2, s = pop s in
Expand Down Expand Up @@ -603,17 +603,17 @@ <h2>96.00%</h2>
<span data-count="231">m</span>atch hd with <span data-count="231">R</span>ef hd -&gt; (hd, tl) | _ -&gt; assert false

let pop_bool s =
<span data-count="16373243">l</span>et hd, tl = pop s in
<span data-count="16373229">m</span>atch hd with <span data-count="16373220">I</span>32 n -&gt; (V.I32.to_boo<span data-count="16373229">l</span> n, tl) | _ -&gt; assert false
<span data-count="16373166">l</span>et hd, tl = pop s in
<span data-count="16373166">m</span>atch hd with <span data-count="16373165">I</span>32 n -&gt; (V.I32.to_boo<span data-count="16373164">l</span> n, tl) | _ -&gt; assert false

let pop_n s n =
<span data-count="12022525">(</span>List.filter<span data-count="12022499">i</span> (fun i _hd -&gt; <span data-count="12577116">i</span> &lt; n) s, List.filter<span data-count="12022515">i</span> (fun i _hd -&gt; <span data-count="12577162">i</span> &gt;= n) s)
<span data-count="12022546">(</span>List.filter<span data-count="12022563">i</span> (fun i _hd -&gt; <span data-count="12577296">i</span> &lt; n) s, List.filter<span data-count="12022554">i</span> (fun i _hd -&gt; <span data-count="12577283">i</span> &gt;= n) s)

let keep s n = <span data-count="3857426">L</span>ist.filteri (fun i _hd -&gt; <span data-count="528424">i</span> &lt; n) s
let keep s n = <span data-count="3856143">L</span>ist.filteri (fun i _hd -&gt; <span data-count="527985">i</span> &lt; n) s

let rec drop_n s n =
<span data-count="16856832">i</span>f n = 0 then <span data-count="15782542">s</span>
else <span data-count="1074287">m</span>atch s with [] -&gt; assert false | <span data-count="1074289">_</span> :: tl -&gt; drop_n tl (n - 1)
<span data-count="16854501">i</span>f n = 0 then <span data-count="15781902">s</span>
else <span data-count="1072603">m</span>atch s with [] -&gt; assert false | <span data-count="1072603">_</span> :: tl -&gt; drop_n tl (n - 1)
end
</code></pre>
</div>
Expand Down
50 changes: 25 additions & 25 deletions coverage/src/data_structures/synchronizer.ml.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<title>synchronizer.ml &mdash; Coverage report</title>
<meta name="description" content="87.50% coverage in src/data_structures/synchronizer.ml">
<meta name="description" content="88.24% coverage in src/data_structures/synchronizer.ml">
<link rel="stylesheet" href="../../coverage.css"/>
<script src="../../highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
Expand All @@ -15,7 +15,7 @@ <h1>
<span class="dirname">src/data_structures/</span>synchronizer.ml
</a>
</h1>
<h2>87.50%</h2>
<h2>88.24%</h2>
</div>
<div id="navbar">
<span class="some-visited" style="top:40.62%"></span>
Expand Down Expand Up @@ -74,7 +74,7 @@ <h2>87.50%</h2>
<a id="L46"></a><span > </span>
<a id="L47"></a><span class="visited"> </span>
<a id="L48"></a><span class="visited"> </span>
<a id="L49"></a><span > </span>
<a id="L49"></a><span class="visited"> </span>
<a id="L50"></a><span class="visited"> </span>
<a id="L51"></a><span > </span>
<a id="L52"></a><span > </span>
Expand Down Expand Up @@ -182,33 +182,33 @@ <h2>87.50%</h2>
}

let get synchro pledge =
<span data-count="45087">l</span>et rec inner_loop synchro pledge =
<span data-count="46148">m</span>atch synchro.getter () with
| <span data-count="2107">N</span>one when synchro.pledges = <span data-count="1043">0</span> || synchro.close<span data-count="0">d</span> -&gt;
<span data-count="1043">C</span>ondition.broadcast synchro.cond;
<span data-count="1043">N</span>one
| <span data-count="1064">N</span>one -&gt;
<span data-count="44834">l</span>et rec inner_loop synchro pledge =
<span data-count="45698">m</span>atch synchro.getter () with
| <span data-count="1913">N</span>one when synchro.pledges = <span data-count="1042">0</span> || synchro.close<span data-count="0">d</span> -&gt;
<span data-count="1042">C</span>ondition.broadcast synchro.cond;
<span data-count="1042">N</span>one
| <span data-count="871">N</span>one -&gt;
Condition.wait synchro.cond synchro.mutex;
<span data-count="1061">i</span>nner_loop synchro pledge
| <span data-count="44041">S</span>ome _ as v -&gt;
if pledge then <span data-count="43849">s</span>ynchro.pledges &lt;- synchro.pledges + 1;
<span data-count="44041">v</span>
<span data-count="864">i</span>nner_loop synchro pledge
| <span data-count="43785">S</span>ome _ as v -&gt;
if pledge then <span data-count="43593">s</span>ynchro.pledges &lt;- synchro.pledges + 1;
<span data-count="43785">v</span>
in
Mutex.protect synchro.mutex (fun () -&gt; <span data-count="45087">i</span>nner_loop synchro pledge)
Mutex.protect synchro.mutex (fun () -&gt; <span data-count="44834">i</span>nner_loop synchro pledge)

let write v { writter; cond; mutex; _ } =
<span data-count="44076">M</span>utex.protect mutex (fun () -&gt; <span data-count="44081">w</span>ritter v cond)
<span data-count="43810">M</span>utex.protect mutex (fun () -&gt; <span data-count="43817">w</span>ritter v cond)

let make_pledge synchro =
<span data-count="730">M</span>utex.lock synchro.mutex;
<span data-count="730">s</span>ynchro.pledges &lt;- synchro.pledges + 1;
Mutex.unlock synchro.mutex

let end_pledge synchro =
<span data-count="44523">M</span>utex.lock synchro.mutex;
<span data-count="44523">s</span>ynchro.pledges &lt;- synchro.pledges - 1;
Condition.broadcast synchro.cond;
<span data-count="44523">M</span>utex.unlock synchro.mutex
<span data-count="44271">M</span>utex.lock synchro.mutex;
<span data-count="44271">s</span>ynchro.pledges &lt;- synchro.pledges - 1;
if Int.equal synchro.pledges 0 then <span data-count="1883">C</span>ondition.broadcas<span data-count="1883">t</span> synchro.cond;
<span data-count="44271">M</span>utex.unlock synchro.mutex

let fail q =
<span data-count="0">M</span>utex.lock q.mutex;
Expand All @@ -217,12 +217,12 @@ <h2>87.50%</h2>
<span data-count="0">M</span>utex.unlock q.mutex

let rec work_while f q =
<span data-count="44549">m</span>atch get q true with
| <span data-count="697">N</span>one -&gt; ()
| <span data-count="43849">S</span>ome v -&gt;
let () = f v (fun v -&gt; <span data-count="43519">w</span>rite v q) in
<span data-count="43826">e</span>nd_pledge q;
<span data-count="43826">w</span>ork_while f q
<span data-count="44296">m</span>atch get q true with
| <span data-count="696">N</span>one -&gt; ()
| <span data-count="43593">S</span>ome v -&gt;
let () = f v (fun v -&gt; <span data-count="43248">w</span>rite v q) in
<span data-count="43575">e</span>nd_pledge q;
<span data-count="43575">w</span>ork_while f q
</code></pre>
</div>
</div>
Expand Down
15 changes: 6 additions & 9 deletions coverage/src/data_structures/wq.ml.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ <h2>100.00%</h2>
<a id="L29"></a><span class="visited"> </span>
<a id="L30"></a><span class="visited"> </span>
<a id="L31"></a><span class="visited"> </span>
<a id="L32"></a><span class="visited"> </span>
<a id="L33"></a><span > </span>
<a id="L34"></a><span class="visited"> </span>
<a id="L32"></a><span > </span>
<a id="L33"></a><span class="visited"> </span>
</pre>
</div>
<div id="text-layer">
Expand Down Expand Up @@ -93,7 +92,6 @@ <h2>100.00%</h2>
<a href="#L31">31</a>
<a href="#L32">32</a>
<a href="#L33">33</a>
<a href="#L34">34</a>
</pre>
<pre><code class="ocaml">(* SPDX-License-Identifier: AGPL-3.0-or-later *)
(* Copyright © 2021-2024 OCamlPro *)
Expand All @@ -117,18 +115,17 @@ <h2>100.00%</h2>

let push v q = <span data-count="561">S</span>ynchronizer.write v q

let work_while f q = <span data-count="723">S</span>ynchronizer.work_while f q
let work_while f q = <span data-count="721">S</span>ynchronizer.work_while f q

let fail = Synchronizer.fail

let make () =
<span data-count="738">l</span>et q = Queue.create () in
<span data-count="738">l</span>et writter v condvar =
<span data-count="44085">l</span>et was_empty = Queue.is_empty q in
<span data-count="44085">Q</span>ueue.push v q;
<span data-count="44085">i</span>f was_empty then <span data-count="1396">C</span>ondition.broadcast condvar
<span data-count="43823">Q</span>ueue.push v q;
<span data-count="43823">C</span>ondition.signal condvar
in
Synchronizer.init (fun () -&gt; <span data-count="46152">Q</span>ueue.take_opt q) writter
Synchronizer.init (fun () -&gt; <span data-count="45702">Q</span>ueue.take_opt q) writter
</code></pre>
</div>
</div>
Expand Down
Loading

0 comments on commit e0c678f

Please sign in to comment.