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
Sébastien Villemot
6ed53ae0fc
clang-format configuration: never collapse short functions on a single line
...
[skip ci]
2023-11-29 19:17:59 +01:00
Sébastien Villemot
3e415c06b5
CI: enable FF_ENABLE_BASH_EXIT_CODE_CHECK to avoid unintuitive behaviour with && operator
2023-11-23 12:27:05 +01:00
Sébastien Villemot
73be95423d
Bump minimal required version of MATLAB to R2018b
...
Ref. dynare#1907
2023-11-22 12:06:34 +01:00
Sébastien Villemot
c4c14963a1
Add clang-format config file for formatting C++ code
2023-11-21 12:44:44 +01:00
Sébastien Villemot
46aa6610ab
model_replace, model_remove: allow selecting an equation with several (conjunct) tags
...
NB: does not (yet) works with Occbin regime-specific equations.
Ref. dynare#1890
2023-11-15 12:05:06 +01:00
Sébastien Villemot
661b16440e
Merge branch 'doc' into 'master'
...
preprocessor.tex: add slides on verbatim block and command line options
See merge request Dynare/preprocessor!94
2023-11-15 10:24:01 +00:00
Johannes Pfeifer
09a9a4e9b6
preprocessor.tex: add slides on verbatim block and command line options
2023-11-15 10:25:12 +01:00
Sébastien Villemot
1ad7dd9672
Refactor parsing of equation tags in a more functional way
...
Incidentally, makes tag names case-insensitive in “model_replace” and
“model_remove”, which is consistent with tag declarations.
2023-11-14 15:55:30 +01:00
Sébastien Villemot
ac35ef6101
Error out if an “initval” block appears after an “endval” block (without the “learnt_in=…” option)
...
Closes : #104
2023-11-14 14:28:30 +01:00
Sébastien Villemot
cffbb0f4fd
Merge branch 'doc' into 'master'
...
preprocessor.tex: further updates
See merge request Dynare/preprocessor!93
2023-11-14 13:02:15 +00:00
Johannes Pfeifer
74bb394f4c
preprocessor.tex: further updated
2023-11-14 13:06:45 +01:00
Sébastien Villemot
9caacb194b
Merge branch 'doc' into 'master'
...
preprocessor.tex: modernizations and typo corrections
See merge request Dynare/preprocessor!92
2023-11-13 17:01:50 +00:00
Johannes Pfeifer
4a2167e811
preprocessor.tex: modernizations and typo corrections
2023-11-13 17:56:53 +01:00
Sébastien Villemot
b58ab55e97
Drop obsolete and undocumented stoch_simul options: dr_algo, simul, simul_algo, simul_seed
2023-11-10 15:22:35 +01:00
Sébastien Villemot
63f04636ee
New structure M_.block_structure.block().bytecode_jacobs_cols_to_sparse
...
It maps column indices in the Jacobian returned by bytecode MEX in evaluate
mode (which only contains nonzero columns, but also incorporate recursive
variables), into column indices in the sparse representation (which has 3×n
columns for two-boundaries blocks and n columns for one-boundary blocks).
Columns unused in the sparse representation are indicated by a zero.
2023-11-07 15:32:12 +01:00
Sébastien Villemot
086d65d98c
Remove unused enum values
2023-11-07 15:32:12 +01:00
Sébastien Villemot
53987fc039
Block: more symmetry between bytecode and non-bytecode write helpers
2023-11-07 15:32:12 +01:00
Sébastien Villemot
66dcb59d2b
🐛 Bytecode: fix FSTPG3_::get_lag()
...
It would return an incorrect result. This had no impact except for debugging
information.
2023-11-07 15:32:12 +01:00
Sébastien Villemot
3c7b02e87e
🐛 Bytecode+block+mfs>0: fix Jacobian computation in “evaluate” mode
...
When parsing the FSTPG{2,3} opcodes, the bytecode MEX internally constructs a
Jacobian with as many lines as feedback variables. But the preprocessor would
also output instructions for filling derivatives of equations corresponding to
recursive variables in the “evaluate” mode, thus leading to memory corruption
in the bytecode MEX.
2023-11-07 15:31:51 +01:00
Sébastien Villemot
1e159319d0
Static block derivatives: minor simplification
2023-11-03 11:26:59 +01:00
Sébastien Villemot
17ba27330a
Minor simplification
2023-10-25 14:38:43 +02:00
Sébastien Villemot
9b50a8a159
Rename ys0_ into oo_.initial_steady_state and ex0_ into oo_.initial_exo_steady_state
2023-10-23 17:33:49 +02:00
Sébastien Villemot
6235e69075
No longer forbid bytecode with k_order_solver
...
The two are now compatible, even though the bytecode representation will not be
used.
2023-10-19 14:09:05 -04:00
Sébastien Villemot
e6f38e724c
Cosmetics: remove empty list of parameters for lambda functions
2023-10-19 09:55:59 -04:00
Sébastien Villemot
f78c428d99
New option “relative_to_initval” to “mshocks” block
2023-10-18 16:16:41 -04:00
Sébastien Villemot
f179ec4dac
Use __builtin_unreachable() to silent some GCC warnings
...
This is cleaner than using exit() or assert() for that purpose.
2023-10-18 14:28:59 -04:00
Sébastien Villemot
6af84b8cac
The “mshocks” block now accepts the “learnt_in=…” option
2023-10-17 15:59:10 -04:00
Sébastien Villemot
6ec7f580d5
New option “static_mfs” to “model” block (and “model_options” command)
...
Currently defaults to 0.
2023-10-16 11:50:26 -04:00
Sébastien Villemot
98c27fad59
StaticModel: add missing fields in copy constructor and assigment operators
...
This should have been in commit 0169240f76
.
2023-10-16 11:49:33 -04:00
Sébastien Villemot
9ecc288f72
Bison grammar: small simplification w.r.t. “model” block options
...
Those options do not internally behave as the usual command options (which have
a “o_*” rule), so it makes more sense to treat them differently.
2023-10-16 11:49:33 -04:00
Sébastien Villemot
43fc59a2bc
The “mfs” option of the “model” block no longer affects the static model
...
This is a restoration of the behaviour that was present in 5.x.
2023-10-16 11:49:30 -04:00
Sébastien Villemot
db3a6bc301
ModelTree::equationTypeDetermination(): remove “mfs” as an input argument
...
It is already available as a class member.
2023-10-13 17:02:36 -04:00
Sébastien Villemot
613a8578ee
InitvalFileStatement: call histval_initvalf.m directly instead of initvalf.m wrapper
2023-10-11 16:52:04 -04:00
Sébastien Villemot
06eb8e0767
Merge branch 'xcode15' into 'master'
...
CI: fix linker issue with XCode 15 and add job for Homebrew arm64
See merge request Dynare/preprocessor!90
2023-10-11 13:47:51 +00:00
Willi Mutschler
ed3a0eb6a9
CI: add job for Homebrew / arm64
2023-10-11 15:43:54 +02:00
Willi Mutschler
586c8dbfae
macOS: use ld_classic as workaround for linker issue with XCode 15
...
XCode 15 (on Ventura and Sonoma) has a linker issue, see https://github.com/mesonbuild/meson/issues/12282 , workaround is to use ld_classic
2023-10-11 15:43:54 +02:00
Johannes Pfeifer
3c20b9862b
Add interface for nomodelsummary option
2023-10-11 09:31:22 -04:00
Johannes Pfeifer
16b063f666
Remove options_ as third input to set_state_space
2023-10-11 09:22:35 -04:00