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.
Reading notes
Section titled “Reading notes”- 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
- attacker sections:
Structural combinators
Section titled “Structural combinators”a; b- sequence: doathenb.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.
Attacker actions
Section titled “Attacker actions”- Intuition: force watchdog-triggered reset.
- Typical use: reset system state before/after experiments.
- Common section:
prepareorcleanup.
rst_nz
Section titled “rst_nz”- Intuition: conditional reset based on zero flag (
jzguard before reset code). - Typical use: branch-dependent restart behavior.
- Caveat: side effects depend on machine state/flags at that point.
create <ts, te, ds, de>
Section titled “create <ts, te, ds, de>”- Intuition: create/enable enclave with text/data boundaries (enclave text between addresses
[ts, te]and enclave data between addresses[ds, de]);tsis the entry label of the enclave. - Typical use: setup in
preparebefore jumping in. - Common pattern:
create ...; jin ts.
jin <label>
Section titled “jin <label>”- Intuition: jump into enclave entry label.
- Typical use: transition from setup to enclave execution.
- Usually appears once per run path in
prepare.
timer_enable <n>
Section titled “timer_enable <n>”- Intuition: configure timer interrupt after
nticks. - Typical use: model interrupt scheduling during enclave execution.
- Effect: helps generate handle/reti flows in traces.
- Accepted range: decimal
nin0..65535.
start_counting <n>
Section titled “start_counting <n>”- Intuition: start timer counting without the interrupt-enabled mode used by
timer_enable. - Typical use: finer control of timing behavior.
- Accepted range: decimal
nin0..65535.
- Intuition: return from interrupt handler.
- Typical use: terminate
isrpath and resume interrupted control flow.
ifz (<atom-list>) (<atom-list>)
Section titled “ifz (<atom-list>) (<atom-list>)”- Intuition: attacker-side branch macro based on zero flag.
- Typical use: conditional attack behavior encoded compactly.
- Caveat: currently intended for non-nested
ifzatoms. - 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.
Enclave actions
Section titled “Enclave actions”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.
ifz (<atom-list>) (<atom-list>)
Section titled “ifz (<atom-list>) (<atom-list>)”- 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; nestedifz,ubr, andbalanced_ifzare not supported inside them.
balanced_ifz (<instruction-list>)
Section titled “balanced_ifz (<instruction-list>)”- 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.
Operand intuition
Section titled “Operand intuition”rX- register operand (Xin0..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 ?.
Section intent quick map
Section titled “Section intent quick map”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.
Observable-effect intuition (high level)
Section titled “Observable-effect intuition (high level)”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.