Commit Graph

2063 Commits (6c7d7f5d4458201de5617af33ac4c0676788e0fd)

Author SHA1 Message Date
Houtan Bastani 6c7d7f5d44 don’t create file if trend_component_model/var_model statement not present 2018-09-25 12:18:52 +02:00
Sébastien Villemot 913bc2f8c2 Macro-processor, comprehension: fix error message, add comments 2018-09-24 18:17:28 +02:00
Sébastien Villemot 3e5c8dd80d Macro-processor: implement comprehensions
Due to a limitation of the current implementation, this breaks syntaxes like
[ (i,j) ] (but not [ (2,j) ]; the problem only occurs when an array is
constructed by specifying as first element a tuple whose first element is a
variable name). Solving this problem requires an overhaul of the
macro-processor, with construction of ASTs at parsing time, and evaluation
later on (instead of doing on-the-fly evaluation).

Ref #5
2018-09-24 18:00:59 +02:00
Sébastien Villemot 7a5cc7e54b Minor fixes to comments 2018-09-18 19:12:25 +02:00
Houtan Bastani c9f5cef99b write AST in JSON 2018-09-18 17:48:04 +02:00
Houtan Bastani 8ec06dddc4 fix typo and remove unnecessary braces 2018-09-18 17:31:51 +02:00
Houtan Bastani 9f9c8fdfbf fix typo 2018-09-18 14:50:54 +02:00
Houtan Bastani 85dbb649b7 move trend_component_table and var_model_table to DynamicModel as they are only used there 2018-09-14 17:04:06 +02:00
Houtan Bastani eb74d48393 trend_component_model: replace `trends` option with `targets` 2018-09-13 12:21:23 +02:00
Houtan Bastani dfb0629c25 fix typo 2018-09-12 18:21:34 +02:00
Houtan Bastani dc9ecbb49a fix bug in columns of EC matrix 2018-09-12 17:56:30 +02:00
Houtan Bastani 0376f7f173 fix bugs in creation of AR/EC matrices 2018-09-12 11:57:14 +02:00
Houtan Bastani aa120abd02 simplify code 2018-09-12 11:57:14 +02:00
Sébastien Villemot a95cf8118c CI: put the build job in the build stage 2018-09-11 21:00:54 +02:00
Sébastien Villemot a8cd7a3346 Parallelize CI build 2018-09-11 19:09:53 +02:00
Sébastien Villemot 26c3926a2b Basic CI 2018-09-11 19:03:07 +02:00
Houtan Bastani 8acee8fd54 fix AR and EC matrices for double diff 2018-09-11 16:56:05 +02:00
Houtan Bastani f71c861d5e output EC matrix in file for trend component models 2018-09-10 17:44:04 +02:00
Houtan Bastani 46709ada3f output AR matrix in file for trend component models 2018-09-10 14:51:33 +02:00
Stéphane Adjemian(Charybdis) 13a0115bfb Removed travis-ci configuration file. 2018-09-10 14:49:19 +02:00
Sébastien Villemot c899314634 Update URLs for the move to GitLab 2018-09-10 12:07:08 +02:00
Houtan Bastani f1bd4c839a ignore txt files 2018-09-07 10:14:45 +02:00
Houtan Bastani f5e5dea1be support hard-coded parameters and parameter expressions in AR matrix 2018-09-07 10:14:18 +02:00
Houtan Bastani acc197f539 output AR matrix in file 2018-09-06 18:00:05 +02:00
Sébastien Villemot e19a14869e Convert ExprNodeOutputType into a class enum
Incidentally, replace the IS_* macros by inline functions.
2018-09-05 18:28:32 +02:00
Sébastien Villemot c6d4cb88c3 ExprNode and its subclasses are no longer friends of DataTree
This ensures a better isolation between the container and the containees.
2018-09-05 18:28:32 +02:00
Sébastien Villemot 004d909621 Use smart pointers for storage of ExprNode in DataTree class
- BTW, store them in a std::vector rather than std::list

- incidentally, fix issue in VariableNode::removeTrendLeadLag where expression
  sharing was possibly violated when creating a new VariableNode
2018-09-05 18:28:32 +02:00
Sébastien Villemot 5d2e1cf7b9 Use smart pointers for storage of Statement in ModFile class 2018-09-05 18:28:27 +02:00
Houtan Bastani 9f0c30740e introduce epilogue block 2018-09-05 12:31:49 +02:00
Sébastien Villemot e3550a8fc0 Various fixes in comments 2018-09-04 17:28:47 +02:00
Sébastien Villemot 3fd6858fb8 Macroprocessor: fix priority of operators
- == and != have now lower priority than <= < >= >, for consistency with the
  Dynare modelling language (and incidentally C and C++, but not Julia).

- ^ has now higher priority and no associativity, for consistency with the
  Dynare modelling language (and usual arithmetic notation).

- & has now higher priority than |, and both have lower priority than + and -,
  but higher than inequality comparators. This is not the same as C and C++ (in
  which & and | are just above && and ||), but this allows for expressions such
  as "a|b == c" to have their most natural semantics (i.e. this will compare
  the union of a and b with c; the C/C++ priority level would have resulted in
  a type error).

Ref #5.
2018-09-04 17:09:11 +02:00
Sébastien Villemot 4624a3104d Macroprocessor: implement power operator for integers
For consistency with the power operator for sets (see #5).
2018-09-04 16:28:38 +02:00
Stéphane Adjemian(Charybdis) a35c1785a8 Cosmetic change. 2018-09-04 12:08:05 +02:00
Houtan Bastani 49d8931fc0 fix typo in 8584323563 2018-09-04 10:45:39 +02:00
Houtan Bastani 8584323563 provide information on order of ec.vars 2018-09-04 10:39:05 +02:00
Houtan Bastani d89d6cc685 bug fix: close opened steady state file 2018-09-04 09:41:12 +02:00
Houtan Bastani 27c9a9a5e0 store LHS of trend equation in trend_vars 2018-09-03 17:25:42 +02:00
Houtan Bastani 7a438a3ce7 ensure that trend_variable found is actually a trend variable as declared in the trend_component_model statement 2018-09-03 15:05:30 +02:00
Houtan Bastani fde836d7fe trend_component_model: find trend_vars associated with equation 2018-08-31 14:24:44 +02:00
Houtan Bastani 52da3ecfa7 fix bug: missing initialization for lexer context variable 2018-08-29 18:02:12 +02:00
Houtan Bastani 95da532275 remove incorrect option as `unput` is used in flex file 2018-08-29 12:55:17 +02:00
Houtan Bastani 948e8cb6e4 fix bug in creation of ec vars for pac equation 2018-08-28 16:00:25 +02:00
Houtan Bastani 9e6bdc2334 Revert "fix bug in collection of ec vars of pac equation"
This reverts commit 74dd6a69e9.
2018-08-28 13:32:48 +02:00
Houtan Bastani 74dd6a69e9 fix bug in collection of ec vars of pac equation 2018-08-27 16:41:39 +02:00
Houtan Bastani 1ae729929b fix bug when var_expectation_model uses trend_component_model as auxiliary model 2018-08-27 14:51:54 +02:00
Houtan Bastani d5d6e8beb0 simplify updating of RHS variables for trend component and var models 2018-08-23 13:57:27 +02:00
Houtan Bastani 16f10d954f don’t rely on scope: clean up iterator names 2018-08-23 13:03:52 +02:00
Houtan Bastani 97af0ff711 fix bug in updating variables in var model table 2018-08-23 10:28:19 +02:00
Houtan Bastani 0c66e724cb fix typo 2018-08-22 17:09:16 +02:00
Houtan Bastani 54df07d0e0 remove unnecessary comment 2018-08-22 17:01:03 +02:00