0

对于我的任务,我需要为电子邮件服务器和客户端开发 FSP 模型。我设法编写了一个简单的模型来描述一个用户、服务器和他的邮箱,但是我在将这个系统更改为一个有两个用户和两个独立邮箱的系统时遇到了问题。

我开发的FSP模型:

USER = (read->USER | write->USER).
SERVER = (read->get->SERVER | write->put->SERVER).
MAILBOX(N=0) = MAILBOX[N],
MAILBOX[i:0..3] = (when (i<3) write->put->MAILBOX[i+1]
 | when (i>0) read->get->MAILBOX[i-1]).
||EMAIL = (USER || SERVER || MAILBOX).
4

1 回答 1

0

如果你试试这个怎么样:

USERX = (read->USERX | write->USERX).
USERY = (read->USERY | write->USERY).


MAILBOX(N=3) = X[N],
X[i:0..N] = (when (i<3) write->put->X[i+1] 
| when (i>0) read->get->X[i-1]).

MAILBOX1(N=3) = Y[N],
Y[j:0..N] = (when (j<3) write->put->Y[j+1] 
| when (j>0) read->get->Y[j-1]).



SERVER = (read->get->SERVER | write->put->SERVER).

||EMAIL = (USERX || USERY || SERVER || MAILBOX ||  MAILBOX1).
于 2009-11-29T15:16:22.647 回答