main content

debug property proving violations by using model slicer -凯发k8网页登录

this example shows how to debug property proving violations by using model slicer. consider the model sldvdemo_cruise_control_verification. this model contains an assertion block.

the verification subsystem safety properties models a property that should hold true for the design model. this subsystem contains an assertion block (brakeassertion) that verifies the property. simulink design verifier property proving analysis will try to falsify the assertion. if simulink design verifier is successful it will generate a counterexample falsifying the assertion. we can use model slicer to debug this falsified assertion.

1. open model sldvdemo_cruise_control_verification.

open_system ('sldvdemo_cruise_control_verification')

2. open simulink design verifier by clicking on apps > design verifier.

3. click prove properties. simulink design verifier analyses the model and displays the results in results summary window.

the model highlights the subsystem where the assertion block is located.

4. open safety properties subsystem and select the falsified assertion block.

5. click debug using slicer from the toolstrip menu to debug the violation using model slicer. alternatively, you can click debug in the results inspector window.

on clicking either of the entry points the following setup is done on the model:

a. the assertion block is added as a starting point for model slicer.

b. the model is highlighted with the counterexample generated by simulink design verifier analysis.

c. the design model is simulated and paused at the time-step of assertion failure.

6. debug and analyze the model by using the step back and step forward buttons, and inspecting the port labels.

  • the assert block tests if the output of a implies b (a==>b) is false.

  • a is true when the brake input in is true for three consecutive time steps.

  • b is true when the throttle_out <= 0

you can notice that the simulation is stopped at t=0.04 when the condition a==>b is false. this can be observed from the port labels.

a. on the simulation tab, click the step back to see the port labels of all the blocks at t = (t-0.1).

you can notice that the port label of a is false till t=0.04, when it becomes true. at this point the port label of b is false (throttle_out > 0). the property is falsified because throttle_out is greater than 0.

b. to view the blocks that results in the failure, open the design model > controller. the dependent blocks and path are highlighted.

to view the fix, open sldvdemo_cruise_control_verification model and the click the open fixed model button on the canvas.

网站地图