Commit Graph

38 Commits (74ef3457b4805099ee9885b34173a0d0fd6aca61)

Author SHA1 Message Date
Sébastien Villemot 74ef3457b4
Use secure URL for link to GNU licenses 2021-06-09 17:21:00 +02:00
Sébastien Villemot c2d47fb48e
Julia: remove driver file
The Julia code now uses the JSON output for retrieving the information that
previously was in the driver file.
2021-04-19 17:02:41 +02:00
Sébastien Villemot 571ea3eb8a
SymbolTable: add some const qualifiers 2020-09-23 17:28:04 +02:00
Sébastien Villemot 8f31e443d6
SymbolTable::getTypeSpecificID() now throws an exception instead of returning -1 when symbol does not have a type-specific ID
This can potentially avoid some undetected bugs.
2020-09-23 17:09:36 +02:00
Sébastien Villemot ecf6d67e1c
PAC/MCE model: fix timing of target in PAC expectation term
Also be more strict on the form of the target (must now be X(-1) or log(X(-1))
where X is *not* an auxiliary variable).

By the way, improve some comments in SymbolTable.
2020-07-24 18:26:16 +02:00
Sébastien Villemot 4e2538a2a2
Ensure original tags and line numbers are preserved with ramsey_model
In particular, introduce a method for clearing all equations, so that tags and
line numbers are also cleared.

Ref. dynare#1685
2020-01-06 18:26:35 +01:00
Sébastien Villemot e2d5a83592
Global reindentation 2019-12-20 16:59:30 +01:00
Sébastien Villemot 031c0cff5f
Various code simplifications and modernizations 2019-12-16 19:42:59 +01:00
Sébastien Villemot d839aea08b
Drop unused functions for writing C and C++ output
These functions should have been deleted in
946d105c04.
2019-10-24 10:54:46 +02:00
Sébastien Villemot 1907249fac
Ask GCC to warn about C-style casts (-Wold-style-cast)
Adapt the code accordingly.
2019-04-23 12:54:11 +02:00
Sébastien Villemot b73d554ad2
Use Unicode copyright symbol (in UTF-8 encoding) 2019-04-16 11:35:31 +02:00
Sébastien Villemot 9bc6c57a5c
Factorization: create new utility SymbolTable::getUltimateOrigSymbID() 2019-03-29 17:06:24 +01:00
Houtan Bastani 50c26f4945
further simplifications related to AR matrices 2019-03-15 14:35:57 +01:00
Houtan Bastani 20690e1664
change ordering of aux vars in enum 2019-02-22 17:15:11 +01:00
Houtan Bastani 0ea84fa9a4
pac: allow steady state growth and model consistent expectation substitution in pac equation 2019-02-18 15:11:45 +01:00
Houtan Bastani 9eaf39235e write aux_unary_op function to output 2018-10-15 12:04:53 +02:00
Sébastien Villemot 7bb5382428 Always use brace-initializer in constructors
The syntax makes clearer the distinction between a function call and an
initialization. Also, it prevents bugs due to implicit type conversions.
2018-10-04 17:19:18 +02:00
Sébastien Villemot a4aefb4c65 Mark all constructors taking a single argument as "explicit"
For a rationale, see http://www.sjbrown.co.uk/2004/05/01/always-use-explicit/
2018-10-04 17:19:18 +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 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 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 7d9cd718fc Replace more typedefs by using
Those were not automatically replaced by clang-tidy, I don’t know why…
2018-06-04 15:03:31 +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 f8cc3ae355 Port to C++11 using keyword
Performed using modernize-use-using from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-using.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 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 20bbbd46c3 Port some constructors to pass-by-value using C++11 move semantics
Performed using modernize-pass-by-value from clang-tidy.

Manual intervention was needed to fix an issue in MacroValue.hh.
Also replace std::move by move, since we import the std namespace.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-pass-by-value.html
2018-06-04 12:35:28 +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
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
Houtan Bastani f600a65c0e create aux vars for certain unary ops contained in diff operator 2018-05-29 17:00:56 +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) d7815e9e47 Fixed comments. 2018-02-27 23:41:24 +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