Skip to content

Commit

Permalink
Run make format, dune promote
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicusor Serban committed Apr 10, 2023
1 parent 29b2a36 commit 47ee1ca
Show file tree
Hide file tree
Showing 23 changed files with 366 additions and 364 deletions.
1 change: 1 addition & 0 deletions dune-project
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(lang dune 2.8)
(using menhir 1.1)
(name stanc)
(version v2.32.0-rc1)
(cram enable)
(generate_opam_files true)
(package
Expand Down
4 changes: 2 additions & 2 deletions src/stanc/stanc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ open Analysis_and_optimization
open Middle

(** The main program. *)
let version = "%%NAME%%3 %%VERSION%%"
let version = "stanc3 v2.32.0-rc1"

let name = "%%NAME%%"
let name = "stanc"

(** The usage message. *)
let usage = "Usage: " ^ name ^ " [option] ... <model_file.stan[functions]>"
Expand Down
2 changes: 1 addition & 1 deletion src/stancjs/stancjs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ open Analysis_and_optimization
open Middle
open Js_of_ocaml

let version = "%%NAME%% %%VERSION%%"
let version = "stanc v2.32.0-rc1"

let stan2cpp model_name model_string is_flag_set flag_val =
Common.Gensym.reset_danger_use_cautiously () ;
Expand Down
1 change: 1 addition & 0 deletions stanc.opam
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: "2.32.0-rc1"
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
synopsis: "The Stan compiler and utilities"
Expand Down
4 changes: 2 additions & 2 deletions test/integration/cli-args/allow-undefined/cpp.expected
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$ ../../../../../install/default/bin/stanc --allow-undefined --print-cpp external.stan
// Code generated by %%NAME%% %%VERSION%%
// Code generated by stanc v2.32.0-rc1
#include <stan/model/model_header.hpp>
namespace external_model_namespace {
using stan::model::model_base_crtp;
Expand Down Expand Up @@ -80,7 +80,7 @@ class external_model final : public model_base_crtp<external_model> {
return "external_model";
}
inline std::vector<std::string> model_compile_info() const noexcept {
return std::vector<std::string>{"stanc_version = %%NAME%%3 %%VERSION%%",
return std::vector<std::string>{"stanc_version = stanc3 v2.32.0-rc1",
"stancflags = --allow-undefined --print-cpp"};
}
template <bool propto__, bool jacobian__, typename VecR, typename VecI,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$ ../../../../../install/default/bin/stanc --standalone-functions --allow-undefined --print-cpp external.stan
// Code generated by %%NAME%% %%VERSION%%
// Code generated by stanc v2.32.0-rc1
#include <stan/model/model_header.hpp>
namespace external_model_namespace {
using stan::model::model_base_crtp;
Expand Down
4 changes: 2 additions & 2 deletions test/integration/cli-args/canonicalize/canonicalize.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Test that a nonsense argument is caught
$ stanc --canonicalize dummy
stanc: Unrecognized canonicalizer option 'dummy'.
Should be one of 'deprecations', 'parentheses', 'braces', 'includes'.
Usage: %%NAME%% [option] ... <model_file.stan[functions]>
Usage: stanc [option] ... <model_file.stan[functions]>
--debug-lex For debugging purposes: print the lexer actions
--debug-parse For debugging purposes: print the parser actions
--debug-ast For debugging purposes: print the undecorated AST, before semantic checking
Expand Down Expand Up @@ -48,7 +48,7 @@ Test that a nonsense argument is caught
Test capitalization - this should fail due to the lack of model_name, not the canonicalizer
$ stanc --canonicalize DEPRECATIONS,parentheses,bRaCeS
Please specify a model_file.
Usage: %%NAME%% [option] ... <model_file.stan[functions]>
Usage: stanc [option] ... <model_file.stan[functions]>
--debug-lex For debugging purposes: print the lexer actions
--debug-parse For debugging purposes: print the parser actions
--debug-ast For debugging purposes: print the undecorated AST, before semantic checking
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$ ../../../../../install/default/bin/stanc --filename-in-msg=foo.stan --print-cpp filename_good.stan
// Code generated by %%NAME%% %%VERSION%%
// Code generated by stanc v2.32.0-rc1
#include <stan/model/model_header.hpp>
namespace filename_good_model_namespace {
using stan::model::model_base_crtp;
Expand Down Expand Up @@ -49,7 +49,7 @@ class filename_good_model final : public model_base_crtp<filename_good_model> {
return "filename_good_model";
}
inline std::vector<std::string> model_compile_info() const noexcept {
return std::vector<std::string>{"stanc_version = %%NAME%%3 %%VERSION%%",
return std::vector<std::string>{"stanc_version = stanc3 v2.32.0-rc1",
"stancflags = --filename-in-msg=foo.stan --print-cpp"};
}
template <bool propto__, bool jacobian__, typename VecR, typename VecI,
Expand Down
8 changes: 4 additions & 4 deletions test/integration/cli-args/stanc.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Show help
$ stanc --help
Usage: %%NAME%% [option] ... <model_file.stan[functions]>
Usage: stanc [option] ... <model_file.stan[functions]>
--debug-lex For debugging purposes: print the lexer actions
--debug-parse For debugging purposes: print the parser actions
--debug-ast For debugging purposes: print the undecorated AST, before semantic checking
Expand Down Expand Up @@ -43,11 +43,11 @@ Show help
--help Display this list of options
Show version
$ stanc --version
%%NAME%%3 %%VERSION%% (Unix)
stanc3 v2.32.0-rc1 (Unix)
Error when no file passed
$ stanc
Please specify a model_file.
Usage: %%NAME%% [option] ... <model_file.stan[functions]>
Usage: stanc [option] ... <model_file.stan[functions]>
--debug-lex For debugging purposes: print the lexer actions
--debug-parse For debugging purposes: print the parser actions
--debug-ast For debugging purposes: print the undecorated AST, before semantic checking
Expand Down Expand Up @@ -92,7 +92,7 @@ Error when no file passed
Error when multiple files passed
$ stanc foo.stan foo2.stan
stanc: Please specify only one model_file.
Usage: %%NAME%% [option] ... <model_file.stan[functions]>
Usage: stanc [option] ... <model_file.stan[functions]>
--debug-lex For debugging purposes: print the lexer actions
--debug-parse For debugging purposes: print the parser actions
--debug-ast For debugging purposes: print the undecorated AST, before semantic checking
Expand Down
4 changes: 2 additions & 2 deletions test/integration/good/code-gen/cl.expected
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$ ../../../../../install/default/bin/stanc --print-cpp --use-opencl optimize_glm.stan
// Code generated by %%NAME%% %%VERSION%%
// Code generated by stanc v2.32.0-rc1
#include <stan/model/model_header.hpp>
namespace optimize_glm_model_namespace {
using stan::model::model_base_crtp;
Expand Down Expand Up @@ -507,7 +507,7 @@ class optimize_glm_model final : public model_base_crtp<optimize_glm_model> {
return "optimize_glm_model";
}
inline std::vector<std::string> model_compile_info() const noexcept {
return std::vector<std::string>{"stanc_version = %%NAME%%3 %%VERSION%%",
return std::vector<std::string>{"stanc_version = stanc3 v2.32.0-rc1",
"stancflags = --print-cpp --use-opencl"};
}
template <bool propto__, bool jacobian__, typename VecR, typename VecI,
Expand Down
28 changes: 14 additions & 14 deletions test/integration/good/code-gen/complex_numbers/cpp.expected
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$ ../../../../../../install/default/bin/stanc --print-cpp basic_op_param.stan
// Code generated by %%NAME%% %%VERSION%%
// Code generated by stanc v2.32.0-rc1
#include <stan/model/model_header.hpp>
namespace basic_op_param_model_namespace {
using stan::model::model_base_crtp;
Expand Down Expand Up @@ -208,7 +208,7 @@ class basic_op_param_model final : public model_base_crtp<basic_op_param_model>
return "basic_op_param_model";
}
inline std::vector<std::string> model_compile_info() const noexcept {
return std::vector<std::string>{"stanc_version = %%NAME%%3 %%VERSION%%",
return std::vector<std::string>{"stanc_version = stanc3 v2.32.0-rc1",
"stancflags = --print-cpp"};
}
template <bool propto__, bool jacobian__, typename VecR, typename VecI,
Expand Down Expand Up @@ -1773,7 +1773,7 @@ stan::math::profile_map& get_stan_profile_data() {
}
#endif
$ ../../../../../../install/default/bin/stanc --print-cpp basic_operations.stan
// Code generated by %%NAME%% %%VERSION%%
// Code generated by stanc v2.32.0-rc1
#include <stan/model/model_header.hpp>
namespace basic_operations_model_namespace {
using stan::model::model_base_crtp;
Expand Down Expand Up @@ -2156,7 +2156,7 @@ class basic_operations_model final : public model_base_crtp<basic_operations_mod
return "basic_operations_model";
}
inline std::vector<std::string> model_compile_info() const noexcept {
return std::vector<std::string>{"stanc_version = %%NAME%%3 %%VERSION%%",
return std::vector<std::string>{"stanc_version = stanc3 v2.32.0-rc1",
"stancflags = --print-cpp"};
}
template <bool propto__, bool jacobian__, typename VecR, typename VecI,
Expand Down Expand Up @@ -2929,7 +2929,7 @@ stan::math::profile_map& get_stan_profile_data() {
}
#endif
$ ../../../../../../install/default/bin/stanc --print-cpp basic_ops_mix.stan
// Code generated by %%NAME%% %%VERSION%%
// Code generated by stanc v2.32.0-rc1
#include <stan/model/model_header.hpp>
namespace basic_ops_mix_model_namespace {
using stan::model::model_base_crtp;
Expand Down Expand Up @@ -3361,7 +3361,7 @@ class basic_ops_mix_model final : public model_base_crtp<basic_ops_mix_model> {
return "basic_ops_mix_model";
}
inline std::vector<std::string> model_compile_info() const noexcept {
return std::vector<std::string>{"stanc_version = %%NAME%%3 %%VERSION%%",
return std::vector<std::string>{"stanc_version = stanc3 v2.32.0-rc1",
"stancflags = --print-cpp"};
}
template <bool propto__, bool jacobian__, typename VecR, typename VecI,
Expand Down Expand Up @@ -5044,7 +5044,7 @@ stan::math::profile_map& get_stan_profile_data() {
}
#endif
$ ../../../../../../install/default/bin/stanc --print-cpp complex_data.stan
// Code generated by %%NAME%% %%VERSION%%
// Code generated by stanc v2.32.0-rc1
#include <stan/model/model_header.hpp>
namespace complex_data_model_namespace {
using stan::model::model_base_crtp;
Expand Down Expand Up @@ -5387,7 +5387,7 @@ class complex_data_model final : public model_base_crtp<complex_data_model> {
return "complex_data_model";
}
inline std::vector<std::string> model_compile_info() const noexcept {
return std::vector<std::string>{"stanc_version = %%NAME%%3 %%VERSION%%",
return std::vector<std::string>{"stanc_version = stanc3 v2.32.0-rc1",
"stancflags = --print-cpp"};
}
template <bool propto__, bool jacobian__, typename VecR, typename VecI,
Expand Down Expand Up @@ -5630,7 +5630,7 @@ stan::math::profile_map& get_stan_profile_data() {
}
#endif
$ ../../../../../../install/default/bin/stanc --print-cpp complex_scalar.stan
// Code generated by %%NAME%% %%VERSION%%
// Code generated by stanc v2.32.0-rc1
#include <stan/model/model_header.hpp>
namespace complex_scalar_model_namespace {
using stan::model::model_base_crtp;
Expand Down Expand Up @@ -6606,7 +6606,7 @@ class complex_scalar_model final : public model_base_crtp<complex_scalar_model>
return "complex_scalar_model";
}
inline std::vector<std::string> model_compile_info() const noexcept {
return std::vector<std::string>{"stanc_version = %%NAME%%3 %%VERSION%%",
return std::vector<std::string>{"stanc_version = stanc3 v2.32.0-rc1",
"stancflags = --print-cpp"};
}
template <bool propto__, bool jacobian__, typename VecR, typename VecI,
Expand Down Expand Up @@ -8265,7 +8265,7 @@ stan::math::profile_map& get_stan_profile_data() {
}
#endif
$ ../../../../../../install/default/bin/stanc --print-cpp complex_vectors.stan
// Code generated by %%NAME%% %%VERSION%%
// Code generated by stanc v2.32.0-rc1
#include <stan/model/model_header.hpp>
namespace complex_vectors_model_namespace {
using stan::model::model_base_crtp;
Expand Down Expand Up @@ -8311,7 +8311,7 @@ class complex_vectors_model final : public model_base_crtp<complex_vectors_model
return "complex_vectors_model";
}
inline std::vector<std::string> model_compile_info() const noexcept {
return std::vector<std::string>{"stanc_version = %%NAME%%3 %%VERSION%%",
return std::vector<std::string>{"stanc_version = stanc3 v2.32.0-rc1",
"stancflags = --print-cpp"};
}
template <bool propto__, bool jacobian__, typename VecR, typename VecI,
Expand Down Expand Up @@ -8774,7 +8774,7 @@ stan::math::profile_map& get_stan_profile_data() {
}
#endif
$ ../../../../../../install/default/bin/stanc --print-cpp user_function_templating.stan
// Code generated by %%NAME%% %%VERSION%%
// Code generated by stanc v2.32.0-rc1
#include <stan/model/model_header.hpp>
namespace user_function_templating_model_namespace {
using stan::model::model_base_crtp;
Expand Down Expand Up @@ -9060,7 +9060,7 @@ class user_function_templating_model final : public model_base_crtp<user_functio
return "user_function_templating_model";
}
inline std::vector<std::string> model_compile_info() const noexcept {
return std::vector<std::string>{"stanc_version = %%NAME%%3 %%VERSION%%",
return std::vector<std::string>{"stanc_version = stanc3 v2.32.0-rc1",
"stancflags = --print-cpp"};
}
template <bool propto__, bool jacobian__, typename VecR, typename VecI,
Expand Down
Loading

0 comments on commit 47ee1ca

Please sign in to comment.