Hello, the standard way to check such properties is to express them as a state machine and then verify that your system specification refines that state machine. For your example, we could create the following module -------------------------- MODULE NoCashBeforePin -------------------------- VARIABLES pin, cash Init == /\ pin \in BOOLEAN /\ cash \in BOOLEAN /\ ~ pin => ~ cash Next == pin' = TRUE /\ cash' \in BOOLEAN Spec == Init /\ [][Next]_<<pin,cash>> ============================================================================= then add the following line to your main ATM specification Prop == INSTANCE NoCashBeforePin and use TLC to verify the temporal property Prop!Spec. Of course, you don't have to place the property state machine in a separate module, and you may tweak the way you formulate the property state machine if you find it too obscure. (The above assumes that pin entry and dispensing of cash happens only once, you may want to reset the state machine if you want to reuse the ATM. The point is to rule out that pin is set to TRUE before cash is.) Stephan
You received this message because you are subscribed to the Google Groups "tlaplus" group. To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+unsubscribe@xxxxxxxxxxxxxxxx. To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/0A477196-EAE3-4AA4-9FED-D382854684E2%40gmail.com. |