mutexBad :: Config ()
mutexBad = Config
        {
          cTypes  = [mPid (pvar "x"), mTT, mRelease (pvar "x")]
        , cSets   = []
        , cUnfold = [Conc (S "ps") 1]
        , cProcs  = [mutexMaster, mutexPs]
        }
  where
    mutexMaster  = (tpid0, mutexMasterS)
    mutexPs      = (tpid2, mutexPS)
    -- Master Process
    mutexMasterS :: Stmt ()
    mutexMasterS = Loop (LV "X")
                   (Recv [(mPid (pvar "x"),
                                 Send (pvar "x") [(mTT, Skip ())] ())] ()) ()
    -- Slave Processes
    mutexPS :: Stmt ()
    mutexPS = Send tpid0 [(mPid tpid2, Recv [(mTT, Skip ())] ())] ()

---
mutexBad :: Config ()
mutexBad = Config
        {
          cTypes  = [mPid (pvar "x"), mTT, mRelease (pvar "x")]
        , cSets   = []
        , cUnfold = [Conc (S "ps") 1]
        , cProcs  = [mutexMaster, mutexPs]
        }
  where
    mutexMaster  = (tpid0, mutexMasterS)
    mutexPs      = (tpid2, mutexPS)
    -- Master Process
    mutexMasterS :: Stmt ()
    mutexMasterS = Loop (LV "X")
                   (Recv [(mPid (pvar "x"),
                                 Send (pvar "x") [(mTT, Skip ())] ())] ()) ()
    -- Slave Processes
    mutexPS :: Stmt ()
    mutexPS = Send tpid0 [(mPid tpid2, Recv [(mTT, Skip ())] ())] ()

---
mutexBad = Config
        {
          cTypes  = [mPid (pvar "x"), mTT, mRelease (pvar "x")]
        , cSets   = []
        , cUnfold = [Conc (S "ps") 1]
        , cProcs  = [mutexMaster, mutexPs]
        }
  where
    mutexMaster  = (tpid0, mutexMasterS)
    mutexPs      = (tpid2, mutexPS)
    -- Master Process
    mutexMasterS :: Stmt ()
    mutexMasterS = Loop (LV "X")
                   (Recv [(mPid (pvar "x"),
                                 Send (pvar "x") [(mTT, Skip ())] ())] ()) ()
    -- Slave Processes
    mutexPS :: Stmt ()
    mutexPS = Send tpid0 [(mPid tpid2, Recv [(mTT, Skip ())] ())] ()

---