The Tangram-II modeler can restrict the parsing of a given portion of code using the compilation directives SIMULATION and CHAIN_GENERATION. Using that, the user can create an hybrid model, where some of its parts are executed according to the compilation context.
To define a portion of code which will be parsed and executed only when the model is simulated, the modeler should write:
(...) #ifdef SIMULATION /* Simulation code here */ #endif (...)
The usage of the directive CHAIN_GENERATION is analog. Note that any portion of code can be involved by the ifdef environment, from a simple statement to a set of events.