WAL Programmer Manual

0.8.0

2. Waveform Handling

This section describes functions for loading and handling waveforms.
(load file id) ↦ ()
   file : string?
     id : symbol?
Loads waveform from file and registers it in the WAL kernel with id.
(unload id) ↦ ()
  id : symbol?
Removes the waveform specified by id from the WAL kernel.
(step id amount) ↦ (boolean?)
      id : symbol?
  amount : int?
Step trace id by amount. Both arguments are optional. If no id is provided all traces will be stepped by amount.
(alias name signal) ↦ ()
    name : symbol?
  signal : symbol?
Introduces an alias for signal such that it can be also referenced using name.
(unalias name) ↦ ()
    name : symbol?
Removes the alias name.
(whenever cond body+)
    cond : WAL expression
    body : WAL expression
Evaluates the body expressions on each waveform index at which cond evaluates to true. Returns the value of the last body expression evaluated at the last index at which cond evaluates to true.
(find cond) ↦ (list?)
    cond : WAL expression
Returns a list containing all indices at which cond evaluates to true.
(count cond) ↦ (list?)
    cond : WAL expression
Returns the number of indices at which cond evaluates to true.