function simulateCBD(model: CBDModel) {
    initializeSimulation(); // clock, state
    while (not terminationCondition()) {
        initializeBigStep(); // dependency graph, schedule
        while (blocksLeft()) {
            computeBlock();
        }
        advanceTime();
    }
    finalizeSimulation();
}

... more stylized:

function simulateCBD(model: CBDModel) {
    initializeSimulation(); // clock, state
    while (not terminationCondition()) {
        initializeBigStep(); // dependency graph, schedule
        while (blocksLeft()) {
            initializeSmallStep();
            computeBlock();
            finalizeSmallStep();
        }
        finalizeBigStep(); // advance time
    }
    finalizeSimulation();
}

... even more:

function simulateCBD(model: CBDModel) {
    initializeSimulation(); // clock, state
    while (not terminationConditionSimulation()) {
        initializeBigStep(); // dependency graph, schedule
        while (not terminationConditionBigStep()) {
            initializeSmallStep();
            smallStep();
            finalizeSmallStep();
        }
        finalizeBigStep(); // advance time
    }
    finalizeSimulation();
}

function simulateFSA(model: FSAModel) {
    initializeSimulation(); // clock, state
    while (not terminationConditionSimulation()) {
        initializeBigStep(); // read event, select transition
        while (not terminationConditionBigStep()) { // while (transitionSelected()) {
            initializeSmallStep();
            smallStep();
            finalizeSmallStep();
        }
        finalizeBigStep(); // advance time
    }
    finalizeSimulation();
}

... hybrid simulation:

function simulateChildOneIteration() {
    if (not childInitialized()) {
        initializeChildSimulation();
    }
    if (terminationConditionChildSimulation()) {
        finalizeChildSimulation();
        return -1; // The simulation is finalized if the child simulation is over.
    }
    // We execute exactly one big step.
    initializeBigStep(); // dependency graph, schedule
    while (not terminationConditionBigStepChild()) {
        // SMALL STEP CHILD START
        initializeChildSmallStep();
        childSmallStep();
        finalizeChildSmallStep();
        // SMALL STEP CHILD END
    }
    finalizeChildBigStep(); // advance time (child)
    childInfluenceParent(); // state event detection
}

// continuous
// realtime [realtime_scale]
// pause
// big_step
// small_step
// breakpoint
// god_event
function simulateFSACBD(model: FSACBDModel) {
    // INITIALIZATION PARENT START
    initializeParentSimulation(); // clock, state
    // INITIALIZATION PARENT END
    while (not terminationConditionParentSimulation()) {
        // BIG STEP PARENT START
        initializeParentBigStep(); // read event (possibly), select transition
        if (childDetected()) {
            // BIG STEP CHILD START
            if (simulateChildOneIteration() == -1) {
                break;
            }
            // BIG STEP CHILD END
        }
        while (not terminationConditionParentBigStep()) { // while (transitionSelected()) {
            // SMALL STEP PARENT START
            initializeParentSmallStep();
            parentSmallStep();
            if (childDetected()) {
                // BIG STEP CHILD START
                if (simulateChildOneIteration() == -1) {
                    break;
                }
                // BIG STEP CHILD END
            }
            finalizeParentSmallStep(); // read event (possibly), select transition
            // SMALL STEP PARENT END
        }
        finalizeParentBigStep(); // advance time (parent)
        // BIG STEP PARENT END
        // PAUSE, BREAKPOINT
    }
    finalizeParentSimulation();
}