package caisar-ir

  1. Overview
  2. Docs

Module Ir.Nier_cfgSource

This module defines the structure and interfaces for a Neural IntermediatE Representation (NIER).

It is primarly designed as an intermediate state into producing verifiable terms from an ONNX model.

Tensor module

Tensors are multidimensional arrays used to represent numerical such as a neural network weight

Sourcemodule Tensor : sig ... end

Modules for graph generation

Sourcemodule Node : sig ... end
Sourcemodule type VInput = sig ... end
Sourcemodule MakeVertex (I : VInput) : sig ... end
Sourcemodule Edge : sig ... end

NIER is a graph (V,E) where V is the set of vertices (nodes) and E is the set of edges (connections between nodes). Nodes contains the following informations:

  • unique id
  • name coming from the original model, if it exists
  • shape of the tensor resulting from the application of the node operation, if it exist
  • operation performed
  • parameters of the operation
  • an optional tensor storing the data

Note that tensor have their own shape; they must be equal to the NIER's node shape however.

Sourcemodule NierCFG (I : VInput) : sig ... end
Sourcemodule NierCFGFloat : sig ... end

Pretty printers

Sourceval print_cfg_graph : NierCFGFloat.t -> Base.unit
Sourceval out_cfg_graph : NierCFGFloat.t -> Base.unit
OCaml

Innovation. Community. Security.