Skip to content
You are reading the current documentation of ALVIE: 2026.10. Other versions: development version, 2026.09 (extended documentation), 2026.09 (as released)

TestDL Action Reference

This reference explains what each existing TestDL action means conceptually and where it is typically used.

It complements the TestDL Specification Reference for writing specifications. It also complements the V-B1 TestDL tutorial (a worked example) and the Extending TestDL Actions guide.

  • TestDL has attacker and enclave actions.
  • The same instruction syntax (mov, add, cmp, jmp, push, nop, dint) can appear as an attacker atom or enclave atom depending on section.
  • Section context matters for semantics:
    • attacker sections: isr, prepare, cleanup
    • enclave section: enclave
  • a; b - sequence: do a then b.
  • a | b - choice: allow either branch.
  • a* - repetition: allow zero or more repetitions.
  • eps - empty action.
  • ( ... ) - grouping.

These do not emit instructions by themselves but they shape the language of accepted traces.

  • Intuition: force watchdog-triggered reset.
  • Typical use: reset system state before/after experiments.
  • Common section: prepare or cleanup.
  • Intuition: conditional reset based on zero flag (jz guard before reset code).
  • Typical use: branch-dependent restart behavior.
  • Caveat: side effects depend on machine state/flags at that point.
  • Intuition: create/enable enclave with text/data boundaries (enclave text between addresses [ts, te] and enclave data between addresses [ds, de]); ts is the entry label of the enclave.
  • Typical use: setup in prepare before jumping in.
  • Common pattern: create ...; jin ts.
  • Intuition: jump into enclave entry label.
  • Typical use: transition from setup to enclave execution.
  • Usually appears once per run path in prepare.
  • Intuition: configure timer interrupt after n ticks.
  • Typical use: model interrupt scheduling during enclave execution.
  • Effect: helps generate handle/reti flows in traces.
  • Accepted range: decimal n in 0..65535.
  • Intuition: start timer counting without the interrupt-enabled mode used by timer_enable.
  • Typical use: finer control of timing behavior.
  • Accepted range: decimal n in 0..65535.
  • Intuition: return from interrupt handler.
  • Typical use: terminate isr path and resume interrupted control flow.
  • Intuition: attacker-side branch macro based on zero flag.
  • Typical use: conditional attack behavior encoded compactly.
  • Caveat: currently intended for non-nested ifz atoms.
  • Both branch lists must contain at least one atom.

Instruction atoms (nop, dint, mov, add, cmp, jmp, push)

Section titled “Instruction atoms (nop, dint, mov, add, cmp, jmp, push)”
  • Intuition: raw low-level attacker instructions.
  • Typical use: handcrafted attack steps when high-level atoms are insufficient.

Instruction atoms (nop, dint, mov, add, cmp, jmp, push)

Section titled “Instruction atoms (nop, dint, mov, add, cmp, jmp, push)”
  • Intuition: victim-side behavior fragments.
  • Typical use: encode instruction-level variability to test non-interference and distinguishability.
  • Intuition: enclave-side reset behavior.
  • Typical use: model abrupt resets as part of victim program family.
  • Intuition: model a branch-like divergence pattern that exits through the enclave exit label with side effects.
  • Typical use: compactly represent observable divergence in enclave logic.
  • Intuition: enclave-side conditional based on zero flag.
  • Typical use: represent data/control-dependent behavior with explicit branch alternatives.
  • Both branch lists must contain at least one atom. Executable branches currently support instruction atoms and rst; nested ifz, ubr, and balanced_ifz are not supported inside them.
  • Intuition: compare a “zero” branch with a cycle-balanced non-zero branch (using inserted NOPs).
  • Typical use: model timing-aware conditional behavior where branch lengths are controlled.
  • rX - register operand (X in 0..14).
  • @rX - register-indirect source.
  • &label - memory label/address form.
  • #imm - immediate value.
  • ? - secret placeholder (typically in enclave spec), replaced by --secret.

Labels and symbolic immediates may contain letters, digits, _, and -. Secret expansion is implemented for enclave actions; attacker actions should not contain an unexpanded ?.

  • prepare - establish preconditions and enter enclave (create, timers, jin).
  • enclave - victim behavior language under analysis.
  • isr - interrupt handler behavior available to attacker.
  • cleanup - post-run attacker actions/reset paths.

ALVIE/Sancus classifies execution into output categories such as jump-in/jump-out, timing observations, reset, illegal, and interrupt-handle/reti events.

You usually do not need to reason at this level while authoring specs. If you add new actions that create genuinely new event classes, see the Extending TestDL Actions guide for output/DFA updates.