Commit Graph

32 Commits (a4aefb4c65a9735ecd4a81dd61e137287589cab5)

Author SHA1 Message Date
Houtan Bastani 8acee8fd54 fix AR and EC matrices for double diff 2018-09-11 16:56:05 +02:00
Houtan Bastani 46709ada3f output AR matrix in file for trend component models 2018-09-10 14:51:33 +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
Houtan Bastani fde836d7fe trend_component_model: find trend_vars associated with equation 2018-08-31 14:24:44 +02:00
Sébastien Villemot 7280c92642 Use variant semantic values in the Bison parser
We can therefore manipulate objects by value rather than by pointers, which
saves a lot of memory manipulations (and avoid potential segfaults and memory
leaks).

Note that there is no default action ("$$ = $1") when using the variant type,
so we add them explicitly.
2018-07-31 11:48:08 +02:00
Sébastien Villemot 97868cbd2a Remove unneeded enum keyword 2018-07-18 17:28:26 +02:00
Sébastien Villemot d6055c1407 C++11: convert SymbolType to a class enum 2018-07-17 18:55:26 +02:00
Sébastien Villemot c12088f314 C++11: convert AuxVarType to class enum 2018-07-17 17:38:26 +02:00
Houtan Bastani 84c2dc5f36 transform_unary_ops now introduces aux variables/equations for all unary ops specified by UnaryOpNode::createAuxVarForUnaryOpNode()
In the absence of this option, if a var_model statement(s) is present, then aux vars/eqs are created for the same types of unary operators but only for equations specified in the var_model statement

In the absence of both this option and var_model statements, no unary op auxiliary variables are created

diffs continue to be substituted everywhere; for the moment auxiliary variables are created for diffs of expressions. A forthcoming change will allow auxiliary variables created for diffs of expressions to be linked with their lagged expressions as is currently the case for diffs of variables
2018-06-07 17:16:12 +02:00
Sébastien Villemot 182c53273e Remove useless spaces in type qualifiers
In C++11, it is no longer necessary to put a space between two consecutive ">".
2018-06-04 15:03:31 +02:00
Sébastien Villemot 1e56c73377 Port to C++11 nullptr keyword
Performed using modernize-use-nullptr from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2018-06-04 15:03:31 +02:00
Sébastien Villemot e73ebc7033 Port to C++11 noexcept keyword
Performed using modernize-use-noexcept from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-noexcept.html
2018-06-04 15:03:31 +02:00
Sébastien Villemot 64eb494298 Port to C++11 syntax for default constructors
Performed using modernize-use-equals-default from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-equals-default.html
2018-06-04 15:03:31 +02:00
Sébastien Villemot 33b1359905 Port to C++11 emplace_back() method on containers
Performed using modernize-use-emplace from clang-tidy.

Manual intervention was needed to transform a NULL into nullptr in SymbolTable.cc.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-emplace.html
2018-06-04 15:03:31 +02:00
Sébastien Villemot a185ecf752 Port to C++11 default members initializers
Performed using modernize-use-default-member-init from clang-tidy.

Manual intervention was needed to remove spurious remaining commas.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-default-member-init.html
2018-06-04 15:03:31 +02:00
Sébastien Villemot c0ed97d247 Port to C++11 auto keyword
Performed using modernize-use-auto from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-auto.html
2018-06-04 15:03:26 +02:00
Sébastien Villemot 6cf4e6dc0c Port to C++11 range-based for loops
Performed using modernize-loop-convert from clang-tidy.

Manual intervention was needed in MacroValue.cc because of a variable name
capture issue.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-loop-convert.html
2018-06-04 12:26:16 +02:00
Sébastien Villemot 28582c4a4b Merge branch 'temporary_terms_array' 2018-06-04 11:40:49 +02:00
Houtan Bastani 9166cda225 remove code that is no longer used in creation of auxiliary variables for diff operator 2018-05-31 18:44:06 +02:00
Sébastien Villemot 59e427cf66 Merge branch 'master' into temporary_terms_array 2018-05-30 17:20:48 +02:00
Houtan Bastani e532ed9bab fix typo 2018-05-30 16:53:16 +02:00
Houtan Bastani 0aea4f0cc4 introduce dynare command transform_unary_ops to create auxiliary variables for certain unary ops. This will be used for VARs and VECMs but can also be used for OLS, for example 2018-05-30 16:48:08 +02:00
Houtan Bastani 856f6f508a Revert "create aux vars for certain unary ops contained in diff operator"
This reverts commit f600a65c0e.
2018-05-30 15:50:42 +02:00
Sébastien Villemot 0b617ceb4b Merge branch 'master' into temporary_terms_array 2018-05-29 17:25:11 +02:00
Houtan Bastani f600a65c0e create aux vars for certain unary ops contained in diff operator 2018-05-29 17:00:56 +02:00
Houtan Bastani 732a317030 Merge branch 'master' into temporary_terms_array 2018-05-18 16:40:12 +02:00
Houtan Bastani 3a71215ae1 pac: change auxiliary variable creation, fix VAR max lag 2018-05-15 14:42:36 +02:00
Stéphane Adjemian(Charybdis) 38fc19f9d3 Fixed type issue. NaN cannot be used if Int is expected. 2018-04-11 09:17:43 +00:00
Stéphane Adjemian(Charybdis) c4ae840b20 Added {endo,exo,exo_det,param}_nbr in Julia output (in model_). 2018-03-27 14:47:51 +02:00
Houtan Bastani f56ae705a4 fix bug in symb_id when diff'd expr is not a VariableNode 2018-03-02 15:22:54 +01:00
Houtan Bastani a1437ac982 Merge remote-tracking branch 'dynare-preprocessor-github/master' into other-master 2018-02-26 12:09:58 +01:00
Houtan Bastani b504f160ca move files to src directory 2018-02-15 11:48:04 +01:00