
# Reactis Simulator

```{epigraph}
Reactis simulator extends traditional debugging with advanced
error-detection and testing.
```

Reactis Simulator provides an environment in which program execution can be
carefully controlled and monitored. Simulator's basic features are similar
to traditional source-level debuggers: you can single-step through
individual source statements, set breakpoints, and display data values.

```{figure} images/simulator-hover-info.png
---
width: 60%
name: simulator-hover-info-fig
---
Coverage metrics and a C macro expansion displayed during a Simulator session.
```

However, Simulator also has a number of unique features which make it more
powerful than a traditional debugger.

Runtime error detection. 
: Simulator instantly detects a host of runtime errors, including memory
errors, uninitialized variable accesses, and integer overflows. When a
runtime error occurs, execution is interrupted, unlike most C environments,
in which execution proceeds using a corrupted data value. This is discussed
in more detail in [Finding and Fixing Runtime Errors](runtime-errors.md).

Test replay. 
: Simulator provides the ability to replay tests, so that any point in the
execution sequence leading to an error can be examined. Execution can be
reversed to the beginning of a step at any point, making it is easy to go
back and check the value of a variable at an earlier point in time.

Graphical display of coverage metrics. 

: Simulator highlights source code according to coverage status, so that
uncovered statements, conditions, decisions and MC/DC targets can be
quickly found and uncovered code regions visualized. In {numref}`Figure
{number}<simulator-hover-info-fig>`, code containing uncovered targets is
displayed in red. A thin red overline indicates a decision which has never
been true, and a thin red underline indicates a decision which has never
evaluated to false. Similarly, a thick red overline indicates a condition
which has never been true, and a thick red underline indicates a condition
which has never evaluated to false.

Macro expansion visualization. 
: Simulator provides the ability to view C preprocessor macro-expansions
while browsing the source code. When a macro is hovered over with the
mouse, its expansion is displayed. In {numref}`Figure
{number}<simulator-hover-info-fig>`, the user is hovering on
M_NOTINIT, which is a macro whose expansion is 0 (a single character
string).

Test suite tuning. 
: Simulator gives you the capability to fine tune automatically-generated
test suites. Additional tests can be added, and existing tests can be
modified or extended with additional steps.