package libsail

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Create an L-expression for setting the bits of a bitfield defined by an index_range type.

val set_bits_field_lexp : Ast_util.uannot Ast.lexp -> Ast_util.uannot Ast.lexp

Create an L-expression for setting all the bits of a bitfield

Create an expression converting the given expression from a bitfield to a bitvector

val construct_bitfield_exp : Ast.id -> Ast_util.uannot Ast.exp -> Ast_util.uannot Ast.exp

Create an expression converting the given expression from a bitvector to a bitfield

val construct_bitfield_struct : Ast.id -> Ast_util.uannot Ast.exp -> Ast_util.uannot Ast.exp

Create an expression converting the given expression from a bitvector to a bitfield, but using a struct expression rather than a constructor function

type field_accessor_ids = {
  1. get : Ast.id;
  2. set : Ast.id;
  3. update : Ast.id;
  4. overload : Ast.id;
}
val field_accessor_ids : Ast.id -> Ast.id -> field_accessor_ids

The macro function generates multiple definitions to get, set, and update fields, so we can use this function to find the names of those functions in a consistent way.

Bitfields work a bit like a macro, which generate a struct wrapper around a simple bitvector type, along with a host of accessor functions.

OCaml

Innovation. Community. Security.