Skip to content
Snippets Groups Projects
  • Marvin Häuser's avatar
    50a40483
    simulator: add failsafe for stochastic guards · 50a40483
    Marvin Häuser authored
    Stochastic guards are supposed to be generated in a way that the if
    branches are disjoint and exhaustive. Compilers have trouble verifying
    the latter property, as they usually do not pick up postconditions on
    return value of myrand(0, 99).
    
    To silence warnings regarded control paths that do not return a value,
    and to add hardening against code generation bugs that actually violate
    exhaustion of the if branches, assert() and abort() at the end of such
    functions.
    50a40483
    History
    simulator: add failsafe for stochastic guards
    Marvin Häuser authored
    Stochastic guards are supposed to be generated in a way that the if
    branches are disjoint and exhaustive. Compilers have trouble verifying
    the latter property, as they usually do not pick up postconditions on
    return value of myrand(0, 99).
    
    To silence warnings regarded control paths that do not return a value,
    and to add hardening against code generation bugs that actually violate
    exhaustion of the if branches, assert() and abort() at the end of such
    functions.