Commit Graph

47 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 702cf62ee3
Declare some methods as const 2021-02-03 18:09:11 +01:00
Sébastien Villemot 234fcd1d2b
Remove obsolete stuff from bytecode 2021-02-01 14:46:08 +01:00
Sébastien Villemot 754a1a464d
Use default member init
Performed using modernize-use-default-member-init from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-default-member-init.html
2021-02-01 12:44:24 +01:00
Sébastien Villemot 4ee89d6e70
Use more auto keyword
Performed using modernize-use-auto from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-auto.html
2021-02-01 12:42:59 +01:00
Sébastien Villemot 89e2daf7c7
C++17 modernization: convert the remaining enums to enum classes 2021-02-01 12:05:06 +01:00
Sébastien Villemot a6d9ba6e55
Rename EquationType::evaluate_s to evaluateRenormalized, for clarity 2020-05-20 11:49:32 +02:00
Sébastien Villemot 9f361e9e37
Block decomposition: simplify code for ordering dynamic Jacobian columns 2020-05-06 14:21:24 +02:00
Sébastien Villemot a8c2defe26
Block decomposition: compute simulation types into separate function; prologue and epilogue are no longer class members
By the way, remove the BlockType stuff which was purely informative (and it’s
not worth carrying over prologue and epilogue information just for that).
2020-04-30 12:48:16 +02:00
Sébastien Villemot 5bd41f8599
Improve comments 2020-04-24 19:06:30 +02:00
Sébastien Villemot ce1cbb3e52
Block decomposition: turn EquationType into an enum class 2020-03-20 18:00:56 +01:00
Sébastien Villemot 8b4d046f9f
Block decomposition: turn BlockSimulationType into an enum class 2020-03-20 17:31:14 +01:00
Sébastien Villemot f1061e8df1
Block decomposition: turn BlockType into an enum class 2020-03-20 16:38:43 +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
Houtan Bastani 0ff7a9d2ab
introduce command line options: `exclude_eqs` and `include_eqs`
Allows for the inclusion/exclusion of a set of equations, specified either on the command line or in a text file.

If the equation has a single endogenous variable on the LHS, then the equation is moved. If not, if the equation has an `endogenous` tag then that variable is removed along with this equation. If not, then an error is thrown.

As a command line argument, `exclude_eqs` can take the form (same syntax for `include_eqs`):
* `exclude_eqs=eq1 to remove all equations declared as `[name=eq1]`
* `exclude_eqs=[eq 1, eq 2]` to remove all equations declared as `[name=eq 1]` or `[name=eq 2]`
* `exclude_eqs=[tagname=X]` to remove all equations declared as `[tagname=X]`
* `exclude_eqs=[tagname=(X, Y)]` to remove all equations declared as `[tagname=X]` or `[tagname=Y]`

When declared in a file, the file should be of the form:
```
eq 1
eq 2
```
to remove all equations declared as `[name=eq 1]` or `[name=eq 2]`.

It should be of the form:
```
tagname=
X
Y
```
to remove all equations declared as `[tagname=X]` or `[tagname=Y]`.
2019-11-26 14:16:00 +01:00
Houtan Bastani e3c23df9b8
fix spacing and typos 2019-09-30 14:21:36 +02:00
Houtan Bastani 6d783ec9cd
add comment 2019-09-30 14:09:49 +02:00
Houtan Bastani ae0a91256a
add cubic root to dynare language 2019-07-15 12:18:26 -04:00
Sébastien Villemot 82cd95a653
Remove some unnecessary headers 2019-05-02 15:30:33 +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
Houtan Bastani aad8414f94
allow the use of previously assigned variables in epilogue block in later equations in epilogue block 2018-12-10 16:30:19 +01:00
Houtan Bastani 9d3f104b8c
fix epilogue block 2018-12-10 12:27:27 +01:00
Sébastien Villemot 571b5d0816
Computation of temporary terms generalized to any derivation order 2018-11-30 12:22:13 +01:00
Sébastien Villemot ac94ad906e Various fixes for silencing errors and warnings under Clang 6 2018-10-11 11:21:58 +02:00
Sébastien Villemot 9043efab32 Replace "class" by "typename" in template declarations 2018-10-04 18:08:19 +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 9f0c30740e introduce epilogue block 2018-09-05 12:31:49 +02:00
Sébastien Villemot 04b6690d5a C++11: convert ExternalFunctionType to a class enum 2018-07-18 17:28:23 +02:00
Sébastien Villemot 14948401e4 C++11: convert PriorDistributions to a class enum 2018-07-18 16:52:12 +02:00
Sébastien Villemot edddc9d8ca C++11: convert NodeTreeReference to a class enum 2018-07-18 16:35:19 +02:00
Sébastien Villemot 4ad0e500d4 C++11: convert {Unary,Binary,Trinary}Opcode to class enums 2018-07-18 16:18: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 b8a5dfdc39 Replace several usages of C macroprocessor with C++ constructs 2018-07-17 16:36:58 +02:00
Sébastien Villemot 988a9f6e2d std::open and std::fstream constructor accept a std::string for filename in C++11 2018-06-27 15:30:45 +02:00
Houtan Bastani 45f7e40a88 remove unused library 2018-06-27 13:50:15 +02:00
Sébastien Villemot ae81a6fcad Fix compilation error with bytecode DLL 2018-06-05 11:25:23 +02:00
Sébastien Villemot 608c43450c Replace most calls to make_pair by braced-initializer lists or emplace()/emplace_back() 2018-06-04 16:36:46 +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 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
Sébastien Villemot 80d1e1e1fd Use C++ header
Performed using modernize-deprecated-headers from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-deprecated-headers.html
2018-06-04 11:59:02 +02:00
Sébastien Villemot e1f65b3390 Fix bug in external functions with temporary terms array
Given that temporary terms are separated in several functions (residuals,
jacobian, …), we must make sure that all temporary terms derived from a given
external function call are assigned just after that call, and not in an other
function.
2018-05-29 17:07:18 +02: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