Run #
This module provides the operational run semantics of MRiscX.
Conditional jump on one register: jump to lbl if cond holds of register
reg, otherwise advance the program counter.
Instances For
This function evaluates the given machine state to a new one.
Tt represents the nxt function from the paper
LUNDBERG, Didrik, et al. Hoare-style logic for unstructured programs. In: International Conference on Software Engineering and Formal Methods. Cham: Springer International Publishing, 2020. S. 193-213.
Generally, if the terminated of the State is false and the instruction
is legal and evaluateable, a new State is
returned holding the next instructions and the updated storage.
When the instruction is not legal (e.g. jmp s, there is no label s),
terminated is set to true.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Runs runOneStep n times.
It represents the function nxt^n from
LUNDBERG, Didrik, et al. Hoare-style logic for unstructured programs. In: International Conference on Software Engineering and Formal Methods. Cham: Springer International Publishing, 2020. S. 193-213.
Instances For
Run the machine until it terminates or fuel steps have elapsed.
Equations
- ms.runUntilTerminatedWithFuel Nat.zero = ms
- ms.runUntilTerminatedWithFuel n'.succ = if ms.terminated = true then ms else ms.runOneStep.runUntilTerminatedWithFuel n'
Instances For
The instruction the machine would execute after one more step.