Skip to content

Imperative code

Victor Mataré edited this page Dec 16, 2019 · 7 revisions

All imperative code is made up of individual instructions. An instruction is a language element that does not have a truth value or evaluates to anything. It is either possible to execute or not, and once it has started executing, it can fail.

Many control flow instructions that are known from classical programming languages are also supported by golog++. Here, these are called deterministic instructions. In addition, golog++ also supports nondeterministic instructions, which are mainly useful during planning.

If an impossible instruction is encountered during online execution, the program will block at that point. Execution may continue in another parallel branch if there is one, or, if there is nothing else to do, golog++ will block at that point and wait for exogenous events.

If an impossible instruction is encountered during offline planning, the search will backtrack up to the last nondeterminism and choose a different alternative there until all possibilities have been exhausted.

Clone this wiki locally