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/prose/kinds.ml.html
Source file kinds.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 54open Lang open Domain open Lib (* Hint kinds *) module Kind = struct type t = Alter of Hints.Alter.t | Fields of Hints.Fields.t let to_string = function | Alter hint_alter -> Hints.Alter.to_string hint_alter | Fields hint_fields -> Hints.Fields.to_string hint_fields end (* Hints associated with type cases *) module TypHints = MakeCaseIdEnv (Kind) (* Hints associated with relation ids *) module RelHints = MakeRIdEnv (Kind) (* Hints associated with function ids *) module FuncHints = MakeFIdEnv (Kind) (* Collection of hints for a single hint id *) type t = { typs : TypHints.t; funcs : FuncHints.t; rels : RelHints.t } let empty = { typs = TypHints.empty; funcs = FuncHints.empty; rels = RelHints.empty } (* Adders *) let add_typ (cid : CaseId.t) (kind : Kind.t) (kinds : t) : t = { kinds with typs = TypHints.add cid kind kinds.typs } let add_func (fid : FId.t) (kind : Kind.t) (kinds : t) : t = { kinds with funcs = FuncHints.add fid kind kinds.funcs } let add_rel (rid : RId.t) (kind : Kind.t) (kinds : t) : t = { kinds with rels = RelHints.add rid kind kinds.rels } (* Finders *) let find_typ (cid : CaseId.t) (kinds : t) : Kind.t option = TypHints.find_opt cid kinds.typs let find_func (fid : FId.t) (kinds : t) : Kind.t option = FuncHints.find_opt fid kinds.funcs let find_rel (rid : RId.t) (kinds : t) : Kind.t option = RelHints.find_opt rid kinds.rels
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>