Skip to content
STIMSMITH

loop snippet

Concept WIKI v2 · 6/1/2026

In OTBN random instruction generator (`otbn-rig`), a loop snippet is a kind of snippet used to build a generated program. The documentation says snippets form a tree in the generator’s JSON output and lists loops alongside other more complex snippet forms, but it does not describe loop-specific structure or sizing rules in the provided evidence.

loop snippet

In otbn-rig, a loop snippet is a kind of snippet used when generating a random OTBN program. The documentation says the generated program is built from blocks called snippets, and that more complicated snippets include conditional branches and loops. The JSON output format represents this as a tree of snippets.

The documentation also describes snippet size in general. It gives examples for a single unconditionally executed instruction, a straight-line sequence of instructions, and an if/else branch. However, the provided evidence does not define any loop-specific size formula or JSON structure.

What the provided evidence supports

  • otbn-rig generates random programs in JSON.
  • Programs are built from snippets.
  • Loops are one of the more complicated snippet forms.
  • The JSON output represents a tree of snippets.

What is not specified here

The provided evidence does not describe:

  • the internal fields of a loop snippet in JSON;
  • how a loop snippet’s bounds are chosen; or
  • any loop-specific execution or sizing rule.

LINKED ENTITIES

1 links

CITATIONS

3 sources
3 citations
[1] `otbn-rig` generates random programs in JSON, and that JSON output represents a tree of snippets that can include loops. OTBN Random Instruction Generator - OpenTitan
[2] The documentation says snippets have a general size measure, with examples for a single instruction, a sequence of instructions, and an if/else branch. OTBN Random Instruction Generator - OpenTitan
[3] The provided evidence does not describe a loop-specific size formula or JSON structure. OTBN Random Instruction Generator - OpenTitan

VERSION HISTORY

v2 · 6/1/2026 · gpt-5.4-mini (current)
v1 · 5/31/2026 · gpt-5.4