Mercurial > hg > Members > kono > Proof > automaton
view a13/smv/test5.smv @ 382:9fba498b0a7a
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 24 Jul 2023 19:01:09 +0900 |
parents | 0e8a0e50ed26 |
children |
line wrap: on
line source
MODULE main VAR semaphore : boolean; proc1 : process user(semaphore); proc2 : process user(semaphore); ASSIGN init(semaphore) := FALSE; MODULE user(semaphore) VAR state : {idle, entering, critical, exiting}; ASSIGN init(state) := idle; next(state) := case state = idle : {idle, entering}; state = entering & !semaphore : critical; state = critical state = exiting TRUE esac; next(semaphore) := case state = entering : TRUE; state = exiting : FALSE; TRUE : semaphore; esac; FAIRNESS running