package libsail

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

Module Libsail.BitfieldSource

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

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

Sourceval 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

Sourceval 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

Sourcetype field_accessor_ids = {
  1. get : Ast.id;
  2. set : Ast.id;
  3. update : Ast.id;
  4. overload : Ast.id;
}
Sourceval 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.

Sourceval macro : Ast.id -> Libsail.Ast_util.Big_int.num -> Ast.order -> Ast.index_range Ast_util.Bindings.t -> Ast_util.untyped_def list

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.