package libsail

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

The FILE_HANDLER module type allows plugins to define handlers for custom file types. It defines how those files are processed and eventually generate Sail AST types.

type parsed

A parsed representation of the file.

type processed

The file handler may do some arbitrary processing of the parsed file contents prior to generating Sail AST types.

val parse : Parse_ast.l option -> string -> parsed
val defines_functions : processed -> Ast_util.IdSet.t

If the file will define any functions, we must inform Sail.

val uninitialized_registers : processed -> (Ast.id * Ast.typ) list

If the file generates registers without any initialized default value, we must inform Sail, i.e this would be a register like

register X : bits(32)

rather than

register X : bits(32) = 0x0000_0000

which does have a default value.

val process : default_sail_dir:string -> target_name:string option -> options:(Arg.key * Arg.spec * Arg.doc) list -> Initial_check.ctx -> parsed -> processed * Initial_check.ctx
OCaml

Innovation. Community. Security.