package p4spectec
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
P4-SpecTec: A mechanization toolchain for the P4 Programming Language
Install
dune-project
Dependency
Authors
Maintainers
Sources
v0.1.2.tar.gz
md5=1a3bc0a385fe1ecf403c019f49aa6de6
sha512=5d20b5821f33e2a3a5419b208606f27c01511994c2b3b1e1cdf4c077056dfd0aa81682af0720e1060ee2bfb0341918fcc4c53159820205a2bc32b725e5c1a714
doc/src/dynamic/caches.ml.html
Source file caches.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 40open Util.Source (* Cache entry using values *) module ValueEntry = struct type t = Value.t let default : t = Value.Make.bool true let equal = Value.eq let hash (value : Value.t) = value.note.vhash end module ValueCache = Cache.Make.Make (ValueEntry) (* Cache entry using id and values *) module CallEntry = struct type t = string * Value.t list let default : t = ("", []) let rec equal_values (values_a : Value.t list) (values_b : Value.t list) : bool = match (values_a, values_b) with | [], [] -> true | v_a :: rest_a, v_b :: rest_b -> Value.eq v_a v_b && equal_values rest_a rest_b | _ -> false let equal ((id_a, values_a) : t) ((id_b, values_b) : t) : bool = if not (String.equal id_a id_b) then false else equal_values values_a values_b let hash ((id, values) : t) : int = let h = ref ((Hashtbl.hash id * 31) + 17) in List.iter (fun (v : Value.t) -> h := (!h * 31) + v.note.vhash) values; !h land 0x7FFFFFFF end module CallCache = Cache.Make.Make (CallEntry)
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>