Looks OK for me, too. I have only one thing to add. As I don’t know the design of Dynare 5 very well, I don’t know if it applies. But one of the common problems for users of Dynare 4 was that model parameters are regularly defined in a recursive manner before the model block. Automatic evaluation was no problem as long as the model was only solved once. Problems started when people then wanted to estimate some of the parameters, but the recursive dependence of subsequent (non-estimated) parameters was not taken into account. You had to use the #-operator inside of the model-block to circumvent this issue. But there was no way to do this outside of the model block except for the steady state file.

 

Hence, I think it should be made easier to specify dependencies like this outside of the model block. Defining a sym-operator outside of the model block seems a suitable way to achieve this.

However,

b <- sym(a) + 1;

seems like strange syntax. One wants b to be treated as a symbol, not a. Hence, implicitly defining b as a symbol by typecasting might be too complicated for non-programmers. I would prefer something along the lines of the old #-operator like:

 

sym(b) <- a + 1;

 

Best, Johannes

 

Von: dev-bounces@dynare.org [mailto:dev-bounces@dynare.org] Im Auftrag von Michel Juillard
Gesendet: Mittwoch, 18. April 2012 16:21
An: List for Dynare developers
Betreff: Re: [DynareDev] Dynare 5 Preprocessor Evaluation Rules

 

OK, by me

Michel

On 04/18/2012 04:16 PM, Sébastien Villemot wrote:

Maybe I could summarize my previous post by the following rules:
 
* everywhere except in the list of equations of a model, evaluation
  should always be triggered, except otherwise specified (with a
  sym()-like operator)
 
* in the list of equations of a model, evaluation should never be
  triggered, except otherwise specified (with an eval()-like operator)
 
And I would add a 3rd rule:
 
* when trying to evaluate a symbol, if it is not assigned, then
  trigger an error. This means that it is ok to use an unassigned
  symbol in the equations list of a model, but not outside (unless the
  sym() operator is used)
 




_______________________________________________
Dev mailing list
Dev@dynare.org
https://www.dynare.org/cgi-bin/mailman/listinfo/dev