Quick guide: Debugging algorithms in the GUI
The DebugEngine has been added to help the algorithm designed in understanding the inner workings of HeuristicLab. From the "Engine" tab in an algorithm the usual SequentialEngine can be replaced with the DebugEngine, which is slower but provides much more information during the runtime of an algorithm.
HeuristicLab Execution Model
The basis of execution is the execution stack, which is simply a stack of operations that should be executed. It can also contains operation collections that have to be expanded before they can be executed. For every step, the engine pops the next operation from the stack. If it is a collection it is expanded and all contained operations are put back on the stack. If it is an atomic operation it is executed.
Operators are executed in an execution context. When putting new operations on the stack every operator can decide whether to create a new execution context or execute its child operations in the same execution context. The execution context contains several pieces of information: The current scope, a link to the parent execution context and a list of parameters.
The scope is a hierarchical data structure that contains arbitrary variables and can also contain sub-scopes. Different parameter types, have different priorities when looking for variables in the scope or in execution contexts.
The DebugEngine shows the current execution stack on the left. Information about the operation that is about to be executed is shown in the center. It contains the name of the operation, the hierarchy of execution contexts, a list of the operators parameters and its actual values. The full (global) scope with an indication of where the operations execution context references the scope (hightlighted in red in the scope tree) and an "operator trace" that shows which operators have produced this operation, either through a successor relationship, through selected sup-operator or the initial operator of an internal operator graph in a combined operator.