package bap-std
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=63ada71fa4f602bd679174dc6bf780d54aeded40ad4ec20d256df15886e3d2d5
md5=b8b1aff8c6846f2213eafc54de07b304
doc/bap/Bap/Std/Disasm_expert/Basic/Trie/index.html
Module Basic.Trie
Trie maps over instructions
key_of_first_insns state ~len:n creates a key from first n instructions stored in the state if state contains such amount of instructions
module Normalized : Trie.S with type key = keyinclude Trie.S with type key := key
include Core_kernel.Bin_prot.Binable.S1 with type 'a t := 'a t
val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1val bin_write_t : ('a, 'a t) Bin_prot.Write.writer1val bin_read_t : ('a, 'a t) Bin_prot.Read.reader1val __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writerval bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.readerval bin_t : ('a, 'a t) Bin_prot.Type_class.S1.tval create : unit -> 'a tcreate () creates new empty trie
add trie ~key ~data associates data with key. If trie already has some value associated with key, then the value will be overwritten (rebound)
change trie key f if trie has data associated with key then f will be called with Some data, otherwise it will be called with None. If f returns None then there will be no data associated with key, if f returns Some thing, then thing will be associated with key
walk trie key ~init ~f walks down the tree starting from the root and ending with the last token of the key. Function f is fold over values associated with all substrings of the key, starting from a zero substring.
longest_match trie key find a value associated with a longest substring of key. Returns a pair - a length of matched key and the value, associated with that key.
val length : 'a t -> intlength trie returns the number of values in trie
val pp : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a t -> unitpp pp_val creates a printer for a given value printer pp_val. Example:
let int_trie = String.Trie.pp pp_int
will create a printer for a String.Trie that is populated by integers.