[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tlaplus] Translate PlusCal Algorithm menu item doesn't work in TLA+1.5.7 on MacOSX 10.13.6
On 03.11.18 11:37, Philippe de Rochambeau wrote:
> Here it is.
> -------------------------------- MODULE wire
> --------------------------------
>
> EXTENDS Integers
> (*-- algorithm wire
> variables
> Â Â Â people = {"alice", bob"},
> Â Â Â -- acc is a function; i.e., set comprehension
> Â Â Â acc = [p \in people |-> 5],
> Â Â Â sender = "alice",
> Â Â Â receiver = "bob",
> Â Â Â amount = 3;
> Â Â Â
> define
> Â Â Â NoOverdrafts = \A p \in people: acc[p] >= 0
> end define;
> Â Â Â
> begin
> Â Â Â Withdraw:
> Â Â Â Â Â Â Â acc[sender] := acc[sender] - amount;
> Â Â Â Deposit:
> Â Â Â Â Â Â Â acc[receiver] := acc[receiver] + amount;
> Â Â Â Â Â Â Â
> end algorithm;*)
Hi Philippe,
just remove the erroneous white space from "-- algorithm". The Toolbox
will then provide proper syntax highlighting and the PlusCal to TLA+
translation will also work.
Cheers
Markus