Commit Graph

3535 Commits (master)

Author SHA1 Message Date
Sébastien Villemot e32025a76f
Bump major version number 2023-12-21 15:57:59 +01:00
Sébastien Villemot 5fa91a08f6
CI: bump MSYS2 Boost dependency 2023-12-21 11:14:45 +01:00
Sébastien Villemot 520876560d
New matched_irfs and matched_irfs_weights blocks
Closes: #124
2023-12-19 16:10:19 +01:00
Sébastien Villemot f8b2de715c
Drop unused options_.minimal_workspace 2023-12-18 16:24:22 +01:00
Sébastien Villemot 638c49d96e Merge branch 'EP' into 'master'
Remove globals from extended path

See merge request Dynare/preprocessor!99
2023-12-18 10:47:51 +00:00
Sébastien Villemot b6875ebb9d Merge branch 'mj_steadystatemodel' into 'master'
Add steady_state_model_present field to modfile.json

See merge request Dynare/preprocessor!100
2023-12-18 09:57:06 +00:00
MichelJuillard c96d96cfb3 Add steady_state_model_present field to modfile.json 2023-12-18 09:57:06 +00:00
Johannes Pfeifer 1cfce804a6 Perfect foresight: remove globals 2023-12-15 22:24:07 +01:00
Johannes Pfeifer 5a2c099871 EP: output results explicitly as opposed to assignin-statement 2023-12-14 19:53:07 +01:00
Sébastien Villemot 0f397f40af
Rename “dynare_sensitivity” command to “sensitivity”
The old name is still accepted, but will trigger a deprecation warning.
2023-12-14 18:37:10 +01:00
Sébastien Villemot 8d0e8cca5c
Merge branch 'gsa_namespace' of git.dynare.org:JohannesPfeifer/preprocessor
Ref. !96
2023-12-14 18:27:19 +01:00
Sébastien Villemot ba3ab3a234
Merge branch 'sylvester' of git.dynare.org:JohannesPfeifer/preprocessor
Ref. !97
2023-12-14 17:59:54 +01:00
Sébastien Villemot 3dadac8f19
Merge branch 'cond_forecast' of git.dynare.org:JohannesPfeifer/preprocessor
Ref. !98
2023-12-14 17:34:27 +01:00
Sébastien Villemot cf45c77343
Bytecode: simplify various instruction classes 2023-12-14 17:07:06 +01:00
Sébastien Villemot f55019c41e
Bytecode: rename several classes and class members, for consistency and clarity 2023-12-14 16:17:22 +01:00
Sébastien Villemot 22709f8225
Move bytecode stuff into a dedicated namespace, for better code separation 2023-12-14 15:48:22 +01:00
Johannes Pfeifer 1734491b76 conditional_forecast: remove global variables and move to namespace 2023-12-14 11:42:41 +01:00
Johannes Pfeifer cf1c11676b Remove obsolete Sylvester options
dr_block has been removed
2023-12-14 11:36:59 +01:00
Johannes Pfeifer 090945d8a8 Use namespace for identification and sensitivity 2023-12-13 17:51:49 +01:00
Sébastien Villemot 1c10a3acbf
Enable performance-* checks in clang-tidy 2023-12-13 16:30:40 +01:00
Sébastien Villemot cbfad751c8
Remove some unnecessary temporary std::string allocation
Automatically detected by clang-tidy using
performance-inefficient-string-concatenation check.

Several of the detected cases are left unattended, because the syntax is more
elegant as it is, and they are not performance-critical.
2023-12-13 16:29:46 +01:00
Sébastien Villemot b31de3d9a6
Pre-allocate std::vector instances filled from loops
Automatically detected by clang-tidy using
performance-inefficient-vector-operation check.
2023-12-13 16:19:51 +01:00
Sébastien Villemot 22675728aa
No longer call std::move on trivially-copyable types
Automatically detected by clang-tidy with performance-move-const-arg check.

Do not make the modification for Tokenizer::location type, since we have no
guarantee that the type will remain trivially-copyable in the future.
2023-12-13 15:37:07 +01:00
Sébastien Villemot 7cfe226e58
When possible, use a more efficient overload of std::string::find()
Automatically detected by clang-tidy using the performance-faster-string-find
check.
2023-12-13 14:21:11 +01:00
Sébastien Villemot d635aac04a
Turn some loop variables into const references when possible
Automatically detected by clang-tidy using performance-for-range-copy check.
2023-12-13 14:21:09 +01:00
Sébastien Villemot 3d94f1956c
Remove some unneeded object copies
Automatically detected by clang-tidy using performance-unnecessary-value-param
check.
2023-12-13 10:28:54 +01:00
Sébastien Villemot cd86b1895d
Configuration file: new default value for GlobalInitFile option
If the user did not specify the GlobalInitFile option, use global_init.m in configuration
directory if it exists.
2023-12-12 16:01:54 +01:00
Sébastien Villemot 1de83b7b12
Configuration file: simplify handling of GlobalInitFile option
There was some overengineering related to the Hook class.
2023-12-12 15:54:57 +01:00
Sébastien Villemot 328e8eef78
Change default location for configuration file
– under Linux and macOS, use the “dynare” subdirectory of the configuration
  directory specified by the XDG specification
– under Windows, use the “dynare” subdirectory of the Application Data folder

The old location is kept for backward compatibility, with a warning.
2023-12-12 12:28:33 +01:00
Sébastien Villemot 7c83b81623
Turn some configuration-related classes into nested classes 2023-12-11 17:32:30 +01:00
Sébastien Villemot 4389e5320d
Rename files, classes and variables in relation to the configuration file
In particular, makes clearer the distinction between configuration and
configuration file. The former includes information that is not in the
latter (command-line options.)
2023-12-11 17:17:57 +01:00
Sébastien Villemot 7dd125e43a
Remove duplicate definition of expr_t 2023-12-11 14:29:43 +01:00
Sébastien Villemot e4b23fecb0
Update comments in relation to implicit conversion from std::filesystem::path to std::string
There is actually no bug in MinGW. The different behaviour under Windows is
expected, because the implicit conversion there is only to std::wstring.
2023-12-08 18:39:27 +01:00
Sébastien Villemot 4790fa00d8
Remove workaround for bug in MinGW compiler
It would mishandle trailing slashes or backslashes in std::filesystem::path, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88881

The bug is now fixed in the version of MinGW in Debian “bookworm” 12.

Ref. Madysson/estimation-codes#11
2023-12-08 18:36:25 +01:00
Sébastien Villemot 378d00fc3a Merge branch 'globals' into 'master'
Remove globals from dynare_sensitivity and dynare_identification

See merge request Dynare/preprocessor!95
2023-12-07 11:03:06 +00:00
Sébastien Villemot 045fbaec0e
Remove empty line
[skip ci]
2023-12-04 17:36:20 +01:00
Sébastien Villemot bffd68e0bf
Add a clang-tidy configuration file
Also add some annotations to remove some false positives.

There remain some boost-related false positives, it’s unclear how to suppress
them.
2023-12-04 16:37:00 +01:00
Johannes Pfeifer 6d9fc367d0 Remove globals from dynare_sensitivity and dynare_identification 2023-12-04 12:01:19 +01:00
Sébastien Villemot b2e9ec205e
No longer use reserved identifiers for include guards
Automatically detected using clang-tidy with bugprone-reserved-identifier
check.

By the way, homogeneize the define identifiers in relation to camel case
convention.
2023-12-01 15:39:01 +01:00
Sébastien Villemot 5af38c8ced
ModelTree.hh: fix misplaced #endif for include guard 2023-12-01 15:35:40 +01:00
Sébastien Villemot c2d6ab8ee0
Simplify a few loops using std::ranges::reverse_view
Automatically detected using clang-tidy with modernize-loop-convert check.
2023-12-01 15:06:40 +01:00
Sébastien Villemot c5cc61b110
PlannerObjectiveStatement: turn model_tree into a std::unique_ptr
Avoids an unnecessary copy.
2023-12-01 14:59:20 +01:00
Sébastien Villemot 5e89921ea1
Use emplace() and emplace_back() at several places
Automatically detected using clang-tidy with modernize-use-emplace check.
2023-12-01 14:30:03 +01:00
Sébastien Villemot b8c521be31
Mark SymbolTable::maxID() as const and nodiscard 2023-12-01 14:17:12 +01:00
Sébastien Villemot 7e6abc97c4
Add [[nodiscard]] attribute to various functions
Automatically detected using clang-tidy with modernize-use-nodiscard check.
2023-12-01 14:14:44 +01:00
Sébastien Villemot 5332c12ab7
Remove unused constructor and data member 2023-12-01 12:09:59 +01:00
Sébastien Villemot 0295c389a2
CI: add job that checks formatting with clang-format 2023-11-30 16:37:35 +01:00
Sébastien Villemot b6adff7de7
Manually reformat Flex and Bison files to be closer to clang-format style 2023-11-30 16:21:34 +01:00
Sébastien Villemot d463607e90
Reformat C++ source code using clang-format 15 2023-11-30 15:58:32 +01:00
Sébastien Villemot 529ec50337
clang-format configuration: set “PackConstructorInitializers: NextLine” 2023-11-30 15:28:43 +01:00