-
-
Notifications
You must be signed in to change notification settings - Fork 46
/
RELEASE-NOTES.txt
471 lines (411 loc) · 31.9 KB
/
RELEASE-NOTES.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
STANC3 RELEASE NOTES
======================================================================
v2.35.0 (3 June 2024)
======================================================================
- Rename `sampling statement (~)` to `distribution statement (~)` to be consistent with the docs changes. (#1426)
- The generated C++ no longer assumes that the RNG used in Stan is specifically the `boost::ecuyer1988` generator, but uses a type alias defined in the Stan library. (#1395)
- Fixed an issue where multiple `reject` statements could cause the C++ compiler to fail. (#1396)
- Giving a variable the name `jacobian` is now deprecated. This name is being reserved for future language extensions. (#1397)
- When encountering an unknown identifier that matches a known suffixed function without its suffix, add the known function name to the error message. (#1401)
- Added `fatal_error()`, which is similar to `reject()` but rather than signaling an error which is recoverable, signals an error which should terminate execution immediately. `fatal_error` is now a reserved word. (#1402)
- Exposed the new overloads of `wiener_lpdf` added to Stan Math by @Franzi2114. (#1411)
- Added a better error message when a program attempts to use the removed array syntax. (#1413)
- Use tabs to position error message cursor when appropriate. (#1414)
- Replaced the link show when the deprecated `lkj_cov` distribution is used with the new link (see https://github.com/stan-dev/docs/pull/694). (#1415)
- The compiler should display a cleaner error if it encounters an internal error. (#1416)
- Clarified the error messages generated by a syntax error on the right side of an assignment statement. (#1417)
- Removed code following the last round of syntax deprecations that is currently scheduled. The final one (use of `real` values in conditionals) is now a type error and can no longer be automatically canonicalized. (#1420)
- Fixed an issue where `operator/` was not generating the correct C++ for complex linear algebra types. (#1421)
- Rollback js_of_ocaml to 5.4.0 for compatibility with QuickJS. (#1427)
v2.34.0 (16 January 2024)
======================================================================
- Added the `binomial_logit_glm` distribution (#1367)
- Added the `dirichlet_multinomial` distribution. (#1389)
- Added the ability to unpack a tuple during an assignment. For example, the following is now valid:
```stan
parameters {
matrix[N, M] A;
}
model {
matrix[N, M] Q;
matrix[M, M] R;
(Q, R) = qr_thin(A); // qr_thin returns a tuple(matrix, matrix)
}
```
(#1360)
- Exposed vectorized signatures for the `atan2` function. (#1364)
- The Stan compiler will now warn you when you reassign a variable to itself. (#1358)
- Updated the OCaml-to-JS compiler used to create stanc.js (#1365, #1381)
- Updated the compiler to use OCaml 4.14 and newer versions of its dependencies. (#1366)
- Reverted a change to SoA initialization, as the Math library has implemented a better fix. (#1376)
- Fixed an issue with clang compilers and constructing tuples. (#1382)
- The compiler no longer recognizes language constructs removed in 2.33. (#1388)
- The deprecated implicit conversion of reals to boolean conditions has been removed. (#1388)
v2.33.1 (13 September 2023)
======================================================================
- Fixed several issues with the code generation of user-defined functions which accepted tuples (#1356)
v2.33.0 (5 September 2023)
======================================================================
- Added tuple types to the language (#1100)
- The following deprecations have been turned into errors this version:
- The old array syntax, e.g. `int arr[5];`. Use `array[5] int arr;` instead.
- Distribution functions ending in `_log`. Use either `_lpdf` or `_lpmf`.
- The functions `binomial_coefficient_log`, `multiply_log`, and `cov_exp_quad`. Use `lchoose`, `lmultiply`, and `gp_exp_quad_cov` respectively.
- The `if_else` function. Use the ternary operator `cond ? true_value : false_value`
- Use of CDFs with a `,` between the first and second argument. Use a `|`.
- Comments beginning with `#`. Use `//`.
- Use of `<-` for assignment. Use `=`.
- The `increment_log_prob` function. Use the `target +=` statement.
- The `get_lp()` function. Use `target()`.
- The use of nested multi-indices on the left hand side of an assignment statement.
For this version, these can all be automatically updated with the `--canonicalize=deprecations` argument to the autoformatter. This is not guaranteed to work for versions _following_ this one.
Additionally, the following identifiers are now reserved words: `array`, `offset`, `multiplier`, `lower`, and `upper`.
(#1287)
- Exposed vectorized signatures for `log_sum_exp` (#1344)
- Exposed new functions `qr`, `qr_thin`, `eigendecompose_sym`, `eigendecompose`, `complex_schur_decompose`, `svd`, and `csr_extract`. (#1346)
- Added a `log_prob_impl` specialization specifically for reverse mode to improve code generation (#1327)
- Fixed an issue where returning array literals could produce the wrong types in C++. (#1335)
- Fixed an issue with leading zeroes in real literals like `0E0` (#1336)
- Fixed a bug with type promotion in the arguments to user-defined distributions generating bad C++. (#1338)
- Fixed optimization logic for deducing whether mixes of scalars, data matrices, and autodiff matrices can be promoted to SoA (#1347)
- Fixed an issue with the partial evaluator crashing on statements containing a mod-by-zero. (#1351)
- `--filename-in-msg` now also affects the name of the file shown in runtime exceptions. Useful for interfaces which use mangled or temporary names during compilation. (#1339)
- Improved error message provided when the wrong return type is returned from a function.
Return statements now follow the same type promotion rules as assignment and function argument passing.
The typechecker now allows infinite loops (`while (1)` without an internal `break`) to be the end of a returning function. Previously, an (unreachable) return statement was needed following the loop.
(#1341)
- Improved error messages for unsupported type in reduce_sum (#1332)
- Improved error messages when using a reserved word as a variable name. (#1343)
v2.32.1 (2 May 2023)
======================================================================
- The shapes and sizes of parameter initial values are now checked against the specified sizes in the model before being read in, matching the existing behavior for data. (#1316)
**Note:** This change may cause existing code which worked "by accident" to raise new errors about mismatches between the model's declarations and the provided initialization.
- Errors in transform_inits should now properly highlight the location in the original Stan program. (#1318)
- Fixed an issue where the `--debug-generate-inits` debug flag would fail badly if parameter sizes depended on data (#1319)
v2.32.0 (20 April 2023)
======================================================================
- Syntax removals scheduled for this version have been pushed back to 2.33. We still recommend updating your Stan models as you are able. As a reminder, deprecated syntax which will be removed in minor versions can as a rule be updated automatically using find-and-replace tools or the [Stan compiler's auto-formatting abilities](https://mc-stan.org/docs/stan-users-guide/stanc-pretty-printing.html). (#1303)
- The deprecated `--include_paths` and `--allow_undefined` arguments have been removed, use `--include-paths` and `--allow-undefined`. (#1303)
- Recursive user-defined functions no longer need forward declarations. (#1277)
- Added overloads to `eigenvalues` and `eigenvectors` which accept a complex matrix as input. (#1282)
- Fixed an issue where `profile` blocks could generate uncompilable C++ when used with `--O1`. (#1281)
- Fixed an issue where the compiler would generate uncompilable C++ when a matrix expression featured mixed types of elements. (#1292)
- Fixed an issue where a user-defined-function expecting real arguments could be passed an integer and exhibit integer behavior like truncating division. (#1296)
- Fixed an issue where external functions could not be used in higher-order functions without the end-user supplying an implementation of our functor structs. (#1298)
- Fixed a bug in `transform_inits` for models which used complex types (#1305)
- Improved the error shown when an `#include`d file cannot be found to list the paths it searched on. (#1273)
- Improved `--filename-in-msg` for the command line version of `stanc`. Errors now use the requested name, not just warnings. (#1274)
- Refactored how C++ is code-generated in the compiler. (#1233)
- Added tests for various parts of the C++ backend which weren't previously tested, and added a `--debug-lir` flag to print out the C++ representation in a s-expression. (#1276)
- Updated code generate of `get_param_names` (#1245)
- Switched to `std::endl` instead of `'\n'` to end prints. (#1301)
- Added a new function `unconstrain_array` to the generated code. This is currently not exposed. (#1305)
- Added a `--debug-generate-inits` flag to stanc which behaves like `--debug-generate-data` but for declarations in the `parameters` block. (#1306)
- Sped up some code which is critical to parsing. (#1302)
v2.31.0 (21 November 2022)
======================================================================
- Improved the error message for bad multiple declarations. (#1239)
- Fixed a bug where using a C++ reserved word as a name in certain situations would prevent compilation. (#1243)
- Build binaries in parallel on Jenkins. (#1244)
- Added functions `complex_schur_decompose_t()` and `complex_schur_decompose_u()` implementing the complex-valued Schur decomposition for matrices.(#1247)
- Vectorized the `conj` function for complex types.(#1253)
- CI change, build backwards-compatible Mac executables on flatiron mac. (#1255)
- Improved the error generated when a function is re-declared, or when a function is not given a definition. (#1256)
- `print` and `reject` will now be listed as functions in `stanc --info`s output. (#1257)
- Added quantile functions (inverse-CDFs) `std_normal_qf` and `std_normal_log_qf`. `std_normal_qf` is a synonym for `inv_Phi`, and `std_normal_log_qf` is the same but with the input on the log-scale.(#1258)
- Fix using `reject()` with container types. (#1261)
- Vectorized sampling statements can now be used with the truncation syntax `T[ , ]`(#1263)
- Functions which return integer types are considered as "data" for purposes of data-only arguments.(#1265)
- The negation operator `-` can now accept arrays, e.g. `array[N] int foo = {...}; print(-foo);`(#1266)
- Exposes algebraic functions with a variadic arguments, using the following four functions: `solve_powell`, `solve_powell_tol`, `solve_newton` and `solve_newton_tol`. Relevant changes to Stan-math are already merged.(#1268)
v2.30.1 (27 July 2022)
======================================================================
- Improved the pedantic mode warning for parameters without priors. The message now highlights when it is safe to ignore it.
- Fixed a bug in the memory pattern optimization where a for loop generated for the function inliner would prevent detection of for loops higher in the control flow graph.
- Fixed an issue with the function inliner when a function local variable had the same name as a variable in the calling scope.
- Fixed an issue where recursive functions which called themselves with a slice of their arguments would lead to infinite template expansion in C++ compilation.
- Fixed a bug in stanc.js where the stanc flags were not listed correctly in the generated C++.
- The imaginary components of complex vectors and matrices are now initialized to NaN to match the real component and behaviour of non-complex vectors and matrices.
v2.30.0 (1 July 2022)
======================================================================
Complex:
- Added complex containers: `complex_matrix`, `complex_vector`, and `complex_row_vector` with basic arithmetic support. (#1133)
- Fixed indexing of a complex container to return the correct type. (#1158)
- Added many common linear algebra functions and container operations for complex types. (#1166)
- Fixed an issue reading in `complex_matrix` in the data block. (#1168)
- Added vectorized signatures for `get_real` and `get_imag`, e.g. `get_real(complex_matrix) => matrix`. (#1169)
- Added `fft`, `inv_fft`, `fft2`, and `inv_fft2` to the language. (#1170)
- `pow` (and subsequently the `^` operator) now have overloads for complex containers. (#1186)
- `to_complex` is now vectorized. This means signatures like `to_complex(matrix, matrix) => complex_matrix` are now available. (#1208)
- Added signatures for addition, subtraction and division which mix scalars and complex vector types, broadcasting the scalar as appropriate. (#1212)
- Added `svd_U`, `svd_V`, `singular_values`, `eigenvalues_sym`, and `eigenvectors_sym` for complex inputs. (#1212)
New functions:
- Added `L1` and `L2` norms. (#1140)
- Added `log_determinant_spd` which is faster when the input matrix is known to be symmetric and positive definite. (#1178)
- Added `wishart_cholesky_lpdf` and `wishart_cholesky_rng` distribution functions. (#1188)
- Added `multi_student_t_cholesky_lpdf` and `multi_student_t_cholesky_rng` distribution functions. (#1197)
- Added `inv_wishart_cholesky_lpdf` and `inv_wishart_cholesky_rng` distribution functions. (#1202)
- Exposes inv_inc_beta. (#1211)
Misc:
- Re-enabled function inlining optimizations at O1. (#1097)
- Modified the optimizer to turn statements like `3 + 4i` into `to_complex(3,4)` directly. (#1112)
- Added `cumulative_sum(Vector/RowVector)` for `var<Matrix>` types. (#1152)
- Improved compile times by accumulating all template requirements into a single `require_all_t` on user defined functions. (#1157)
- The `--info` and `--debug-generate-data` commands now use the Yojson library for it's output. (#1161, #1175)
- Bugfixed for output values in `write_array` that should be `NaN`. (#1165)
- `--dump-stan-math-signatures` now prints an entire signature on one line, no matter how long it is. (#1167)
- Fix --debug-generate-data for ordered vector data types. (#1173)
- Exposed an overload for `cumulative_sum` which takes and returns an array of integers. (#1174)
- The javascript interface (stancjs) now generates errors which look more like stanc3's by pointing out where in the supplied code the error occurred. (#1177)
- Cleaned up the internal structuring of modules in the compiler. (#1179)
- Cleaned up code for pretty printing the Middle Intermediate Representation (MIR). (#1180)
- Added `--debug-mem-patterns` flag, which will print out the memory type of variables (either Array of Structs or the more efficient Struct of Arrays pattern) when optimization is enabled. (#1185)
- Allowed the adding of new distributions without requiring them to support deprecated suffixes. (#1191)
- Added `eigenvectors` and `eigenvalues` functions which return the complex-valued eigenvectors or eigenvalues of a real (asymmetrix) matrix. (#1192)
- `abs` is now vectorized for container types. `fabs` is now deprecated, as all usages can be replaced with `abs` thanks to array promotion rules. (#1195)
- Made installing the developer tools for the Stanc repository an interactive script with error handling. (#1200)
- Internally clean up how variable declarations are represented. (#1203)
- Simplified internal representations in the compiler. (#1204)
- The pretty-printer now preserves multiple declarations in one line like `int a, b;` rather than splitting them into two declarations. (#1207)
- Declarations are now allowed in places they previously would not parse, such as the only statement in the body of an if statement. (#1207)
- `./`, `/` `.*`, and `*` now have consistent behavior with scalar arguments. (#1209)
v2.29.2 (25 March 2022)
======================================================================
- Fixed a bug fix with `--O1` when arrays declared in transformed parameters or model were assigned data.
- Added missing signatures for `normal_id_glm_lpdf`.
- Fixed a compilation error with forward declarations.
- Disabled AD level optimizations in `--O1` optimizations.
- MIR pretty printing now always adds ( and ) around the ternary operator ?:
v2.29.1 (2 March 2022)
======================================================================
- Formatting without a | when only one argument is supplied to a distribution.
- Stanc previously would allow you to erroneously assign a function to a different functions name using =, which then failed in C++ compilation. This is now an error.
- Nonlinear transforms of the LHS of a tilde statement now produce warnings in pedantic mode.
- Improved type error messages for operators and tilde statements.
v2.29.0 (14 February 2022)
======================================================================
FEATURES
- Allow most reserved words in C++ (e.g., `public`) to appear in a stan program; they will be changed by the compiler to `_stan_<reserved word>` in the generated C++. (#962)
- User defined functions can now be overloaded. Multiple definitions of the same function name are allowed if the arguments are different in each definition.(#1027)
- Improved error messages for incorrect variable declarations. (#1099)
- When an unknown identifier is encountered Stan will suggest nearby known names you might have meant (#1024)
- Extra semicolons in `data` or `parameters` no longer produce syntax errors. (#988)
- Improved error messages for incomplete probability library calls. (#1021)
- Added nicer error message when a comment is unterminated at end of input. (#1025)
- All internal compiler errors now include a link to the stanc3 issues page. (#1028)
- Improve error messages when a user tries to declare a function argument as a constrained type. (#1030)
- Replaced the use of the word twiddle with tilde in pedantic warning messages. (#1050)
- Allow user-defined densities over complex arguments and deeply nested arguments. (#1046)
- Added optimization layers `--O0` (default), `--O1`, and `--Oexperimental`
- Turn back on allowing immediately assigned to decls not be NaN initialized at `O1` (#1029)
- Allows `log_prob_impl` to use Struct of Arrays type for reverse mode autodiff at `O1` (#955)
- Issue a warning when a user has a model with unreachable statements, such as code following a `return` statement. (#1063)
- The compiler can now compile or format standalone function definitions in a `.stanfunctions` file. These are compiled as if a normal Stan program was compiled with `stanc3 --standalone-functions` and can be used with `#include` statements in the `functions` block (#1022)
- The canonicalizer can now have each part enabled seperately. This can be done with commands like `stanc --auto-format --canonicalize=braces,deprecations <model>`. Current options are `deprecations`, `braces`, and `parenthesis`. (#1058)
- Ensure the canonicalizer properly prints nested if-else statements. (#1055)
- `--auto-format` no longer prints code which originated from an `#include` directive. This can be re-enabled by using `canonicalize=includes`. (#1069)
- When using `--auto-format`, the user can now pass `--max-line-length=#` to set the column number at which the formatter will try to break lines. (#1068)
- Tweak pretty-printing of if-else blocks. (#1008)
- Canonicalizer now adds brackets around single statements in if-else/for/while. (#1003)
- Expose `bernoulli_logit_glm_rng` functions. (#1034)
- lchoose now has the same signatures as binomial_coefficient_log. (#1010)
- Added `ordered_probit_lpmf(array[] int, real, vector) => real` and `ordered_probit_lpmf(array[] int, real, array[] vector) => real`. (#1073)
- Added additional `normal_id_glm` signatures. (#1084)
- Added signatures for `inv_erfc` function. (#1090)
- Added Differential-Algebraic Equation solver (`dae`, `dae_tol`). (#1092)
- Added `von_mises_cdf`, `von_mises_lcdf`, von_mises_lccdf`. (#1085)
- Added `loglogistic_lpdf`, `loglogistic_log`, `loglogistic_rng` and `loglogistic_cdf`. (#1094)
- Clean up more mutable state in the Javascript interface (#1118)
DEPRECATIONS
- Added a warning for `matrix^scalar` that points users to `.^` and `matrix_power()`. (#1026)
- Warn about the following identifiers being reserved in a future version: `array`, `upper`, `lower`, `offset`, `multiplier`. (#1048)
- The old form of declaring arrays like `real a[5]`, which has been deprecated since 2.26, now issues a warning. (#1072)
- Marked existing syntax deprecations (e.g., `<-`) as expiring in Stan 2.32.0. (#1044)
- Deprecate nested multi-indexing on lvalues as it is inconsistent with rvalues.(#1059)
BUGFIXES
- Fixed an issue that arose during C++ compilation of models that used a variable with the same name as a Stan library function and called that function. (#1011)
- Fixed a bug where the lexer was allowing illegal variable names which began with an underscore. (#962)
- Fixed an issue with parser errors 'sticking around' on subsequent runs, which primarily affected the Javascript compiler. (#1074)
DEVELOPER
- Updated OCaml and build dependencies. (#1019)
- Create internal developer documentation at https://mc-stan.org/stanc3/stanc/. (#1006)
- stan2tfp now lives in a seperate repo at stan-dev/stan2tfp. (#1040)
- Refactored Stan typechecker. (#995)
- Replaces all references to Docker Hub for andrjohns images with stanorg. (#1017)
- Move docker to ci-scripts repository. (#1020)
- Refactored when logic for binaries builds and release. (#1018)
- Added optimization level flags, debug-* and dump-math-signatures flags to stancjs. (#1082)
- Compile Tests and Model end-to-end tests run now optionally only when test/integration/good has changed. (#1018)
v2.28.1 (21 October 2021)
======================================================================
- Expose missing arg() function
- Turned off default of allow_uninitialized_decls
- Fixed transform_inits input and output sizes
Note: There are known issues during compilation when calling functions that expect complex arguments with variables of type `int` or `real`.
If this is required, please wrap the arguments with a call to `to_complex()`. This will be addressed in the next release.
v2.28.0 (5 October 2021)
======================================================================
- Int division is now handled by the Warnings module to print this to stderr and to avoid printing to stderr directly (a problem for stanc.js). (#869)
- Correct canonicalizing/auto-formatting of commented Stan programs; comments no longer discarded. (#894)
- Improved error messages when argument types don't match the function signature. (#907)
- A warning is now produced if an empty file is compiled. (#919)
- Stancjs now has `--info` and `--debug-generate-data` options.(#920)
- Added support for `skew_double_exponential` distribution.(#921)
- Reorganized warning system internally.(#922)
- Removed initialization of NA values from objects that are immediately assigned to(#930)
- Added `to_matrix(array[] row_vector) => matrix`. (#931)
- Added build process for arm64, armhf, armel, mips64el, ppc64el and s390x linux architectures. (#936)
- Implemented complex type functionality. (#940)
- Added types used for deducing memory patterns. (#944)
- Removes dune runtest from binary build stage. (#950)
- Provide rough support for non-ASCII characters in string literals. (#952)
- Clean up internal exception handling. (#957)
- Added the ability to write imaginary numbers as literals, such as "3.1i". (#963)
- Added a list of included files to the information provided by `--info`. (#965)
- Tweaked pretty-printing of conditional distribution applications. (#967)
- Better pretty-printing for long constraints. (#970)
- Fix automated builds of non-x86 architectures. (#972)
- Fixed a bug with the conditional operator `?` and the use of vector or matrix expressions. (#977)
- Fixed a typo in the error message displayed when a file cannot be found. (#981)
- Error messages should now always have a trailing newline. (#982)
- Miscellaneous README.md improvements. (#914, #943, #984)
v2.27.0 (2 June 2021)
======================================================================
- Added the `--info` argument to output a list of functions and distributions used.(#813)
- Added `ode_ckrk` and `ode_ckrk_tol` to the Stan language.(#828)
- Cleaned up indexing by using variadic rvalue and assign functions.(#829)
- Fixed incorrect codegen for mixed-type array expressions.(#830)
- Added building ARM to our infrastructure.(#832, #833)
- Made locations_array constexpr and moved curr_statement__ to function scope.(#842, #845)
- Added range checks.(#849, #521)
- Consolidated the use of | in cdf functions to match lpdf/lpmf and lccdf functions. Comma version of cdf function is deprecated.(#863)
- Adds signatures for data-only quantile functions.(#870)
- Cleanup readability of the C++.(#871)
- Adds vectorized versions of `fma()`.(#888)
- Fixed optimizer crash on divide-by-zero expressions.(#891)
- Added clearing of read/write events for global matrix_cls.(#897)
- Added `ode_adjoint_tol_ctl` and improved type printing with variadic ODEs.(#900)
v2.26.1 (15 February 2021)
======================================================================
- Fixed issue with not allowing user-defined _lp functions with a void return type in transformed parameters block.
v2.26.0 (26 January 2021)
======================================================================
- Added deprecated functions warnings to regular use, and replace in canonicalizer.(#726)
- Added a small readme for dockerfiles usage locally.(#738)
- Added `matrix chol2inv(matrix)`.(#740)
- Added a Github Actions job to build binaries.(#747)
- Modified code-generation for user-defined functions to accept Eigen expressions.(#752)
- Added OpenCL support for: bernoulli_lpmf, bernoulli_logit_lpmf, beta_lpdf, beta_proportion_lpdf, binomial_lpmf, cauchy_lpdf, chi_square_lpdf, double_exponential_lpdf, exp_mod_normal_lpdf, exponential_lpdf, frechet_lpdf, gamma_lpdf, gumbel_lpdf, inv_chi_square_lpdf, inv_gamma_lpdf, logistic_lpdf, lognormal_lpdf, neg_binomial_lpmf, neg_binomial_2_lpmf, neg_binomial_2_log_lpmf, normal_lpdf, pareto_lpdf, pareto_type_2_lpdf, poisson_lpmf, poisson_log_lpmf, rayleigh_lpdf, scaled_inv_chi_square_lpdf, skew_normal_lpdf, std_normal_lpdf, student_t_lpdf, uniform_lpdf, weibull_lpdf
- Allowed `write_array()`, `log_prob()`, and `transform_inits()` to avoid a vector copy and read/write(#761)
- Added the discrete_range distribution.(#763)
- Use Eigen comma initializer to avoid copy in vector construction.(#766)
- Allowed calling lp functions in transformed parameters block.(#767)
- Fixed multi-dim indexing bug.(#768)
- Moved the reported location of parsing errors closer to the problematic section.(#771)
- Fixed a optimization bug in handling of unnormalized distributions.(#778)
- Added profiling to the Stan language.(#794)
- Added `linspaced_int_array()`(#796)
v2.25.0 (26 October 2020)
======================================================================
- Improved parser error message on missing semicolon in the data or parameters block.
- Expanded OpenCL (GPU) support for GLMs to now handle parameters for any argument.
- Fix parameter unconstraining bug when the constraints depend on other constrained parameters.
- "offset, "multiplier," "lower," and "upper" are no longer reserved keywords and can be used in the names of identifiers.
- Extended `elt_multiply` (`.*`) and `elt_divide` (`./`) to cases where both inputs are scalars.
- Added support for unnormalized distributions for the `target +=` sytnax.
- Changed the MIR to represent function declarations as Options.
- Variable names are now allowed that shadow math function names.
- Fixed a bug with not recognizing transformed parameters in pedantic mode
- Added vectorised binary functions:
- bessel_first_kind
- beta
- binary_log_loss
- binomial_coefficient_log
- choose
- falling_factorial
- fdim
- fmax
- fmin
- fmod
- gamma_p
- gamma_q
- hypot
- lbeta
- ldexp
- lmgamma
- log_diff_exp
- log_falling_factorial
- log_inv_logit_diff
- log_modified_bessel_first_kind
- log_rising_factorial
- modified_bessel_first_kind
- modified_bessel_second_kind
- lmultiply
- multiply_log
- owens_t
- rising_factorial
Code contributions were made by @andrjohns @nhuurre @rok-cesnovar @rybern and @seantalts
v2.24.1 (11 August 2020)
======================================================================
Bugfixes:
- added using std::pow to generated code
- fixed code generation for pow()
- added data quantifier to linspaced_* signatures
- fixed code generation for empty matrices
v2.24.0 (28 July 2020)
======================================================================
New functions:
`algebra_solver_newton`
`matrix hmm_hidden_state_prob(matrix, matrix, vector)`
`int[] hmm_latent_rng(matrix, matrix, vector)`
`real hmm_marginal(matrix, matrix, vector)`
`T lambert_w0(T)`, for any T
`T lambert_w1(T)`, for any T
`matrix matrix_power(matrix, int)`
`real multinomial_logit_log(int[], vector)`
`real multinomial_logit_lpmf(int[], vector)`
`int[] multinomial_logit_rng(vector, int)`
`ode_adams`, `ode_adams_tol`
`ode_bdf`, `ode_bdf_tol`
`ode_rk45`, `ode_rk45_tol`
`T pow(int, T)`
`T pow(real, T)`
`T pow(T, int)`
`T pow(T, real) `
(previously only real pow(real, real) was available)
`T reverse(T)`, where T is vector, row_vector or an array of any type
`matrix identity_matrix(int)`
`real[] linspaced_array(int, real, real); row_vector linspaced_row_vector(int, real, real); vector linspaced_vector(int, real, real)`
`int[] one_hot_int_array(int, int); real[] one_hot_array(int, int); row_vector one_hot_row_vector(int, int); vector one_hot_vector(int, int)`
`int[] ones_int_array(int); real[] ones_array(int); row_vector ones_row_vector(int); vector ones_vector(int)`
`vector uniform_simplex(int)`
`int[] zeros_int_array(int); real[] zeros_array(int); row_vector zeros_row_vector(int); vector zeros_vector(int)`
New features:
- pedantic mode
- experimental optimization mode
- new integer division operator `%/%`
- non-scalar values are now allowed in lower, upper, offset and multiplier
- integrate_ode_* functions are now deprecated
- data-only restricted functions now work with parameters in generated quantities
- improved out-of-bounds messages for vectors, matrices
- added checks for invalid literals
- `--allow_undefined` and `--include_paths` are deprecated in favor of `--allow-undefined` and `--include-paths`
- cleaned up the generated model C++ code: model is now final, using statements instead of typedef, better use of inline, use of `.clear()` instead of `.resize(0)`, remove unnecessary functions
- cleaned up the OCaml code: better use of helper functions, removed duplicate functions, better exception messages, replace imperative code for handling Stan Math signatures
- size expressions for parameters and generated quantities are now only evaluated once
- better handle model names that are not C++ friendly (start with numbers, have non-alphanumeric characters)
Bugfixes:
- changed the loop index type to int to prevent issues when using it in expressions with signed numbers
- integer arrays now initialize to the smallest representable integer
- var arrays initialize with a prebuilt dummy var, to not creat new varis
- all map_rect calls are registered when using MPI
- _lpdf/_lpmf functions are now used instead of *_log when generating code for the tilde statements
- single argument distribution do not require the vertical bar anymore (e.g. std_normal_lpdf(x|))
- fixed a bug that caused tilde statements to conflict with userdef functions
- rng functions are no longer allowed in size declarations
- fixed the _lpdf functor struct so that UDF with _log and int argument now compile
- fixed array literal type-checking
- fixed the error messages for missing input (line number is now displayed properly)
- fixed indexing in transform_init()
- fixed emitting generated quantities only (for gq_writer)
- fixed debug data generator for constrained matrix types and added array value bounds