[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlaplus] Using TLA VARIABLES in PlusCal algorithm



Hi Carl and Hillel,

Indeed implicit substitution combined with the use of define works wonderfully.  Thanks for the help!

---- Module Tester ----
EXTENDS
Whatever
CONSTANTS
Things

(*--algorithm maketest

variables
  A = {}, B = {}; \* A and B implicitly substitute same-named variables from Core module.

define
  TestCore == INSTANCE Core   \* Instantiate Core within PlusCal context.
end define;

\* A and B can now be used in rest of PlusCal algorithm.
\* Other operators from Core can be used with TestCore!OperatorName .

end algorithm; *)
\* BEGIN TRANSLATION
\* ...
====

--
You received this message because you are subscribed to the Google Groups "tlaplus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+unsubscribe@xxxxxxxxxxxxxxxx.
To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/623b0192-0b94-48c3-9951-12bd1315e593%40googlegroups.com.