Safe Haskell | Safe |
---|
PlayerInterface
Description
This trusted module implements player interfaces, which are secure against each other. Each player interface creates its own player (see Player). Player interfaces communicate using the mechanism of PlayerInterfaceMsg.
Documentation
playerInterface :: Handle -> (PIMsg -> DC ()) -> DC PIMsg -> Bool -> DCPriv -> DC ()
returns a playerInterface
clnt send recv goFirst privDC
action that, when run, starts a player interface.
- The current state must have label
dcPublic
and clearance
.cFalse
%%cTrue
-
clnt
is the handle used for communicating with the player's client side; its label must bedcPublic
. -
send
andrecv
are used for communicating with the opponent player interface; they must work when the current label and clearance aredcPublic
and clearance
, and must not affect the current label or clearance.cFalse
%%cTrue
-
goFirst
isTrue
iff the player interface is supposed to take the first (3rd, 5th, etc.) turn. -
istoCNF
priv
, iftoCNF
$principal
"player1"goFirst
, and is
, otherwise.toCNF
$principal
"player2"
As the DC
action is run, the current label and clearance will be
maintained at dcPublic
and
, respectively.
cFalse
%% cTrue