Overview
We have developed a compiler targeting BIP Execution Engines (general information about code generation from BIP models is provided here). Both the generated code and the Engines are in C++. Execution Engines are responsible for the coordination of the components, that is, they apply the semantics of the interaction and priority layers of BIP.
Execution Engines can be used for execution, simulation, debug or state-space exploration (i.e. all traces) of BIP models. The following Engines are currently available:
Single-Thread Engine
The single-thread Engine is the mostly used BIP Engine. It handles the full BIP syntax (except some of the time features of BIP that are only compatible with the real-time Engine).
The single-thread Engine is a direct implementation of the semantics of BIP. It is based on cyclic execution implemented by a single thread. Each execution cycle of the Engine is composed of computing the enabled interactions at the current state
, choosing an interaction
amongst the enabled ones, and executing the atoms involved in
which updates the state of the system into
.
The single-thread Engine provides the following useful modes for a given BIP model:
- simulation/execution mode is used for executing a single sequence of interactions of the considered BIP model. Interactions are chosen randomly when several interactions are enabled at a state.
- exploration mode is used for an exhaustive computation of the execution sequences of interactions (i.e. model-checking) of the model. It can be used for verification.
- interactive/debug mode let the user choosing at each state of the model the next interaction to be executed amongst the one that are enabled. It also allows displaying and modifying the state of the components (control location, data, etc.), which is useful for debugging BIP models.
Download
The single-thread Engine is included in the core BIP distribution for GNU/Linux x86 platforms. You can dowload it here.
Multi-Thread Engine
The multi-thread Engine uses several threads for the execution of interaction execution. The performance of the execution on multi-core platforms is thus improved by two kind of parallelism:
- Components. Components involved in an interaction can be executed in parallel. Maximal degree of parallelism is obtained when using one thread per component.
- Interactions. Under specific assumptions computed by an oracle, several interactions can also be executed in parallel. The oracle must preserve the semantics of BIP. The degree of parallelism introduced depends on the chosen oracle.
Download
The multi-thread Engine is included in the core BIP distribution for GNU/Linux x86 platforms. You can dowload it here.
Real-Time Engine
The real-time Engine is based on the single-thread Engine. It allows using time features in BIP programs (clocks, time constraints, urgency types).
The real-time Engine has the following execution modes:
- simulation, exploration and interactive modes are similar to the ones of the single-thread Engine. They assume instantaneous execution of the code.
- real-time mode is used for a real-time execution of the model using the real-time platform clock.
Examples
- Periodic tasks example (same example using ticks instead of timing constraint: here)
- Preemptive tasks example
- Temperature control application example.
Download
We provide a self-sufficient archive that contains everything needed by the BIP compiler and its runtime:
Installation instructions are similar to the installation instructions of the standard BIP compiler and runtimes.
contact: Jacques Combaz