[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