Skip to content

SpecificationI · Overview

1.3

Analysing, running and observing

The engine does three different jobs with a program: analysing it without running it, running it, and letting you observe what happens inside.

Markdown version

1.3.1 How it works

Analysing means reading the program without running it. The editor does it every time you type: it colours the words, points out errors and offers help. Analysing never changes anything or writes to the output.

Running means really going through the instructions. The result is the output, the way the program ended and, if something failed, the runtime diagnostic.

Observing means running while leaving a trail. The engine records every important event (entering a statement, taking a decision, writing something) and keeps the state of memory. With that trail the editor draws the run step by step.

Figure 1.3-1.Three jobs with the same program. Each produces something different; only running and observing go through the instructions.

A program with three arrows leaving it towards Analyse, Run and Observe. Below each one, what it produces: diagnostics, colours and help; output, termination and failures; trace, memory and timeline. A green line joins Run and Observe because both go through the instructions.

This program analyses without errors, runs and leaves a trace with one decision:

ProgramEven or odd?

Algorithm Paridad
  Define numero As Integer <- 14;
  If numero Mod 2 = 0 Then
    Write numero, " es par";
  Else
    Write numero, " es impar";
  EndIf
EndAlgorithm

Output

14 es par

The program finishes normally.

In short

  • Analysing: reading without running; produces colours, errors and help.
  • Running: going through the instructions; produces output and termination.
  • Observing: running while leaving a trace and memory states.