Products & Services Solutions Academia Support User Community Company

Learn more about Simulink Design Verifier   

sldv.assume - Proof assumption

Syntax

sldv.assume(expr)

Description

sldv.assume(expr) specifies that expr be true for every evaluation while proving properties. Use any valid Boolean Embedded MATLAB expression for expr.

This function has no output and no impact on its parenting function, other than any indirect side effects of evaluating expr. If you issue this function from the MATLAB command line, the function has no effect.

Intersperse sldv.assume proof assumptions within Embedded MATLAB code or separate the assumptions into a verification script.

The Proof assumptions option in the Property proving pane applies to proof assumptions represented with the sldv.assume function, as well as with the Proof Assumption block.

Examples

Add property proof objective and proof assumption, using Embedded MATLAB expressions.

  1. Open the sldvdemo_sbr_verification model and save it as my_sldvdemo_sbr_verification.

  2. Open the Safety Properties subsystem.

  3. Remove the Assertion block. Instead of the Assertion block, this example uses sldv.prove and sldv.assume.

  4. Open the MATLAB Property Embedded MATLAB Function block.

  5. Delete ok = implies(activeCond,SeatBeltIcon).

  6. To add a proof objective and proof assumption, add these two lines to the check_reminder code.

    sldv.prove(implies(activeCond,SeatBeltIcon)
    sldv.assume(Inputs.KEY==0 | 1)
  7. In the Embedded MATLAB editor, save the updated code.

  8. Prove the safety properties: from the Safety Properties subsystem, select Tools > Design Verifier > Prove Properties.

Alternatives

Instead of using the sldv.assume function, you can insert a Proof Assumption block in your model. However, using sldv.assume instead of a Proof Assumption block offers several benefits, described in About Property Proving.

You can also constrain signal values when proving models by using Embedded MATLAB without using the sldv.assume function. However, using sldv.assume instead of directly using Embedded MATLAB eliminates the need to:

See Also

Proof Assumption | Proof Objective | sldv.condition | sldv.prove | sldv.test | Test Condition | Test Objective

Tutorials

How To

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS