In practice, for the time being, we limit ourselves to C++20 features available
in GCC 10 and clang 12 (the latter because of the Julia infrastructure).
– Indicate whether we are trying to normalize the static or dynamic model
– If failed to normalize the static model, suggest to use the “no_static”
option
– Remove a superfluous error message
The support for empty files at the macro-processor level, as implemented in
1291320053, was relying on
basic_streambuf::in_avail(), which does not seem to behave consistently across
platforms, and which may not be the right tool for the job.
Rather use the Bison grammar to support empty files.
Closes: #93
The existing check would incorrectly fail if ramsey_constraints appeared before
ramsey_{model,policy}.
Also, the check would not terminate the processing in case of error.
Closes: #91
– also use vectorized versions for .+ and .-
– add a space before vectorized operators to avoid syntactical ambiguity
This commits complements bfdcc546ec.
When an endogenous is declared with “var(log)”, say “y”:
– creates an auxiliary named “LOG_y”
– replaces “y(±l)” everywhere by “exp(LOG_y(±l))”
– adds a new auxiliary equation “y=exp(LOG_y)”
– adds a new definition “LOG_y=log(y)” in set_auxiliary_variables.m and
dynamic_set_auxiliary_series.m files
This option also works in conjunction with “deflator=…”, such as “var(log,
deflator=…)” (the “log” must appear befor “deflator”). There are no provisions
for combining “log” with “log_deflator”, because that would not make much sense
from an economic point of view (amounts to taking the log two times).
Ref. dynare#349
For symbol lists (such as those given to “var” or “stoch_simul”), return a
semantic value at the Bison level, rather than building the list through a
temporary object in ParsingDriver. This allows various simplifications, and
leads to a more functional code.
By the way, homogeneize the naming of the various flavours of symbol lists in
the Bison file (with TeX names, partitioning, or with a wildcard).
This is a more natural semantics.
Incidentally, this fixes a bug in the variable mapping (M_.mapping) where some
endogenous, appearing in a log() in a VAR or TCM, would not be mentioned (e.g.
in the var-expectations/7/example1.mod test, and many others).
By the way:
– Fix and improve the explanation of the purpose of the orig_symb_id and
orig_lead_lag fields for auxvars
– Factorize the code that prints those fields in MATLAB and JSON output
The logic was flawed in several ways. In particular, the test files
pac/trend-component-{3,10,11}/example1.mod would return A0 and A0star matrices
where the (2,2) element was incorrectly zero.
The case of a diff aux var corresponding to a complex expression was not
correctly handled, and could lead to a value -1 being returned by these
methods.