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

Re: Pcal, procedures and tests



Hi Frederic,

   1 - Can we have a macro that returns a macro? I suppose no.

I don't understand this, because macros don't "return" anything.
Perhaps what want a macro uses another macro.  This is allowed,
as long as the macro being used precedes the macro using it.
 
   2 - In pcal the variables generated by the parameters of the
       procedures appears after the macros, it is unfortunate.

I don't understand this, because the variables I believe you are
talking about are part of the TLA+ translation, and the macros are in
the PlusCal source.

   3 - Suppose I want to develop an algorithm with pcal under toolbox .
       There are several procedures.  I want to test each procedure with a
       model before testing the main algorithm.  There is no simple way to
       have models that do that I think.  I mean we can't have a model that
       tests a procedure, another model that tests another procedure and
       eventually a model that tests the main algorithm.

I don't know of any programming language that lets you test a
procedure; they only let you test a program that calls the procedure.
If you describe how you would do what you want for procedures in a
program, perhaps we can figure out how it should be done in PlusCal.

Cheers,

Leslie