如何将ABP从promela转变为microlr?

时间:2015-03-24 11:27:32

标签: modeling promela

我已经在Promela建模语言中准备了一个ABP模型。但我需要一些帮助,用另一种建模语言 - mCRL重写它。我没有任何经验。有人可以告诉我一个开始的方法,或者指出我对mCRL的好教程吗? 无论如何,mCRL和mCRL2之间的代码是否存在差异?

我在promela的代码:

mtype = { msg, ack }
chan to_sender = [2] of { mtype, bit };
chan to_recvr  = [2] of { mtype, bit };


active proctype Sender()
{
  bit s_out=0, s_in;
  do
  :: to_recvr!msg,s_out ->
     if
     :: to_sender?ack,s_in ->
        if
        :: s_in == s_out ->
end:         s_out = !s_out
        :: else -> 
            skip
        fi
     :: timeout
     fi
  od
}

active proctype Receiver()
{ 
  bit s_in, s_exp = 0;
  do
  :: to_recvr?msg,s_in ->
       to_sender!ack,s_in;
     if
     :: s_in == s_exp ->
end:       s_exp = !s_exp
     :: else -> 
        skip
     fi
  :: to_recvr?msg,s_in -> skip
  od
}

1 个答案:

答案 0 :(得分:0)

mCRL不再受到积极支持。我认为它甚至不能与最新的GCC一起编译。 实际上,mCRL2来源中有一个ABP模型示例:https://svn.win.tue.nl/repos/MCRL2/trunk/examples/academic/abp/abp.mcrl2