Skip to content

Releases: stan-dev/stanc3

v2.29.0 (14 February 2022)

14 Feb 20:03
Compare
Choose a tag to compare

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)

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.29.0-rc2

03 Feb 11:43
c011696
Compare
Choose a tag to compare
v2.29.0-rc2 Pre-release
Pre-release
Tagging v2.29.0-rc2

v2.29.0-rc1: Merge pull request #1099 from stan-dev/array-fix

31 Jan 12:30
b713ae3
Compare
Choose a tag to compare
Remove hacky array syntax parsing, improve error messages

v2.28.1 (21 October 2021)

21 Oct 11:06
Compare
Choose a tag to compare
  • 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)

05 Oct 13:58
Compare
Choose a tag to compare
  • 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.28.0-rc2: Merge pull request #984 from WardBrian/readme-update

01 Oct 11:47
17dd97b
Compare
Choose a tag to compare

v2.28.0-rc1: Merge pull request #921 from adamhaber/add_skew_double_exponential

27 Sep 15:46
eeb5e39
Compare
Choose a tag to compare
Add skew_double_exponential signatures

v2.27.0 (2 June 2021)

02 Jun 22:47
84f5735
Compare
Choose a tag to compare
  • 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.27.0-rc1

20 May 15:39
Compare
Choose a tag to compare
Fixed typo in install scripts.

v2.26.1 (15 February 2021)

15 Feb 21:14
Compare
Choose a tag to compare
  • Fixed issue with not allowing user-defined _lp functions with a void return type in transformed parameters block.