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