Debug

‘debug’ Dialect

The Debug dialect contains operations for debugging and validation.

These ops are intended to be used during development to do things like insert function calls at specific program checkpoints.

Debug ops

debug.validate (heir::debug::ValidateOp)

Validates an SSA value.

Syntax:

operation ::= `debug.validate` $input attr-dict `:` type($input)

The debug.validate operation is a high-level placeholder for validating an SSA value. This is transformed via *-add-debug-port passes to a function call to an externally defined function that may then decrypt and validate the operand.

The mandatory name attribute gives a unique identifier for the validation instance, and this is used to connect intermediate values of a plaintext execution of a program to the corresponding program points of the HEIR-compiled program.

An optional metadata attribute may contain an arbitrary JSON blob, to be passed to the function call, which is intended to contain metadata like the plaintext execution result that the called function can use to compare with the decrypted ciphertext.

Attributes:

AttributeMLIR TypeDescription
name::mlir::StringAttrstring attribute
metadata::mlir::StringAttrstring attribute

Operands:

OperandDescription
inputany type