CSP に関する私の非常に限定的な理解は、CSP 演算子が次の Haskell 型に対応するということです。
-- Prefixing corresponds to functions
x :: A
P :: B
x -> P :: A -> C
-- Choice corresponds to product
P :: A
Q :: B
P □ Q :: (A, B)
-- Non-determinism corresponds to sum
-- I don't know how to make the non-determinism symbol, so I use (△)
P :: A
Q :: B
(P △ B) :: Either A B
次に、代数的同型を使用して CSP 式を削減できます。ウィキペディアの例を使用します。
(coin -> STOP) □ (card -> STOP)
-- translates to the following Haskell type:
(coin -> Stop, card Stop)
-- which is algebraically isomorphic to:
(Either coin card -> Stop)
-- translates in reverse back to CSP:
coin □ card -> STOP
また、ウィキペディアの例の 1 つが間違っていると思います (または、私が間違っています)。この式は次のように縮小する必要があると思います。
(a -> a -> STOP) □ (a -> b -> STOP)
-- translates to the following Haskell type:
(a -> a -> STOP, a -> b -> STOP)
-- which is algebraically isomorphic to:
a -> Either a b -> STOP
-- translates in reverse back to CSP:
a -> (a △ b) -> STOP
ただし、インターフェイスの並列に相当するものはまだわかりません。エレガントなコンセプトに対応していないようです。